jfits
Interface FitsShape

All Superinterfaces:
Shape
All Known Implementing Classes:
AbstractFitsShape, FitsAnnulus, FitsCircle, FitsLine, FitsRectangle

public interface FitsShape
extends Shape

A fits shape is a shape object in the special context of a fits background image. It is intended to do a little more advanced things than ds9 regions, like count extraction etc.

Use it together with a cursor to place it on a fits image, then use the methods getStatistic(java.awt.geom.AffineTransform), getAdus(java.awt.geom.AffineTransform), or getPrincipal(java.awt.geom.AffineTransform) to retrive the fits values.


Method Summary
 List<Vector3D> getAdus(AffineTransform af)
          Greps the ADUs in the registered fits that lay within the bounds of this shape and returns them as x,y vs.
 List<Vector2D> getPrincipal(AffineTransform a)
          Greps the ADUs in the registered fits that lay within the bounds of this shape and returns them as a two dimensional vector, where x stands for a pixel-like extension along a shape-specific principal axis, and y is a value representing the ADUs perpendicular to this axis.
 Statistic getStatistic(AffineTransform af)
          Greps the ADUs in the registered fits that lay within the bounds of this shape and reports them as a statistic.
 boolean isClosed()
          Returns true if this shape is a closed geometric figure or an open one.
 void registerFits(nom.tam.fits.Fits fits)
          This method registers the fits this shape should work on.
 void registerFits(nom.tam.fits.ImageHDU hdu)
          This method registers the image HDU this shape should work on.
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, intersects, intersects
 

Method Detail

registerFits

void registerFits(nom.tam.fits.Fits fits)
                  throws nom.tam.fits.FitsException
This method registers the fits this shape should work on. Concrete implementation may support a constructor with the fits object as an argument. For multi-extension fits, consider using registerFits(ImageHDU).

Throws:
nom.tam.fits.FitsException

registerFits

void registerFits(nom.tam.fits.ImageHDU hdu)
                  throws nom.tam.fits.FitsException
This method registers the image HDU this shape should work on. Concrete implementation may support a constructor with the fits object as an argument.

Throws:
nom.tam.fits.FitsException
See Also:
registerFits(Fits)

getStatistic

Statistic getStatistic(AffineTransform af)
                       throws nom.tam.fits.FitsException
Greps the ADUs in the registered fits that lay within the bounds of this shape and reports them as a statistic. If the argument si null, the identitiy transform is used.

Parameters:
af - How the generic shape is transformed to FITS space.
Throws:
nom.tam.fits.FitsException

getAdus

List<Vector3D> getAdus(AffineTransform af)
                       throws nom.tam.fits.FitsException
Greps the ADUs in the registered fits that lay within the bounds of this shape and returns them as x,y vs. ADUs.

Parameters:
af - How the generic shape is transformed to FITS space.
Throws:
nom.tam.fits.FitsException

getPrincipal

List<Vector2D> getPrincipal(AffineTransform a)
                            throws nom.tam.fits.FitsException
Greps the ADUs in the registered fits that lay within the bounds of this shape and returns them as a two dimensional vector, where x stands for a pixel-like extension along a shape-specific principal axis, and y is a value representing the ADUs perpendicular to this axis. In a rectangle, this may return the ADUs as the average of the ADUs along the height of the rectangle vs. the extension in length. For a circular aperture, this may return the circumference of the half-radius as the principal axis, the y value as some sort of average in radial direction.

Parameters:
a - How the generic shape is transformed to FITS space.
Throws:
nom.tam.fits.FitsException

isClosed

boolean isClosed()
Returns true if this shape is a closed geometric figure or an open one. This should be understood like in polar or euclidean sense: shapes that have a principal axis that is closed sould return true here, others false.