Isis Developer Reference
Isis::AutoReg Class Referenceabstract

Auto Registration class. More...

#include <AutoReg.h>

Inheritance diagram for Isis::AutoReg:
Inheritance graph
Collaboration diagram for Isis::AutoReg:
Collaboration graph

Public Types

enum  RegisterStatus {
  SuccessPixel , SuccessSubPixel , PatternChipNotEnoughValidData , FitChipNoData ,
  FitChipToleranceNotMet , SurfaceModelNotEnoughValidData , SurfaceModelSolutionInvalid , SurfaceModelDistanceInvalid ,
  PatternZScoreNotMet , AdaptiveAlgorithmFailed
}
 Enumeration of the Register() method's return status. More...
 
enum  GradientFilterType { None , Sobel }
 Enumeration of the different types of gradient filters that can be applied to the pattern and search chips before matching them. More...
 

Public Member Functions

 AutoReg (Pvl &pvl)
 Create AutoReg object.
 
virtual ~AutoReg ()
 Destroy AutoReg object.
 
ChipPatternChip ()
 Return pointer to pattern chip.
 
ChipSearchChip ()
 Return pointer to search chip.
 
ChipFitChip ()
 Return pointer to fit chip.
 
ChipRegistrationPatternChip ()
 Return pointer to pattern chip used in registration.
 
ChipRegistrationSearchChip ()
 Return pointer to search chip used in registration.
 
ChipReducedPatternChip ()
 Return pointer to reduced pattern chip.
 
ChipReducedSearchChip ()
 Return pointer to reduced search chip.
 
ChipReducedFitChip ()
 Return pointer to reduced fit chip.
 
void SetSubPixelAccuracy (bool on)
 If the sub-pixel accuracy is enabled, the Register() method will attempt to match the pattern chip to the search chip at sub-pixel accuracy, otherwise it will be registered at whole pixel accuracy.
 
void SetPatternValidPercent (const double percent)
 Set the amount of data in the pattern chip that must be valid.
 
void SetSubsearchValidPercent (const double percent)
 Set the amount of data in the search chip's subchip that must be valid.
 
void SetTolerance (double tolerance)
 Set the tolerance for an acceptable goodness of fit.
 
void SetChipInterpolator (const QString &interpolator)
 Sets the Chip class interpolator type to be used to load pattern and search chips.
 
void SetSurfaceModelWindowSize (int size)
 Set the surface model window size.
 
void SetSurfaceModelDistanceTolerance (double distance)
 Set a distance the surface model solution is allowed to move away from the best whole pixel fit in the fit chip.
 
void SetReductionFactor (int reductionFactor)
 Set the reduction factor used to speed up the pattern matching algorithm.
 
void SetPatternZScoreMinimum (double minimum)
 Set the minimum pattern zscore.
 
void SetGradientFilterType (const QString &gradientFilterType)
 Set the gradient filter type to be applied to the search and pattern chips.
 
QString GradientFilterString () const
 
bool SubPixelAccuracy ()
 Return whether this object will attempt to register to whole or sub-pixel accuracy.
 
int ReductionFactor ()
 Return the reduction factor.
 
double PatternValidPercent () const
 Return pattern chip valid percent. The default value is.
 
double SubsearchValidPercent () const
 Return subsearch chip valid percent.
 
double Tolerance () const
 Return match algorithm tolerance.
 
double WindowSize () const
 Return window size.
 
double DistanceTolerance () const
 Return distance tolerance.
 
void Distance (double &sampDistance, double &lineDistance)
 Return the distance point moved.
 
AutoReg::RegisterStatus Register ()
 Walk the pattern chip through the search chip to find the best registration.
 
bool Success () const
 Return whether the match algorithm succeeded or not.
 
double GoodnessOfFit () const
 Return the goodness of fit of the match algorithm.
 
bool IsIdeal (double fit)
 Returns true if the fit parameter is arbitrarily close to the ideal fit value.
 
double ChipSample () const
 Return the search chip sample that best matched.
 
double ChipLine () const
 Return the search chip line that best matched.
 
double CubeSample () const
 Return the search chip cube sample that best matched.
 
double CubeLine () const
 Return the search chip cube line that best matched.
 
double MinimumZScore () const
 Return minimumPatternZScore.
 
void ZScores (double &score1, double &score2) const
 Return the ZScores of the pattern chip.
 
