Isis Developer Reference
Isis::CentroidApolloPan Class Reference

Selection class derived from the Pure Virtual Parent Class for all Selection classes. More...

#include <CentroidApolloPan.h>

Inheritance diagram for Isis::CentroidApolloPan:
Inheritance graph
Collaboration diagram for Isis::CentroidApolloPan:
Collaboration graph

Public Member Functions

 CentroidApolloPan (double pixel_size_microns)
 Constructs a CentroidApolloPan object.
 
virtual ~CentroidApolloPan ()
 Destroys the CentroidApolloPan object.
 
bool setPixelSize (double microns)
 Set the pixel size in microns.
 
int elipticalReduction (Chip *selectionChip, double percent_selected, double play, int patience_limit)
 This method will take advantage of all the apriori knowlege we have of the size and orientation of the ellipse to speed up elliptical reduction.
 
int selectAdaptive (Chip *inputChip, Chip *selectionChip)
 Given a range of DN this function creates a biniary chip for all continuous pixels that have the DN within the specified range using the center pixel of the chip as the seed value.
 
int select (Chip *inputChip, Chip *selectionChip)
 Given a range of DN this function creates a biniary chip for all continuous pixels that have the DN within the specified range using the center pixel of the chip as the seed value.
 
int setDNRange (double minimumDN, double maximumDN)
 Set the range of the DNs.
 
double getMinDN ()
 
double getMaxDN ()
 
int centerOfMass (Chip *selectionChip, double *sample, double *line)
 
int centerOfMassWeighted (Chip *inputChip, Chip *selectionChip, double *sample, double *line)
 
bool ellipseFrom5Pts (Ellipse *ell, double pts[5][2])
 
double elipsePercentSelected (Chip *selectionChip, Ellipse *ell)
 
std::vector< double > minimumBoundingElipse (std::vector< std::vector< int > > pts, Ellipse *ell)
 
bool ellipseFromCubic (Ellipse *ell, double cubic[6])
 
bool ellipseAxesAreaFromMatrix (Ellipse *ell)
 
bool bestFitEllipse (Ellipse *ell, std::vector< std::vector< int > > *pts, double play, unsigned int max_iter)
 
bool pointInEllipse (Ellipse *ell, double pt[2], double play)
 
bool ellipseInChip (Ellipse *ell, Chip *chip)
 
bool ellipseFromCenterAxesAngle (Ellipse *ell, double centerSample, double centerLine, double semiMajor, double semiMinor, double theta)
 
void selectionEdge (Chip *selectionChip, std::vector< std::vector< int > > *pts)
 

Detailed Description

Selection class derived from the Pure Virtual Parent Class for all Selection classes.

Description coming soon

Author
2011-10-22 Orrin Thomas

Constructor & Destructor Documentation

◆ CentroidApolloPan()

Isis::CentroidApolloPan::CentroidApolloPan ( double pixelSizeMicrons)

Constructs a CentroidApolloPan object.

Parameters
pixelSizeMicronsThe pixel size in microns

◆ ~CentroidApolloPan()

Isis::CentroidApolloPan::~CentroidApolloPan ( )
virtual

Destroys the CentroidApolloPan object.

Member Function Documentation

◆ bestFitEllipse()

bool Isis::Selection::bestFitEllipse ( Ellipse * ell,
std::vector< std::vector< int > > * pts,
double play,
unsigned int max_iter )
inherited

◆ centerOfMass()

int Isis::Selection::centerOfMass ( Chip * selectionChip,
double * sample,
double * line )
inherited

◆ centerOfMassWeighted()

int Isis::Selection::centerOfMassWeighted ( Chip * inputChip,
Chip * selectionChip,
double * sample,
double * line )
inherited

◆ elipsePercentSelected()

double Isis::Selection::elipsePercentSelected ( Chip * selectionChip,
Ellipse * ell )
inherited

◆ elipticalReduction()

int Isis::CentroidApolloPan::elipticalReduction ( Chip * selectionChip,
double percent_selected,
double play,
int patience_limit )
virtual

This method will take advantage of all the apriori knowlege we have of the size and orientation of the ellipse to speed up elliptical reduction.

The general elliptical reduction tool provided in the selection class is slow for the very large and potentially noisy ellipses of the apollo pan data.

Specifically we know: semiMajor Axis,a, is approximately parrallel to the sample chip axis and is approximately 60 5-micron pixels long semiMinor Axis,b, is approximately parrallel to the line chip axis and is approximately 60 5-micron pixels long

Hence we know the center of the ellipse is on the range [a+1,Samples-a],[b+1,lines-b] (because the entire ellipse must be within the chip)

this->pixel_size will be used to do any scaling neccessary

