net.aerith.misao.util
Class AdjoiningPixel

java.lang.Object
  |
  +--net.aerith.misao.util.AdjoiningPixel

public class AdjoiningPixel
extends java.lang.Object

The AdjoiningPixel represents a set of pixels on an image.


Field Summary
private  AdjoiningPixel current_ap
          The AdjoiningPixel being created in method deblend.
private  double current_threshold
          The current threshold used in method extract.
protected  java.util.Vector list
          The list of pixels.
protected  int pixels_for_astrometry
          The minimum pixels to use in astrometry.
 
Constructor Summary
AdjoiningPixel()
          Constructs an empty AdjoiningPixel.
 
Method Summary
 void addPixel(Pixel pixel)
          Adds a pixel.
 StarImage createStar()
          Creates a StarImage.
 java.util.Vector deblend(double base_step)
          Deblends adjoining pixels into some sets of adjoining pixels based on the specified base step.
 java.util.Vector deblend(double base_step, MeanStarImageRadius mean_radius)
          Deblends adjoining pixels into some sets of adjoining pixels based on the specified base step.
private  void extract(int x, int y)
          Extracts and removes pixels around the specified position whose value is greater than the specified threshold.
 Position getGravityCenter()
          Gets the gravity center.
 Pixel getPeak()
          Gets the pixel at the peak.
 double getPeakValue()
          Gets the pixel value of the peak.
 int getPixelCount()
          Gets the number of pixels.
 Pixel[] getPixels()
          Gets the array of pixels.
 int getXMax()
          Gets the maximum x location.
 int getXMin()
          Gets the minimum x location.
 int getYMax()
          Gets the maximum y location.
 int getYMin()
          Gets the minimum y location.
private  boolean isAdjoining(AdjoiningPixel ap)
          Checks if the specified set of adjoining pixels is adjoining to this AdjoiningPixel.
 void setMinimumPixelCountForAstrometry(int pixel_count)
          Sets the minimum pixels to use in astrometry.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

list

protected java.util.Vector list
The list of pixels.

pixels_for_astrometry

protected int pixels_for_astrometry
The minimum pixels to use in astrometry.

current_ap

private AdjoiningPixel current_ap
The AdjoiningPixel being created in method deblend.

current_threshold

private double current_threshold
The current threshold used in method extract.
Constructor Detail

AdjoiningPixel

public AdjoiningPixel()
Constructs an empty AdjoiningPixel.
Method Detail

addPixel

public void addPixel(Pixel pixel)
Adds a pixel.
Parameters:
pixel - the pixel to add.

getPixelCount

public int getPixelCount()
Gets the number of pixels.
Returns:
the number of pixels.

getPixels

public Pixel[] getPixels()
Gets the array of pixels.
Returns:
the array of pixels.

getXMin

public int getXMin()
Gets the minimum x location.
Returns:
the minimum x location.

getXMax

public int getXMax()
Gets the maximum x location.
Returns:
the maximum x location.

getYMin

public int getYMin()
Gets the minimum y location.
Returns:
the minimum y location.

getYMax

public int getYMax()
Gets the maximum y location.
Returns:
the maximum y location.

getPeakValue

public double getPeakValue()
Gets the pixel value of the peak.
Returns:
the pixel value of the peak.

setMinimumPixelCountForAstrometry

public void setMinimumPixelCountForAstrometry(int pixel_count)
Sets the minimum pixels to use in astrometry.
Parameters:
pixel_count - the minimum pixels to use in astrometry.

createStar

public StarImage createStar()
Creates a StarImage.
Returns:
the new StarImage.

deblend

public java.util.Vector deblend(double base_step)
Deblends adjoining pixels into some sets of adjoining pixels based on the specified base step. After this process, this AdjoiningPixel is destroyed.
Parameters:
base_step - the step to deblend.

deblend

public java.util.Vector deblend(double base_step,
                                MeanStarImageRadius mean_radius)
Deblends adjoining pixels into some sets of adjoining pixels based on the specified base step. After this process, this AdjoiningPixel is destroyed.
Parameters:
base_step - the step to deblend.
mean_radius - the mean radius of a star image.

getPeak

public Pixel getPeak()
Gets the pixel at the peak.
Returns:
the pixel at the peak.

getGravityCenter

public Position getGravityCenter()
Gets the gravity center.
Returns:
the gravity center.

isAdjoining

private boolean isAdjoining(AdjoiningPixel ap)
Checks if the specified set of adjoining pixels is adjoining to this AdjoiningPixel.
Parameters:
ap - the target AdjoiningPixel to check.
Returns:
true if the specified set of adjoining pixels is adjoining to this.

extract

private void extract(int x,
                     int y)
Extracts and removes pixels around the specified position whose value is greater than the specified threshold. This method is invoked recurrsively.
Parameters:
x - the x position.
y - the y position.