Pvl RegistrationStatistics ()
 This returns the cumulative registration statistics.
 
virtual double MostLenientTolerance ()
 Minimum tolerance specific to algorithm.
 
virtual QString AlgorithmName () const =0
 Returns the name of the algorithm.
 
PvlGroup RegTemplate ()
 This function returns the keywords that this object was created from.
 
PvlGroup UpdatedTemplate ()
 Returns a PvlGroup containing the PvlKeywords of the parameters this object was most recently run with.
 

Protected Member Functions

void SetChipSample (double sample)
 Sets the search chip subpixel sample that matches the pattern tack sample.
 
void SetChipLine (double line)
 Sets the search chip subpixel line that matches the pattern tack line.
 
void SetGoodnessOfFit (double fit)
 Sets the goodness of fit for adaptive algorithms.
 
virtual AutoReg::RegisterStatus Registration (Chip &sChip, Chip &pChip, Chip &fChip, int startSamp, int startLine, int endSamp, int endLine, int bestSamp, int bestLine)
 Performs matching between the pattern and search at both whole-pixel and subpixel levels.
 
void Parse (Pvl &pvl)
 Initialize parameters in the AutoReg class using a PVL specification.
 
virtual bool CompareFits (double fit1, double fit2)
 This virtual method must return if the 1st fit is equal to or better than the second fit.
 
bool SetSubpixelPosition (Chip &window)
 Set the search chip sample and line to subpixel values if possible.
 
Chip Reduce (Chip &chip, int reductionFactor)
 This method reduces the given chip by the given reduction factor.
 
virtual double IdealFit () const =0
 Returns the ideal (perfect) fit that could be returned by the MatchAlgorithm.
 
virtual double MatchAlgorithm (Chip &pattern, Chip &subsearch)=0
 Given two identically sized chips return a double that indicates how well they match.
 
virtual Pvl AlgorithmStatistics (Pvl &pvl)
 Provide (adaptive) algorithms a chance to report results.
 

Protected Attributes

PvlObject p_template
 AutoRegistration object that created this projection.
 

Detailed Description

Auto Registration class.

Create AutoReg object. Because this is a pure virtual class you can not create an AutoReg class directly. Instead, see the AutoRegFactory class.

See also
AutoRegFactory MaximumCorrelation MinimumDifference
Author
????-??-?? Unknown

Member Enumeration Documentation

◆ GradientFilterType

Enumeration of the different types of gradient filters that can be applied to the pattern and search chips before matching them.

Enumerator
None 

default, no gradient filter

Sobel 

Sobel gradient filter.

◆ RegisterStatus

Enumeration of the Register() method's return status.

All of the enumerations describe a failure to register except "Success". These status values can be used to provide the user with more specific feedback on why registration did not succeed.

Enumerator
SuccessPixel 

Success registering to whole pixel.

SuccessSubPixel 

Success registering to sub-pixel accuracy.

PatternChipNotEnoughValidData 

Not enough valid data in pattern chip.

FitChipNoData 

Fit chip did not have any valid data.

FitChipToleranceNotMet 

Goodness of fit tolerance not satisfied.

SurfaceModelNotEnoughValidData 

Not enough points to fit a surface model for sub-pixel accuracy.

SurfaceModelSolutionInvalid 

Could not model surface for sub-pixel accuracy.

SurfaceModelDistanceInvalid 

Surface model moves registration more than one pixel.

PatternZScoreNotMet 

Pattern data max or min does not pass the z-score test.

AdaptiveAlgorithmFailed 

Error occured in Adaptive algorithm.

Constructor & Destructor Documentation

◆ AutoReg()

Isis::AutoReg::AutoReg ( Pvl & pvl)

Create AutoReg object.

Because this is a pure virtual class you can not create an AutoReg class directly. Instead, see the AutoRegFactory class. The default settings include:

  • PatternChip
    • Samples = 3
    • Lines = 3
    • ValidPercent = 50.0
    • MinimumZScore = 1.0
  • SearchChip
    • Samples = 5
    • Lines = 5
    • SubchipValidPercent = 50.0
  • FitChip
    • Samples = 5
    • Lines = 5
  • Algorithm
    • Tolerance = Isis::Null
    • SubpixelAccuracy = True
    • ReductionFactor = 1
  • SurfaceModel
    • DistanceTolerance = 1.5
    • WindowSize = 5