Algorithim: Step 1: Compile an array of all points on the border of the selected area Step 2: Choose a previously unused hypothesis center point from the range [a+1,samples-a],[b+1,lines-b] Step 3: For a given hypothesized ellipse center in the search set, define the Ellipse. Step 4: Do a least squares generization. Any points within a distance of play pixels to the edge of the ellipse are included in the gernalization. The distance check is repeated for every iteration so the ellipse can effective grow to include more points. Step 5: If the generization is successfully check to see if the area is at least as great as the current best, and that the ellipse is contained in the chip Step 6: If the area is great enough check that the percent selected is at least percent_selected. Step 7: If all above tests are passed then we have a new Best ellipse and the number of consecutive emptySets is zeroed. Otherwise emptySets++ Step 8: repeat steps 2 through 7 until pacience_limit consecquitive failures to find a better (larger area) elipse have occured

Parameters
selectionChipBinary chip of selected and unselected pixels
percent_selectedMinimum percent of selected points
playDistance allowed in the least squares generization
patience_limitMaximum number of empty sets allowed
Returns
int Return 0 if there isn't an ellipse that meets the selection criteria, else return 1

Reimplemented from Isis::Selection.

References Isis::Selection::bestFitEllipse(), Isis::Selection::elipsePercentSelected(), Isis::Selection::ellipseFromCenterAxesAngle(), Isis::Selection::ellipseInChip(), Isis::Selection::pointInEllipse(), and Isis::Selection::selectionEdge().

◆ ellipseAxesAreaFromMatrix()

bool Isis::Selection::ellipseAxesAreaFromMatrix ( Ellipse * ell)
inherited

◆ ellipseFrom5Pts()

bool Isis::Selection::ellipseFrom5Pts ( Ellipse * ell,
double pts[5][2] )
inherited

◆ ellipseFromCenterAxesAngle()

bool Isis::Selection::ellipseFromCenterAxesAngle ( Ellipse * ell,
double centerSample,
double centerLine,
double semiMajor,
double semiMinor,
double theta )
inherited

Referenced by elipticalReduction().

◆ ellipseFromCubic()

bool Isis::Selection::ellipseFromCubic ( Ellipse * ell,
double cubic[6] )
inherited

◆ ellipseInChip()

bool Isis::Selection::ellipseInChip ( Ellipse * ell,
Chip * chip )
inherited

◆ getMaxDN()

double Isis::Centroid::getMaxDN ( )
inherited
Returns
(double) The maximum DN value of the range

Referenced by selectAdaptive().

◆ getMinDN()

double Isis::Centroid::getMinDN ( )
inherited
Returns
(double) The minimum DN value of the range

Referenced by selectAdaptive().

◆ minimumBoundingElipse()

std::vector< double > Isis::Selection::minimumBoundingElipse ( std::vector< std::vector< int > > pts,
Ellipse * ell )
inherited

◆ pointInEllipse()

bool Isis::Selection::pointInEllipse ( Ellipse * ell,
double pt[2],
double play )
inherited

◆ select()

int Isis::Centroid::select ( Chip * inputChip,
Chip * selectionChip )
virtualinherited

Given a range of DN this function creates a biniary chip for all continuous pixels that have the DN within the specified range using the center pixel of the chip as the seed value.

Parameters
inputChipPointer to the input chip
selectionChipPointer to the binary chip of selected and unselected pixels
Returns
the number 1 if successful

Implements Isis::Selection.

Referenced by selectAdaptive().

◆ selectAdaptive()

int Isis::CentroidApolloPan::selectAdaptive ( Chip * inputChip,
Chip * selectionChip )

Given a range of DN this function creates a biniary chip for all continuous pixels that have the DN within the specified range using the center pixel of the chip as the seed value.

Parameters
inputChipChip centered around some centroidable feature (dark or light continous block of pixels)
[out]selectionChipBinary chip of selected and unselected pixels
Returns
int Returns 0 if the input chips aren't 2D, else return 1

References Isis::Centroid::getMaxDN(), Isis::Centroid::getMinDN(), Isis::Chip::GetValue(), Isis::Chip::Lines(), Isis::Chip::Samples(), Isis::Centroid::select(), and Isis::Centroid::setDNRange().

◆ selectionEdge()

void Isis::Selection::selectionEdge ( Chip * selectionChip,
std::vector< std::vector< int > > * pts )
inherited

◆ setDNRange()

int Isis::Centroid::setDNRange ( double minimumDN,
double maximumDN )
inherited

Set the range of the DNs.

Parameters
minimumDNThe min DN value of the range
maximumDNThe max DN value of the range
Returns
(int) The number 1 on success

Referenced by selectAdaptive(), and Isis::AutoReg::SetSubpixelPosition().

◆ setPixelSize()

bool Isis::CentroidApolloPan::setPixelSize ( double microns)

Set the pixel size in microns.

Parameters
micronsThe pixel size value to set
Returns
bool Returns false if microns is <= 0, else true.

The documentation for this class was generated from the following files: