USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::InterestOperator Class Reference

#include <InterestOperator.h>

Inheritance diagram for Isis::InterestOperator:

Inheritance graph
[legend]
Collaboration diagram for Isis::InterestOperator:

Collaboration graph
[legend]
List of all members.

Detailed Description

Interest Operator class.

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

See also:
StandardDeviationOperator GradientOperator

For internal use only.

History:
2006-02-11 Jacob Danton - Original Version
History:
2007-08-02 Steven Koechle - Added better documentation to CompareInterests().
History:
2007-08-02 Steven Koechle - Fixed looping error that caused subchip to go outside the chip to the left and top, and not check the bottom and right.
History:
2007-08-14 Steven Koechle - Added virtual method Padding() which default returns 0.
History:
2007-08-16 Steven Koechle - Fixed Looping error in Operate. Made the loops <= instead of just <. Changed from accepting one delta to accepting a deltaSamp and a deltaLine.
History:
2008-06-18 Stuart Sides - Fixed doc error
History:
2008-08-19 Steven Koechle - Updated to work with Geos3.0.0
History:
2009-08-11 Travis Addair - Added functionality allowing it and all its subclasses to return the pvl group that they were initialized from

Definition at line 67 of file InterestOperator.h.

Public Member Functions

 InterestOperator (Pvl &pvl)
 Create InterestOperator object.
virtual ~InterestOperator ()
 Destroy InterestOperator object.
void SetPatternValidPercent (const double percent)
void SetPatternSampling (const double percent)
void SetSearchSampling (const double percent)
void SetTolerance (double tolerance)
void SetPatternReduction (std::vector< int > samples, std::vector< int > lines)
std::string operatorName () const
 Return name of the matching operator.
bool Operate (Cube &cube, int sample, int line)
 Walk the pattern chip through the search chip to find the best interest.
double InterestAmount () const
 Return the goodness of fit of the match operator.
double CubeSample () const
 Return the search chip cube sample that best matched.
double CubeLine () const
 Return the search chip cube line that best matched.
virtual bool CompareInterests (double int1, double int2)
 This virtual method must return if the 1st fit is equal to or better than the second fit.
void AddGroup (Isis::PvlObject &obj)
double WorstInterest ()
void SetClipPolygon (const geos::geom::MultiPolygon &clipPolygon)
 Sets the clipping polygon for the chip.
Isis::PvlGroup Operator ()
 This function returns the keywords that this object was created from.

Protected Member Functions

void Parse (Pvl &pvl)
 Create an InterestOperator object using a PVL specification.
virtual double Interest (Chip &subCube)=0
bool InRange (double value)
virtual int Padding ()
 Sets an offset to pass in larger chips if operator requires it This is used to offset the subchip size passed into Interest.

Protected Attributes

double p_minimumDN
double p_maximumDN
double p_worstInterest
double p_interestAmount
geos::geom::MultiPolygon * p_clipPolygon
 clipping polygon set by SetClipPolygon (line,samp)
Isis::PvlGroup p_operator
 Operator group that created this projection.

Private Attributes

double p_cubeSample
double p_cubeLine
double p_minimumInterest
std::string p_operatorName
int p_deltaSamp
int p_deltaLine
int p_lines
int p_samples


Constructor & Destructor Documentation

Isis::InterestOperator::InterestOperator ( Pvl pvl  ) 

Create InterestOperator object.

Because this is a pure virtual class you can not create an InterestOperator class directly. Instead, see the InterestOperatorFactory class.

Parameters:
pvl A pvl object containing a valid InterestOperator specification
See also:
automaticRegistration.doc

Definition at line 21 of file InterestOperator.cpp.

References p_clipPolygon, p_deltaLine, p_deltaSamp, p_interestAmount, p_lines, p_operator, p_operatorName, p_samples, p_worstInterest, Parse(), pvl(), and Isis::PvlObject::Traverse.

Isis::InterestOperator::~InterestOperator (  )  [virtual]

Destroy InterestOperator object.

Definition at line 38 of file InterestOperator.cpp.

References p_clipPolygon.


Member Function Documentation

bool Isis::InterestOperator::CompareInterests ( double  int1,
double  int2 
) [virtual]

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