The reduced chips are initially set to the same size as their corresponding chips in the constructor.

Parameters
pvlA pvl object containing a valid AutoReg specification
See also
patternMatch.doc under the coreg application

References Isis::PvlObject::findObject(), None, Isis::Null, p_template, Parse(), SetPatternValidPercent(), SetPatternZScoreMinimum(), SetReductionFactor(), Isis::Chip::SetSize(), SetSubPixelAccuracy(), SetSubsearchValidPercent(), SetSurfaceModelDistanceTolerance(), SetSurfaceModelWindowSize(), and SetTolerance().

◆ ~AutoReg()

Isis::AutoReg::~AutoReg ( )
virtual

Destroy AutoReg object.

Member Function Documentation

◆ AlgorithmName()

virtual QString Isis::AutoReg::AlgorithmName ( ) const
pure virtual

Returns the name of the algorithm.

Returns
QString

Implemented in Isis::AdaptiveGruen, Isis::Gruen, Isis::MaximumCorrelation, and Isis::MinimumDifference.

Referenced by UpdatedTemplate().

◆ AlgorithmStatistics()

virtual Pvl Isis::AutoReg::AlgorithmStatistics ( Pvl & pvl)
inlineprotectedvirtual

Provide (adaptive) algorithms a chance to report results.

Provide Adaptive objects the opportunity to report behavior. It is called at the final step prior to program termination.

Parameters
pvlPvl structure to add report to
Returns
Pvl Results

Reimplemented in Isis::Gruen.

Referenced by RegistrationStatistics().

◆ ChipLine()

double Isis::AutoReg::ChipLine ( ) const
inline

Return the search chip line that best matched.

◆ ChipSample()

double Isis::AutoReg::ChipSample ( ) const
inline

Return the search chip sample that best matched.

◆ CompareFits()

bool Isis::AutoReg::CompareFits ( double fit1,
double fit2 )
protectedvirtual

This virtual method must return if the 1st fit is equal to or better than the second fit.

Parameters
fit11st goodness of fit
fit22nd goodness of fit
Returns
bool Indicates whether the first fit is as good or better than the second

Reimplemented in Isis::Gruen, Isis::MaximumCorrelation, and Isis::MinimumDifference.

References IdealFit().

Referenced by Registration().

◆ CubeLine()

double Isis::AutoReg::CubeLine ( ) const
inline

Return the search chip cube line that best matched.

◆ CubeSample()

double Isis::AutoReg::CubeSample ( ) const
inline

Return the search chip cube sample that best matched.

◆ Distance()

void Isis::AutoReg::Distance ( double & sampDistance,
double & lineDistance )
inline

Return the distance point moved.

Parameters
sampDistanceSample movement
lineDistanceLine movement

◆ DistanceTolerance()

double Isis::AutoReg::DistanceTolerance ( ) const
inline

Return distance tolerance.

Referenced by UpdatedTemplate().

◆ FitChip()

Chip * Isis::AutoReg::FitChip ( )
inline

◆ GoodnessOfFit()

double Isis::AutoReg::GoodnessOfFit ( ) const
inline

Return the goodness of fit of the match algorithm.

◆ GradientFilterString()

QString Isis::AutoReg::GradientFilterString ( ) const

◆ IdealFit()

virtual double Isis::AutoReg::IdealFit ( ) const
protectedpure virtual

Returns the ideal (perfect) fit that could be returned by the MatchAlgorithm.

Returns
double

Implemented in Isis::Gruen, Isis::MaximumCorrelation, and Isis::MinimumDifference.

Referenced by CompareFits(), and IsIdeal().

◆ IsIdeal()

bool Isis::AutoReg::IsIdeal ( double fit)
inline

Returns true if the fit parameter is arbitrarily close to the ideal fit value.

Parameters
fitFit value to be compared to the ideal fit
Returns
bool Indicates whether the fit is ideal

References IdealFit().

Referenced by Registration().

◆ MatchAlgorithm()

virtual double Isis::AutoReg::MatchAlgorithm ( Chip & pattern,
Chip & subsearch )
protectedpure virtual

Given two identically sized chips return a double that indicates how well they match.

For example, a correlation match algorithm would return a correlation coefficient ranging from -1 to 1.

Parameters
patternPattern chip to match against
subsearchSubchip of the search chip to match with
Returns
double

