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

Private Attributes

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

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

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 34 of file CentroidApolloPan.cpp.

References m_pixelSize.

◆ ~CentroidApolloPan()

Isis::CentroidApolloPan::~CentroidApolloPan ( )
virtual

Destroys the CentroidApolloPan object.

Definition at line 46 of file CentroidApolloPan.cpp.

Member Function Documentation

◆ bestFitEllipse()

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

Definition at line 416 of file Selection.cpp.

◆ centerOfMass()

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

Definition at line 164 of file Selection.cpp.

◆ centerOfMassWeighted()

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

Definition at line 187 of file Selection.cpp.

◆ elipsePercentSelected()

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

Definition at line 292 of file Selection.cpp.

◆ 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 190 of file CentroidApolloPan.cpp.

References m_pixelSize.

◆ ellipseAxesAreaFromMatrix()

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

Definition at line 581 of file Selection.cpp.

◆ ellipseFrom5Pts()

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

Definition at line 331 of file Selection.cpp.

◆ ellipseFromCenterAxesAngle()

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

Definition at line 753 of file Selection.cpp.

◆ ellipseFromCubic()

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

Definition at line 385 of file Selection.cpp.

◆ ellipseInChip()

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

Definition at line 632 of file Selection.cpp.

◆ getMaxDN()

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

Definition at line 147 of file Centroid.cpp.

References Isis::Centroid::m_maxDN.

Referenced by selectAdaptive().

◆ getMinDN()

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

Definition at line 139 of file Centroid.cpp.

References Isis::Centroid::m_minDN.

Referenced by selectAdaptive().

◆ minimumBoundingElipse()

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

Definition at line 228 of file Selection.cpp.

◆ pointInEllipse()

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

Definition at line 730 of file Selection.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::Centroid::m_maxDN, and Isis::Centroid::m_minDN.

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

Definition at line 72 of file CentroidApolloPan.cpp.

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

Definition at line 553 of file Selection.cpp.

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

References Isis::Centroid::m_maxDN, and Isis::Centroid::m_minDN.

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.

Definition at line 55 of file CentroidApolloPan.cpp.

References m_pixelSize.

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.

Referenced by Isis::Centroid::getMaxDN(), Isis::Centroid::select(), and Isis::Centroid::setDNRange().

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

Referenced by Isis::Centroid::getMinDN(), Isis::Centroid::select(), and Isis::Centroid::setDNRange().

◆ m_pixelSize

double Isis::CentroidApolloPan::m_pixelSize
private

pixel size in microns

Definition at line 39 of file CentroidApolloPan.h.

Referenced by CentroidApolloPan(), elipticalReduction(), and setPixelSize().


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