jfits
Class FitsLine

java.lang.Object
  extended by jfits.AbstractFitsShape
      extended by jfits.FitsLine
All Implemented Interfaces:
Shape, FitsShape

public class FitsLine
extends AbstractFitsShape

This class represents a (tilted) line with a certain (normalized) width. If using lines in direction of the x or y axis, use the FitsRectangle instead.


Field Summary
private  Line2D central
          We store the original line for reference.
 
Constructor Summary
FitsLine(Line2D center, double thick)
          Creates the new thick-line region and stores the original line as a reference for the principal axis.
 
Method Summary
private static Shape createRuler(Line2D cent, double hlf)
          Creates a general path that is a tilted rectangle.
 List<Vector2D> getPrincipal(AffineTransform a)
          We grab the list of all adus in our bounding rectangle, then define as the principal axis the distance to the center of this box.
 boolean isClosed()
          We are an open shape.
private static Vector2D normal(Line2D center)
          Returns the normalized vector perpendicular to the line.
 
Methods inherited from class jfits.AbstractFitsShape
contains, contains, contains, contains, getAdus, getBounds, getBounds2D, getFitsShape, getPathIterator, getPathIterator, getStatistic, intersects, intersects, registerFits, registerFits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

central

private Line2D central
We store the original line for reference.

Constructor Detail

FitsLine

public FitsLine(Line2D center,
                double thick)
Creates the new thick-line region and stores the original line as a reference for the principal axis.

Method Detail

createRuler

private static Shape createRuler(Line2D cent,
                                 double hlf)
Creates a general path that is a tilted rectangle.


normal

private static Vector2D normal(Line2D center)
Returns the normalized vector perpendicular to the line.


getPrincipal

public List<Vector2D> getPrincipal(AffineTransform a)
                            throws nom.tam.fits.FitsException
We grab the list of all adus in our bounding rectangle, then define as the principal axis the distance to the center of this box. We add all pixels within the area by calculating their distance to the center and averageing along the interger of it.

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

isClosed

public boolean isClosed()
We are an open shape.