Implemented in Isis::Gruen, Isis::MaximumCorrelation, and Isis::MinimumDifference.

◆ MinimumZScore()

double Isis::AutoReg::MinimumZScore ( ) const
inline

Return minimumPatternZScore.

Referenced by UpdatedTemplate().

◆ MostLenientTolerance()

virtual double Isis::AutoReg::MostLenientTolerance ( )
inlinevirtual

Minimum tolerance specific to algorithm.

Reimplemented in Isis::MinimumDifference.

◆ Parse()

void Isis::AutoReg::Parse ( Pvl & pvl)
protected

Initialize parameters in the AutoReg class using a PVL specification.

An example of the PVL required for this is:

Object = AutoRegistration
Group = Algorithm
Tolerance = 0.7
EndGroup
Group = PatternChip
Samples = 21
Lines = 21
EndGroup
Group = SearchChip
Samples = 51
Lines = 51
EndGroup
EndObject
Chip * SearchChip()
Return pointer to search chip.
Definition AutoReg.h:207
Chip * PatternChip()
Return pointer to pattern chip.
Definition AutoReg.h:202
double Tolerance() const
Return match algorithm tolerance.
Definition AutoReg.h:290
Maximum correlation pattern matching.
Definition MaximumCorrelation.h:36

There are many other options that can be set via the pvl and are described in other documentation (see below).

See also
patternMatch.doc under the coreg application
Parameters
pvlThe pvl object containing the specification
Exceptions
iException::User"Improper format for AutoReg PVL."

References _FILEINFO_, Isis::PvlObject::findObject(), PatternChip(), SearchChip(), SetChipInterpolator(), SetGradientFilterType(), SetPatternValidPercent(), SetPatternZScoreMinimum(), SetReductionFactor(), Isis::Chip::SetSize(), SetSubPixelAccuracy(), SetSubsearchValidPercent(), SetSurfaceModelDistanceTolerance(), SetSurfaceModelWindowSize(), SetTolerance(), Isis::Chip::SetValidRange(), Isis::PvlObject::Traverse, Isis::IException::User, Isis::ValidMaximum, and Isis::ValidMinimum.

Referenced by AutoReg().

◆ PatternChip()

Chip * Isis::AutoReg::PatternChip ( )
inline

Return pointer to pattern chip.

Referenced by Parse(), and UpdatedTemplate().

◆ PatternValidPercent()

double Isis::AutoReg::PatternValidPercent ( ) const
inline

Return pattern chip valid percent. The default value is.

Referenced by Isis::MaximumCorrelation::MatchAlgorithm(), and UpdatedTemplate().

◆ Reduce()

Chip Isis::AutoReg::Reduce ( Chip & chip,
int reductionFactor )
protected

This method reduces the given chip by the given reduction factor.

Used to speed up the match algorithm.

Parameters
chipChip to be reduced
reductionFactorFactor by which to reduce chip.
Returns
Chip Reduced chip object

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

Referenced by Register().

◆ ReducedFitChip()

Chip * Isis::AutoReg::ReducedFitChip ( )
inline

Return pointer to reduced fit chip.

◆ ReducedPatternChip()

Chip * Isis::AutoReg::ReducedPatternChip ( )
inline

Return pointer to reduced pattern chip.

◆ ReducedSearchChip()

Chip * Isis::AutoReg::ReducedSearchChip ( )
inline

Return pointer to reduced search chip.

◆ ReductionFactor()

int Isis::AutoReg::ReductionFactor ( )
inline

Return the reduction factor.

Referenced by UpdatedTemplate().

◆ Register()

AutoReg::RegisterStatus Isis::AutoReg::Register ( )

Walk the pattern chip through the search chip to find the best registration.

Returns
AutoReg::RegisterStatus Returns the status of the registration.
Exceptions
iException::User- "Search chips samples must be at least N pixels wider than the pattern chip samples for successful surface modeling"
iException::User- "Search chips lines must be at least N pixels taller than the pattern chip lines for successful surface modeling"
iException::User- "Reduction factor is too large"

References _FILEINFO_, FitChipNoData, Isis::Chip::Lines(), None, Isis::Null, PatternChipNotEnoughValidData, PatternZScoreNotMet, Reduce(), Registration(), Isis::Chip::Samples(), Isis::Chip::SetChipPosition(), Isis::Chip::SetSize(), Isis::Chip::SetValue(), Success(), SuccessSubPixel, and Isis::IException::User.

