|
Isis Developer Reference
|
Go to the documentation of this file.
203 return &p_patternChip;
208 return &p_searchChip;
218 if (p_gradientFilterType ==
None) {
219 return &p_patternChip;
222 return &p_gradientPatternChip;
228 if (p_gradientFilterType ==
None) {
229 return &p_searchChip;
232 return &p_gradientSearchChip;
238 return &p_reducedPatternChip;
243 return &p_reducedSearchChip;
248 return &p_reducedFitChip;
271 return p_subpixelAccuracy;
276 return p_reduceFactor;
281 return p_patternValidPercent;
286 return p_subsearchValidPercent;
301 return p_distanceTolerance;
310 void Distance(
double &sampDistance,
double &lineDistance) {
311 sampDistance = p_sampMovement;
312 lineDistance = p_lineMovement;
324 return p_goodnessOfFit;
327 inline bool IsIdeal(
double fit);
351 return p_minimumPatternZScore;
360 void ZScores(
double &score1,
double &score2)
const {
361 score1 = p_zScoreMin;
362 score2 = p_zScoreMax;
394 p_chipSample = sample;
418 Chip &fChip,
int startSamp,
int startLine,
int endSamp,
int endLine,
419 int bestSamp,
int bestLine);
422 virtual bool CompareFits(
double fit1,
double fit2);
471 void Match(
Chip &sChip,
478 bool ComputeChipZScore(
Chip &chip);
480 void ApplyGradientFilter(
Chip &chip);
481 void SobelGradient(
Buffer &in,
double &v);
486 Chip p_gradientSearchChip;
487 Chip p_gradientPatternChip;
488 Chip p_reducedPatternChip;
489 Chip p_reducedSearchChip;
490 Chip p_reducedFitChip;
492 bool p_subpixelAccuracy;
495 int p_totalRegistrations;
496 int p_pixelSuccesses;
497 int p_subpixelSuccesses;
498 int p_patternChipNotEnoughValidDataCount;
499 int p_patternZScoreNotMetCount;
500 int p_fitChipNoDataCount;
501 int p_fitChipToleranceNotMetCount;
502 int p_surfaceModelNotEnoughValidDataCount;
503 int p_surfaceModelSolutionInvalidCount;
504 int p_surfaceModelDistanceInvalidCount;
509 double p_minimumPatternZScore;
510 double p_patternValidPercent;
511 double p_subsearchValidPercent;
517 double p_goodnessOfFit;
521 double p_distanceTolerance;
526 double p_sampMovement;
527 double p_lineMovement;
const double ValidMaximum
The maximum valid double value for Isis pixels.
Definition: SpecialPixel.h:122
double GoodnessOfFit() const
Return the goodness of fit of the match algorithm.
Definition: AutoReg.h:323
void SetChipSample(double sample)
Sets the search chip subpixel sample that matches the pattern tack sample.
Definition: AutoReg.h:393
virtual ~AutoReg()
Destroy AutoReg object.
Definition: AutoReg.cpp:153
int ReductionFactor()
Return the reduction factor.
Definition: AutoReg.h:275
@ BiLinearType
Definition: Interpolator.h:43
This class is used to accumulate statistics on double arrays.
Definition: Statistics.h:94
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
void AddData(const double *data, const unsigned int count)
Add an array of doubles to the accumulators and counters.
Definition: Statistics.cpp:141
double MinimumZScore() const
Return minimumPatternZScore.
Definition: AutoReg.h:350
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
@ Sobel
Sobel gradient filter.
Definition: AutoReg.h:198
Selection class derived from the Pure Virtual Parent Class for all Selection classes.
Definition: Centroid.h:31
A single keyword-value pair.
Definition: PvlKeyword.h:82
@ None
default, no gradient filter
Definition: AutoReg.h:197
@ CubicConvolutionType
Definition: Interpolator.h:44
void SetSurfaceModelWindowSize(int size)
Set the surface model window size.
Definition: AutoReg.cpp:480
void ZScores(double &score1, double &score2) const
Return the ZScores of the pattern chip.
Definition: AutoReg.h:360
bool SetSubpixelPosition(Chip &window)
Set the search chip sample and line to subpixel values if possible.
Definition: AutoReg.cpp:1087
@ PatternZScoreNotMet
Pattern data max or min does not pass the z-score test.
Definition: AutoReg.h:188
@ AdaptiveAlgorithmFailed
Error occured in Adaptive algorithm.
Definition: AutoReg.h:189
void Parse(Pvl &pvl)
Initialize parameters in the AutoReg class using a PVL specification.
Definition: AutoReg.cpp:194
void SetReductionFactor(int reductionFactor)
Set the reduction factor used to speed up the pattern matching algorithm.
Definition: AutoReg.cpp:521
void SetGoodnessOfFit(double fit)
Sets the goodness of fit for adaptive algorithms.
Definition: AutoReg.h:413
Chip * RegistrationSearchChip()
Return pointer to search chip used in registration.
Definition: AutoReg.h:227
double GetValue(int sample, int line)
Loads a Chip with a value.
Definition: Chip.h:145
double Maximum() const
Returns the absolute maximum double found in all data passed through the AddData method.
Definition: Statistics.cpp:403
bool hasGroup(const QString &name) const
Returns a boolean value based on whether the object has the specified group or not.
Definition: PvlObject.h:210
void Reset()
Reset all accumulators and counters to zero.
Definition: Statistics.cpp:113
double ChipSample() const
Definition: Chip.h:219
AutoReg::RegisterStatus Register()
Walk the pattern chip through the search chip to find the best registration.
Definition: AutoReg.cpp:587
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition: PvlContainer.cpp:159
Container for cube-like labels.
Definition: Pvl.h:119
void SetSubsearchValidPercent(const double percent)
Set the amount of data in the search chip's subchip that must be valid.
Definition: AutoReg.cpp:367
Chip * SearchChip()
Return pointer to search chip.
Definition: AutoReg.h:207
QString GradientFilterString() const
Definition: AutoReg.cpp:289
AutoReg(Pvl &pvl)
Create AutoReg object.
Definition: AutoReg.cpp:66
double CubeSample() const
Definition: Chip.h:203
Chip Extract(int samples, int lines, int samp, int line)
Extract a sub-chip from a chip.
Definition: Chip.cpp:727
virtual QString AlgorithmName() const =0
Returns the name of the algorithm.
void SetValue(int sample, int line, const double &value)
Sets a value in the chip.
Definition: Chip.h:126
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:197
double ChipSample() const
Return the search chip sample that best matched.
Definition: AutoReg.h:330
Auto Registration class.
Definition: AutoReg.h:167
virtual double MatchAlgorithm(Chip &pattern, Chip &subsearch)=0
Given two identically sized chips return a double that indicates how well they match.
void SetGradientFilterType(const QString &gradientFilterType)
Set the gradient filter type to be applied to the search and pattern chips.
Definition: AutoReg.cpp:273
Chip * ReducedSearchChip()
Return pointer to reduced search chip.
Definition: AutoReg.h:242
Buffer for reading and writing cube data.
Definition: Buffer.h:53
PvlGroup UpdatedTemplate()
Returns a PvlGroup containing the PvlKeywords of the parameters this object was most recently run wit...
Definition: AutoReg.cpp:1289
PvlGroup RegTemplate()
This function returns the keywords that this object was created from.
Definition: AutoReg.cpp:1216
int TackSample() const
This method returns a chip's fixed tack sample; the middle of the chip.
Definition: Chip.h:176
void SetTolerance(double tolerance)
Set the tolerance for an acceptable goodness of fit.
Definition: AutoReg.cpp:416
@ SurfaceModelSolutionInvalid
Could not model surface for sub-pixel accuracy.
Definition: AutoReg.h:186
double CubeLine() const
Definition: Chip.h:210
int Lines() const
Definition: Chip.h:106
bool SubPixelAccuracy()
Return whether this object will attempt to register to whole or sub-pixel accuracy.
Definition: AutoReg.h:270
@ SuccessSubPixel
Success registering to sub-pixel accuracy.
Definition: AutoReg.h:181
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
virtual double IdealFit() const =0
Returns the ideal (perfect) fit that could be returned by the MatchAlgorithm.
@ PatternChipNotEnoughValidData
Not enough valid data in pattern chip.
Definition: AutoReg.h:182
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
virtual double MostLenientTolerance()
Minimum tolerance specific to algorithm.
Definition: AutoReg.h:370
int TackLine() const
This method returns a chip's fixed tack line; the middle of the chip.
Definition: Chip.h:187
interpType
The interpolator type, including: None, Nearest Neighbor, BiLinear or Cubic Convultion.
Definition: Interpolator.h:40
double ChipLine() const
Definition: Chip.h:226
double Minimum() const
Returns the absolute minimum double found in all data passed through the AddData method.
Definition: Statistics.cpp:382
double CubeSample() const
Return the search chip cube sample that best matched.
Definition: AutoReg.h:340
double WindowSize() const
Return window size.
Definition: AutoReg.h:295
Chip Reduce(Chip &chip, int reductionFactor)
This method reduces the given chip by the given reduction factor.
Definition: AutoReg.cpp:539
bool IsIdeal(double fit)
Returns true if the fit parameter is arbitrarily close to the ideal fit value.
Definition: AutoReg.cpp:1162
Chip * PatternChip()
Return pointer to pattern chip.
Definition: AutoReg.h:202
Reduce the pixel dimensions of an image.
Definition: Reduce.h:47
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:274
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.
Definition: AutoReg.cpp:811
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.
Definition: AutoReg.cpp:1152
double ZScore(const double value) const
This method returns the better of the z-score of the given value.
Definition: Statistics.cpp:649
QString fileName() const
Returns the filename used to initialise the Pvl object.
Definition: PvlContainer.h:232
@ SurfaceModelDistanceInvalid
Surface model moves registration more than one pixel.
Definition: AutoReg.h:187
Chip * ReducedFitChip()
Return pointer to reduced fit chip.
Definition: AutoReg.h:247
double PatternValidPercent() const
Return pattern chip valid percent. The default value is.
Definition: AutoReg.h:280
Isis exception class.
Definition: IException.h:91
RegisterStatus
Enumeration of the Register() method's return status.
Definition: AutoReg.h:179
double Tolerance() const
Return match algorithm tolerance.
Definition: AutoReg.h:290
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
PvlObject p_template
AutoRegistration object that created this projection.
Definition: AutoReg.h:449
Pvl RegistrationStatistics()
This returns the cumulative registration statistics.
Definition: AutoReg.cpp:1177
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
Definition: PvlObject.h:186
@ FitChipToleranceNotMet
Goodness of fit tolerance not satisfied.
Definition: AutoReg.h:184
double Average() const
Computes and returns the average.
Definition: Statistics.cpp:300
double ChipLine() const
Return the search chip line that best matched.
Definition: AutoReg.h:335
Chip * FitChip()
Return pointer to fit chip.
Definition: AutoReg.h:212
const double ValidMinimum
The minimum valid double value for Isis pixels.
Definition: SpecialPixel.h:87
bool IsValid(int sample, int line)
Definition: Chip.h:240
Namespace for the standard library.
@ SurfaceModelNotEnoughValidData
Not enough points to fit a surface model for sub-pixel accuracy.
Definition: AutoReg.h:185
int setDNRange(double minimumDN, double maximumDN)
Set the range of the DNs.
Definition: Centroid.cpp:126
Chip * ReducedPatternChip()
Return pointer to reduced pattern chip.
Definition: AutoReg.h:237
void SetSubPixelAccuracy(bool on)
If the sub-pixel accuracy is enabled, the Register() method will attempt to match the pattern chip to...
Definition: AutoReg.cpp:312
@ FitChipNoData
Fit chip did not have any valid data.
Definition: AutoReg.h:183
A small chip of data used for pattern matching.
Definition: Chip.h:86
int Samples() const
Definition: Chip.h:99
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 w...
Definition: Centroid.cpp:30
double CubeLine() const
Return the search chip cube line that best matched.
Definition: AutoReg.h:345
int centerOfMassWeighted(Chip *inputChip, Chip *selectionChip, double *sample, double *line)
Definition: Selection.cpp:189
void Distance(double &sampDistance, double &lineDistance)
Return the distance point moved.
Definition: AutoReg.h:310
Adds specific functionality to C++ strings.
Definition: IString.h:165
void SetChipPosition(const double sample, const double line)
Compute the position of the cube given a chip coordinate.
Definition: Chip.cpp:643
virtual Pvl AlgorithmStatistics(Pvl &pvl)
Provide (adaptive) algorithms a chance to report results.
Definition: AutoReg.h:461
void SetChipLine(double line)
Sets the search chip subpixel line that matches the pattern tack line.
Definition: AutoReg.h:404
double SubsearchValidPercent() const
Return subsearch chip valid percent.
Definition: AutoReg.h:285
void SetPatternZScoreMinimum(double minimum)
Set the minimum pattern zscore.
Definition: AutoReg.cpp:394
bool Success() const
Return whether the match algorithm succeeded or not.
Definition: AutoReg.h:318
@ NearestNeighborType
Definition: Interpolator.h:42
void SetChipInterpolator(const QString &interpolator)
Sets the Chip class interpolator type to be used to load pattern and search chips.
Definition: AutoReg.cpp:440
void SetPatternValidPercent(const double percent)
Set the amount of data in the pattern chip that must be valid.
Definition: AutoReg.cpp:339
@ SuccessPixel
Success registering to whole pixel.
Definition: AutoReg.h:180
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Chip * RegistrationPatternChip()
Return pointer to pattern chip used in registration.
Definition: AutoReg.h:217
void SetSurfaceModelDistanceTolerance(double distance)
Set a distance the surface model solution is allowed to move away from the best whole pixel fit in th...
Definition: AutoReg.cpp:501
GradientFilterType
Enumeration of the different types of gradient filters that can be applied to the pattern and search ...
Definition: AutoReg.h:196
double DistanceTolerance() const
Return distance tolerance.
Definition: AutoReg.h:300
@ None
Definition: PixelType.h:28