Parameters:
int1 1st interestAmount
int2 2nd interestAmount

Definition at line 156 of file InterestOperator.cpp.

Referenced by Operate().

double Isis::InterestOperator::CubeLine (  )  const [inline]

Return the search chip cube line that best matched.

Definition at line 90 of file InterestOperator.h.

References p_cubeLine.

double Isis::InterestOperator::CubeSample (  )  const [inline]

Return the search chip cube sample that best matched.

Definition at line 87 of file InterestOperator.h.

References p_cubeSample.

double Isis::InterestOperator::InterestAmount (  )  const [inline]

Return the goodness of fit of the match operator.

Definition at line 84 of file InterestOperator.h.

References p_interestAmount.

bool Isis::InterestOperator::Operate ( Cube cube,
int  sample,
int  line 
)

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

Parameters:
cube [in] The Isis::Cube to look for an interesting area in
sample [in] The sample postion in the cube where the chip is located
line [in] The line postion in the cube where the chip is located
Returns:
Returns the status of the operation. The following conditions can occur true=Success, false=Failed

Definition at line 106 of file InterestOperator.cpp.

References CompareInterests(), cube, Isis::Chip::CubeLine(), Isis::Chip::CubeSample(), dist, Isis::Chip::Extract(), Isis::Chip::Load(), Isis::Null, p_clipPolygon, p_cubeLine, p_cubeSample, p_deltaLine, p_deltaSamp, p_interestAmount, p_lines, p_minimumInterest, p_samples, Padding(), Isis::Chip::SetChipPosition(), Isis::Chip::SetClipPolygon(), and Isis::Chip::TackCube().

PvlGroup Isis::InterestOperator::Operator (  ) 

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

Returns:
PvlGroup The keywords this object used in initialization

Definition at line 196 of file InterestOperator.cpp.

References p_operator.

std::string Isis::InterestOperator::operatorName (  )  const [inline]

Return name of the matching operator.

Definition at line 79 of file InterestOperator.h.

References p_operatorName.

int Isis::InterestOperator::Padding (  )  [protected, virtual]

Sets an offset to pass in larger chips if operator requires it This is used to offset the subchip size passed into Interest.

Returns:
int Amount to add to both x & y total sizes

Reimplemented in Isis::MoravecOperator.

Definition at line 185 of file InterestOperator.cpp.

Referenced by Operate().

void Isis::InterestOperator::Parse ( Pvl pvl  )  [protected]

Create an InterestOperator object using a PVL specification.

An example of the PVL required for this is:

 Object = InterestOperator
   Group = Operator
     Name      = StandardDeviation
     Samples   = 21
     Lines     = 21
     DeltaLine = 50
     DeltaSamp = 25
   EndGroup
 EndObject

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

Parameters:
pvl The pvl object containing the specification

Definition at line 64 of file InterestOperator.cpp.

References _FILEINFO_, e, Isis::PvlContainer::Filename(), Isis::PvlContainer::HasKeyword(), Isis::iException::Message(), p_deltaLine, p_deltaSamp, p_lines, p_maximumDN, p_minimumDN, p_minimumInterest, p_operatorName, p_samples, pvl(), Isis::PvlObject::Traverse, Isis::ValidMaximum, and Isis::ValidMinimum.

Referenced by InterestOperator().

void Isis::InterestOperator::SetClipPolygon ( const geos::geom::MultiPolygon &  clipPolygon  ) 

Sets the clipping polygon for the chip.

The coordinates must be in (sample,line) order.

Parameters:
clipPolygon The polygons used to clip the chip

Definition at line 174 of file InterestOperator.cpp.

References Isis::PolygonTools::CopyMultiPolygon(), and p_clipPolygon.


Member Data Documentation

geos::geom::MultiPolygon* Isis::InterestOperator::p_clipPolygon [protected]

clipping polygon set by SetClipPolygon (line,samp)

Definition at line 107 of file InterestOperator.h.

Referenced by InterestOperator(), Operate(), SetClipPolygon(), and ~InterestOperator().

Isis::PvlGroup Isis::InterestOperator::p_operator [protected]

Operator group that created this projection.

Definition at line 109 of file InterestOperator.h.

Referenced by InterestOperator(), and Operator().


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