◆ Registration()

AutoReg::RegisterStatus Isis::AutoReg::Registration ( Chip & sChip,
Chip & pChip,
Chip & fChip,
int startSamp,
int startLine,
int endSamp,
int endLine,
int bestSamp,
int bestLine )
protectedvirtual

Performs matching between the pattern and search at both whole-pixel and subpixel levels.

For adaptive algorithms, only subpixel matching occurs. Such algorithms override this method to use their alternative matching procedures.

For those algorithms that need it, the best sample and line in the search chip is provided. This is either the initial tack sample and line in the search chip or it is the centered sample and line after the reduction algorithm is applied (KJB, 2009-08-26).

Author
janderson (6/2/2009)
Parameters
sChipSearch chip
pChipPattern chip
fChipFit chip
startSampDefines the starting sample of the window the algorithm should remain inside this boundary.
startLineDefines the starting line of the window the algorithm should remain inside this boundary.
endSampDefines the ending sample of the window the algorithm should remain inside this boundary.
endLineDefines the ending line of the window the algorithm should remain inside this boundary.
bestSampBest sample
bestLineBest line
Returns
AutoReg::RegisterStatus Status of match

Reimplemented in Isis::Gruen.

References CompareFits(), FitChipNoData, FitChipToleranceNotMet, IsIdeal(), Isis::Null, SetSubpixelPosition(), SuccessPixel, SuccessSubPixel, SurfaceModelDistanceInvalid, SurfaceModelNotEnoughValidData, SurfaceModelSolutionInvalid, and Tolerance().

Referenced by Register().

◆ RegistrationPatternChip()

Chip * Isis::AutoReg::RegistrationPatternChip ( )
inline

Return pointer to pattern chip used in registration.

References None.

Referenced by Isis::ControlMeasureEditWidget::saveChips(), and Isis::ControlPointEdit::saveChips().

◆ RegistrationSearchChip()

Chip * Isis::AutoReg::RegistrationSearchChip ( )
inline

Return pointer to search chip used in registration.

References None.

Referenced by Isis::ControlMeasureEditWidget::saveChips(), and Isis::ControlPointEdit::saveChips().

◆ RegistrationStatistics()

Pvl Isis::AutoReg::RegistrationStatistics ( )

This returns the cumulative registration statistics.

That is, the Register() method accumulates statistics regard the errors each time is called. Invoking this method returns a PVL summary of those statisitics

Author
janderson (3/26/2009)
Returns
Pvl

References AlgorithmStatistics(), and Isis::toString().

◆ RegTemplate()

PvlGroup Isis::AutoReg::RegTemplate ( )

This function returns the keywords that this object was created from.

Returns
PvlGroup The keywords this object used in initialization

References Isis::PvlObject::findGroup(), Isis::PvlObject::hasGroup(), p_template, SetPatternValidPercent(), SetSubsearchValidPercent(), and Isis::PvlObject::Traverse.

◆ SearchChip()

Chip * Isis::AutoReg::SearchChip ( )
inline

Return pointer to search chip.

Referenced by Parse(), and UpdatedTemplate().

◆ SetChipInterpolator()

void Isis::AutoReg::SetChipInterpolator ( const QString & interpolator)

Sets the Chip class interpolator type to be used to load pattern and search chips.

Acceptable values for the interpolator parameter include:

  • NearestNeighborType
  • BiLinearType
  • CubicConvolutionType

If this method is not called, the chip interpolator type defaults to CubicConvolutionType in the Chip class.

Parameters
interpolatorName of interpolator type to be used. This is taken from the Pvl's ChipInterpolator keyword value.
Exceptions
iException::User- "Invalid Interpolator type."
Author
Jeannie Walldren

References _FILEINFO_, Isis::Interpolator::BiLinearType, Isis::Interpolator::CubicConvolutionType, Isis::Interpolator::NearestNeighborType, Isis::Chip::SetReadInterpolator(), and Isis::IException::User.

Referenced by Parse().

◆ SetChipLine()

void Isis::AutoReg::SetChipLine ( double line)
inlineprotected

Sets the search chip subpixel line that matches the pattern tack line.

Parameters
lineValue to set for search chip subpixel line

Referenced by Isis::Gruen::Registration().

◆ SetChipSample()

void Isis::AutoReg::SetChipSample ( double sample)
inlineprotected

