net.grelf.grip
Class BlobMeas

java.lang.Object
  extended by net.grelf.grip.BlobMeas
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<BlobMeas>

public class BlobMeas
extends java.lang.Object
implements java.lang.Cloneable, java.lang.Comparable<BlobMeas>, java.io.Serializable

Record to hold measurements made on a Blob. This includes geometrical measurements and brightness measurements. By brightness is meant integrated grey level, which some books call digital number (DN) or analogue-to-digital output units (ADU). Brightness is recorded for each channel of an image and also the the total brightness which is the square root of the sum of the squares of the individual channel brightnesses: that is calculated and held here rather than repeatedly recalculating it.

See Also:
Serialized Form

Field Summary
 long[] accurateBrightnesses
          As measured using a guard ring and having allowed for the background, null if not done
 int area
          Area in pixels of the blob as initially detected.
 Statistics[] backgroundStatistics
          As measured from a guard ring, null if not done.
 Blob blob
          Reference to the blob that was measured.
 double brightness
          As measured when blob was initially detected.
 PointFloat centre
          Centre of gravity of the blob as initially detected.
 long[] channelBrightnesses
          As measured when blob was initially detected.
 int maxX
          Extremes of the detected boundary.
 int maxY
          Extremes of the detected boundary.
 int minX
          Extremes of the detected boundary.
 int minY
          Extremes of the detected boundary.
 int nPixelsMeasured
          The number of pixels in the inner disc used for accurate brightness measurement, 0 if that has not been done.
 float[] snRatios
          Signal/noise ratios determined when accurate brightnesses were measured.
 
Constructor Summary
BlobMeas()
           
 
Method Summary
 BlobMeas clone()
          Does a deep copy of everything except the blob, for which the reference is copied.
 int compareTo(BlobMeas other)
          To enable sorting on reverse order of brightness.
static void drawBoundaries(ImFrame imframe, BlobMeasList blobMeases)
          Draw blob boundaries from the given blob measurements into the GlassPane of the given ImFrame and redisplay the image.
9.11.29: Deprecated: use instead a non-static method of the same name in BlobMeasList.
static BlobMeas getNearestBlob(BlobMeasList blobMeases, int xx, int yy)
          Deprecated. 
 Star getOrCreateStar()
          Return star associated with blob; but create one (and set it in this BlobMeas) if none yet exists.
 Star getStar()
          Get a reference to the star with which this blob has been identified.
 void setStar(Star star)
          Identify this blob as a particular star (having Hipparcos/Tycho/etc data).
static void showBrightestBlobs(ImFrame imframe, BlobMeasList blobMeases)
          Draw brightest blobs into the GlassPane of the given ImFrame and redisplay the image.
 void showSummary()
          Show a summary of all the data in a message box.
 java.lang.String toHoverString()
          Get a description for display in the GlassPane in BLOB_HOVER drawing mode.
 java.lang.String toString()
          Get a simple description of the BlobMeas
 java.lang.StringBuffer toXML(java.lang.String indent)
          The indent would typically be some tabs, eg "\t\t".
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

brightness

public double brightness
As measured when blob was initially detected. The blob region is unlikely to go to the extreme edges of the blob because the threshold has to be set above background so this measurement is not precise.


channelBrightnesses

public long[] channelBrightnesses
As measured when blob was initially detected. The blob region is unlikely to go to the extreme edges of the blob because the threshold has to be set above background so these measurements are not precise.


backgroundStatistics

public Statistics[] backgroundStatistics
As measured from a guard ring, null if not done. The statistics of the background ring are written into .blobs XML files, from which they could be analysed if required. Otherwise they are only used temporarily while computing the accurateBrightnesses values.


accurateBrightnesses

public long[] accurateBrightnesses
As measured using a guard ring and having allowed for the background, null if not done


snRatios

public float[] snRatios
Signal/noise ratios determined when accurate brightnesses were measured. See the documentation of net.grelf.grip.Blob.measure () for the method of calculation.


nPixelsMeasured

public int nPixelsMeasured
The number of pixels in the inner disc used for accurate brightness measurement, 0 if that has not been done.


centre

public PointFloat centre
Centre of gravity of the blob as initially detected.


area

public int area
Area in pixels of the blob as initially detected.


blob

public Blob blob
Reference to the blob that was measured.


minX

public int minX
Extremes of the detected boundary. Avoids rescanning the boundary to find them.


minY

public int minY
Extremes of the detected boundary. Avoids rescanning the boundary to find them.


maxX

public int maxX
Extremes of the detected boundary. Avoids rescanning the boundary to find them.


maxY

public int maxY
Extremes of the detected boundary. Avoids rescanning the boundary to find them.

Constructor Detail

BlobMeas

public BlobMeas()
Method Detail

getStar

public Star getStar()
Get a reference to the star with which this blob has been identified. From that you can get star id in various catalogues, magnitude, etc.


getOrCreateStar

public Star getOrCreateStar()
Return star associated with blob; but create one (and set it in this BlobMeas) if none yet exists.


setStar

public void setStar(Star star)
Identify this blob as a particular star (having Hipparcos/Tycho/etc data).


compareTo

public int compareTo(BlobMeas other)
To enable sorting on reverse order of brightness. Uses the less accurate brightness as first detected.

Specified by:
compareTo in interface java.lang.Comparable<BlobMeas>

clone

public BlobMeas clone()
Does a deep copy of everything except the blob, for which the reference is copied.

Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Get a simple description of the BlobMeas

Overrides:
toString in class java.lang.Object

toHoverString

public java.lang.String toHoverString()
Get a description for display in the GlassPane in BLOB_HOVER drawing mode.


showSummary

public void showSummary()
Show a summary of all the data in a message box.


toXML

public java.lang.StringBuffer toXML(java.lang.String indent)
The indent would typically be some tabs, eg "\t\t".


drawBoundaries

public static void drawBoundaries(ImFrame imframe,
                                  BlobMeasList blobMeases)
Draw blob boundaries from the given blob measurements into the GlassPane of the given ImFrame and redisplay the image.
9.11.29: Deprecated: use instead a non-static method of the same name in BlobMeasList.


showBrightestBlobs

public static void showBrightestBlobs(ImFrame imframe,
                                      BlobMeasList blobMeases)
Draw brightest blobs into the GlassPane of the given ImFrame and redisplay the image. The number of brightest blobs to show is determined by Config. Blobs are labelled with numbers, from 1 for the brightest.
9.11.29: Deprecated: use instead a non-static method of the same name in BlobMeasList.


getNearestBlob

@Deprecated
public static BlobMeas getNearestBlob(BlobMeasList blobMeases,
                                                 int xx,
                                                 int yy)
Deprecated. 

Given a list of measured blobs, find the one nearest to given point (xx, yy).
9.11.29: Deprecated: use instead a non-static method of the same name in BlobMeasList.