Isis 3 Programmer 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. More...
 
virtual ~CentroidApolloPan ()
 Destroys the CentroidApolloPan object. More...
 
bool setPixelSize (double microns)
 Set the pixel size in microns. More...
 
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. More...
 
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. More...
 
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. More...
 
int setDNRange (double minimumDN, double maximumDN)
 Set the range of the DNs. More...
 
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)
 

Private Attributes

double m_pixelSize
 pixel size in microns More...
 
double m_maxDN
 The max DN value to be included in the selection. More...
 
double m_minDN
 The min DN value to be included in the selection. More...
 

Detailed Description

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

Description coming soon

Author
2011-10-22 Orrin Thomas
History:
2011-10-22 Orrin Thomas - Original version
History:
2017-06-28 Makayla Shepherd - Updated documentation. References #4807.

Definition at line 28 of file CentroidApolloPan.h.

Constructor & Destructor Documentation

◆ CentroidApolloPan()

Isis::CentroidApolloPan::CentroidApolloPan ( double  pixelSizeMicrons)

Constructs a CentroidApolloPan object.

Parameters
pixelSizeMicronsThe pixel size in microns

Definition at line 36 of file CentroidApolloPan.cpp.

◆ ~CentroidApolloPan()

Isis::CentroidApolloPan::~CentroidApolloPan ( )
virtual

Destroys the CentroidApolloPan object.

Definition at line 48 of file CentroidApolloPan.cpp.

Member Function Documentation

◆ 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

printf("Debug: a: %lf b: %lf majorAxis: %lf %lf\n",ellBest.semiMajor,ellBest.semiMinor,ellBest.majorAxis[0],ellBest.majorAxis[1]);

Reimplemented from Isis::Selection.

Definition at line 192 of file CentroidApolloPan.cpp.

References Isis::Chip::GetValue(), Isis::Chip::Lines(), Isis::Chip::Samples(), and Isis::Chip::SetValue().

◆ getMaxDN()

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

Definition at line 147 of file Centroid.cpp.

◆ getMinDN()

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

Definition at line 139 of file Centroid.cpp.

◆ 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.

Definition at line 30 of file Centroid.cpp.

References Isis::Chip::ChipLine(), Isis::Chip::ChipSample(), Isis::Chip::GetValue(), Isis::Chip::Lines(), Isis::Chip::Samples(), Isis::Chip::SetAllValues(), Isis::Chip::SetSize(), and Isis::Chip::SetValue().

Referenced by Isis::AutoReg::SetSubpixelPosition().

◆ 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

Definition at line 74 of file CentroidApolloPan.cpp.

References Isis::Chip::GetValue(), Isis::Chip::Lines(), and Isis::Chip::Samples().

◆ 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

Definition at line 126 of file Centroid.cpp.

Referenced by 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.

Definition at line 57 of file CentroidApolloPan.cpp.

Member Data Documentation

◆ m_maxDN

double Isis::Centroid::m_maxDN
privateinherited

The max DN value to be included in the selection.

Definition at line 41 of file Centroid.h.

◆ m_minDN

double Isis::Centroid::m_minDN
privateinherited

The min DN value to be included in the selection.

Definition at line 42 of file Centroid.h.

◆ m_pixelSize

double Isis::CentroidApolloPan::m_pixelSize
private

pixel size in microns

Definition at line 39 of file CentroidApolloPan.h.


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