Sets the search chip subpixel sample that matches the pattern tack sample.

Parameters
sampleValue to set for search chip subpixel sample

Referenced by Isis::Gruen::Registration().

◆ SetGoodnessOfFit()

void Isis::AutoReg::SetGoodnessOfFit ( double fit)
inlineprotected

Sets the goodness of fit for adaptive algorithms.

Parameters
fitFit value to set

Referenced by Isis::Gruen::Registration().

◆ SetGradientFilterType()

void Isis::AutoReg::SetGradientFilterType ( const QString & gradientFilterType)

Set the gradient filter type to be applied to the search and pattern chips.

Parameters
gradientFilterTypethe gradient filter type to use
Exceptions
iException::User- "Invalid Gradient type."

References _FILEINFO_, None, Sobel, and Isis::IException::User.

Referenced by Parse().

◆ SetPatternValidPercent()

void Isis::AutoReg::SetPatternValidPercent ( const double percent)

Set the amount of data in the pattern chip that must be valid.

For example, a 21x21 pattern chip has 441 pixels. If percent is 75 then at least 330 pixels pairs must be valid in order for a comparision between the pattern and search sub-region to occur. That is, both the pattern pixel and search pixel must be valid to be counted. Pixels are considered valid based on the min/max range specified on each of the Chips (see Chip::SetValidRange method).

If the pattern chip reduction option is used this percentage will apply to all reduced patterns. Additionally, the pattern sampling effects the pixel count. For example if pattern sampling is 50% then only 220 pixels in the 21x21 pattern are considered so 165 must be valid.

If this method is not called, the PatternChip ValidPercent defaults to 50 in the AutoReg object constructor.

See also
SetValidRange()
Parameters
percentPercentage of valid data between 0 and 100, default is 50% if never invoked
Exceptions
iException::User- "Invalid value for PatternChip ValidPercent."

References _FILEINFO_, and Isis::IException::User.

Referenced by AutoReg(), Parse(), and RegTemplate().

◆ SetPatternZScoreMinimum()

void Isis::AutoReg::SetPatternZScoreMinimum ( double minimum)

Set the minimum pattern zscore.

This option is used to ignore pattern chips which are bland (low standard deviation). If the minimum or maximum pixel value in the pattern chip does not meet the minimum zscore value (see a statisitcs book for definition of zscore) then invalid registration will occur.

If this method is not called, the z-score minimum defaults to 1.0 in the AutoReg object constructor.

Parameters
minimumThe minimum zscore value for the pattern chip. Default is 1.0
Exceptions
iException::User- "Invalid value for PatternChip MinimumZScore."

References _FILEINFO_, and Isis::IException::User.

Referenced by AutoReg(), and Parse().

◆ SetReductionFactor()

void Isis::AutoReg::SetReductionFactor ( int factor)

Set the reduction factor used to speed up the pattern matching algorithm.

If this method is not called, the reduction factor defaults to 1 in the AutoReg object constructor.

Parameters
factorReduction factor. Must be greater than or equal to 1.
Exceptions
iException::User- "Invalid value for Algorithm ReductionFactor."

References _FILEINFO_, and Isis::IException::User.

Referenced by AutoReg(), and Parse().

◆ SetSubPixelAccuracy()

void Isis::AutoReg::SetSubPixelAccuracy ( bool on)

If the sub-pixel accuracy is enabled, the Register() method will attempt to match the pattern chip to the search chip at sub-pixel accuracy, otherwise it will be registered at whole pixel accuracy.

If this method is not called, the sub pixel accuracy defaults to on = true in the AutoReg object constructor.

Parameters
onSet the state of registration accuracy. The default is sub-pixel accuracy is on

Referenced by AutoReg(), and Parse().

◆ SetSubpixelPosition()

bool Isis::AutoReg::SetSubpixelPosition ( Chip & window)
protected

Set the search chip sample and line to subpixel values if possible.

This method uses a centroiding method to gravitate the whole pixel best fit to a subpixel extremum in the continuous image space. The weights of the centers of gravity in the centroiding algorithm are modeled by goodness of fit values within a discrete search window.

Parameters
windowThe search window extracted from the fit chip
Returns
bool Returns true if the subpixel solution is valid

References Isis::Centroid::setDNRange().

Referenced by Registration().

◆ SetSubsearchValidPercent()

void Isis::AutoReg::SetSubsearchValidPercent ( const double percent)

Set the amount of data in the search chip's subchip that must be valid.

If this method is not called, the SearchChip SubchipValidPercent defaults to 50 in the AutoReg object constructor.

Parameters
percentPercentage of valid data between 0 and 100, default is 50% if never invoked
See also
SetPatternValidPercent()
Exceptions
iException::User- "Invalid value for SearchChip SubchipValidPercent."

References _FILEINFO_, and Isis::IException::User.

Referenced by AutoReg(), Parse(), and RegTemplate().

◆ SetSurfaceModelDistanceTolerance()

void Isis::AutoReg::SetSurfaceModelDistanceTolerance ( double distance)

Set a distance the surface model solution is allowed to move away from the best whole pixel fit in the fit chip.

If this method is not called, the distance tolerance defaults to 1.5 in the AutoReg object constructor.

Parameters
distanceThe distance allowed to move in pixels. Must be greater than 0.
Exceptions
iException::User- "Invalid value for SurfaceModel DistanceTolerance."

References _FILEINFO_, and Isis::IException::User.

Referenced by AutoReg(), and Parse().

◆ SetSurfaceModelWindowSize()

void Isis::AutoReg::SetSurfaceModelWindowSize ( int size)

Set the surface model window size.

The pixels in this window will be used to fit a surface model in order to compute sub-pixel accuracy. In some cases the default (3x3) and produces erroneous sub-pixel accuracy values.

If this method is not called, the window size defaults to 5 in the AutoReg object constructor.

Parameters
sizeThe size of the window must be three or greater and odd.
Exceptions
iException::User- "Invalid value for SurfaceModel WindowSize."

References _FILEINFO_, and Isis::IException::User.

Referenced by AutoReg(), and Parse().

◆ SetTolerance()

void Isis::AutoReg::SetTolerance ( double tolerance)

Set the tolerance for an acceptable goodness of fit.

If this method is not called, the tolerance value defaults to Isis::Null in the AutoReg object constructor.

Parameters
toleranceThis tolerance is used to test against the goodness of fit returned by the MatchAlgorith method after a surface model has been fit. See TestGoodnessOfFit

Referenced by AutoReg(), and Parse().

◆ SubPixelAccuracy()

bool Isis::AutoReg::SubPixelAccuracy ( )
inline

Return whether this object will attempt to register to whole or sub-pixel accuracy.

Returns
on Is sub-pixel accuracy enabled?

Referenced by UpdatedTemplate().

◆ SubsearchValidPercent()

double Isis::AutoReg::SubsearchValidPercent ( ) const
inline

Return subsearch chip valid percent.

Referenced by UpdatedTemplate().

◆ Success()

bool Isis::AutoReg::Success ( ) const
inline

Return whether the match algorithm succeeded or not.

References SuccessPixel, and SuccessSubPixel.

Referenced by Register().

◆ Tolerance()

double Isis::AutoReg::Tolerance ( ) const
inline

Return match algorithm tolerance.

Referenced by Registration(), and UpdatedTemplate().

◆ UpdatedTemplate()

PvlGroup Isis::AutoReg::UpdatedTemplate ( )

Returns a PvlGroup containing the PvlKeywords of the parameters this object was most recently run with.

Because of publically accessible mutators, AutoReg's runtime parameters can change, and this version of the template is designed to reflect the paramters it was actually run with, as opposed to simply initialized with. If no mutators were ever called externally, then this PvlGroup should be the same as the one received from RegTemplate().

Returns
PvlGroup The keywords this object was most recently run with

References AlgorithmName(), DistanceTolerance(), GradientFilterString(), MinimumZScore(), PatternChip(), PatternValidPercent(), ReductionFactor(), SearchChip(), SubPixelAccuracy(), SubsearchValidPercent(), Tolerance(), Isis::toString(), and WindowSize().

◆ WindowSize()

double Isis::AutoReg::WindowSize ( ) const
inline

Return window size.

Referenced by UpdatedTemplate().

◆ ZScores()

void Isis::AutoReg::ZScores ( double & score1,
double & score2 ) const
inline

Return the ZScores of the pattern chip.

Parameters
score1First Z Score
score2Second Z Score

Member Data Documentation

◆ p_template

PvlObject Isis::AutoReg::p_template
protected

AutoRegistration object that created this projection.

Referenced by AutoReg(), and RegTemplate().


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