USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::ControlMeasureLogData Class Reference

Statistical and similar ControlMeasure associated information. More...

#include <ControlMeasureLogData.h>

Collaboration diagram for Isis::ControlMeasureLogData:
Collaboration graph

Public Types

enum  NumericLogDataType {
  InvalidNumericLogDataType = 0, Obsolete_Eccentricity = 1, GoodnessOfFit = 2, MinimumPixelZScore = 3,
  MaximumPixelZScore = 4, PixelShift = 5, WholePixelCorrelation = 6, SubPixelCorrelation = 7,
  Obsolete_AverageResidual = 8
}
 Please do not change existing values in this list except the size - it will break backwards compadibility. More...
 

Public Member Functions

 ControlMeasureLogData ()
 This creates an empty, invalid (IsValid() will return false), instance.
 
 ControlMeasureLogData (NumericLogDataType)
 This creates an instance with the given type but no value yet.
 
 ControlMeasureLogData (PvlKeyword)
 This creates an instance while attempting to interpret keywordRep.
 
 ControlMeasureLogData (NumericLogDataType, double value)
 This creates an instance with the given type and value for that type.
 
 ControlMeasureLogData (const ControlNetLogDataProtoV0001_Point_Measure_DataEntry &)
 This creates an instance based on the protocol buffer.
 
 ControlMeasureLogData (const ControlPointFileEntryV0002_Measure_MeasureLogData &)
 This creates an instance based on the protocol buffer.
 
 ControlMeasureLogData (const ControlMeasureLogData &other)
 Copy constructor.
 
 ~ControlMeasureLogData ()
 Destructor.
 
void SetNumericalValue (double)
 This updates the value associated with a NumericLogDataType.
 
void SetDataType (NumericLogDataType)
 This changes the type of this log data.
 
double GetNumericalValue () const
 Get the value associated with this log data.
 
NumericLogDataType GetDataType () const
 Get the data type associated with this log data.
 
QVariant GetValue () const
 Get the data type associated with this log data.
 
bool IsValid () const
 This tests if the log data is complete and valid.
 
PvlKeyword ToKeyword () const
 This converts the log data to a PvlKeyword.
 
ControlPointFileEntryV0002_Measure_MeasureLogData ToProtocolBuffer () const
 This converts the log data to a protocol buffer object.
 
NumericLogDataType NameToDataType (QString name) const
 This converts a string to a log data type and is useful for converting Pvl keywords to Numeric Log Data Type.
 
QString DataTypeToName (NumericLogDataType) const
 This converts the log data type to a string and is used internally for convertions to and from Pvl.
 

Static Public Attributes

static const int MaximumNumericLogDataType = 9
 This value must be > the largest enumerated value in this type or convertions to and from Pvl will not work.
 

Private Member Functions

void Init ()
 This is a helper method for the constructor that initializes the data to a default, invalid state.
 

Private Attributes

NumericLogDataType p_dataType
 Which kind of value are we storing.
 
double p_numericalValue
 The actual value of the data.
 

Detailed Description

Statistical and similar ControlMeasure associated information.

This class represents information that is related to, or associated with, a control measure but is not part of the measure itself.

Author
2010-12-22 Steven Lambright
See Also
ControlMeasure
History:

2010-12-22 Steven Lambright - Original version

2011-03-08 Eric Hyer - MaximumNumericLogDataType now makes sense

2011-04-04 Steven Lambright - Added error checking to the conversion to protocol buffer

2011-04-11 Steven Lambright - Added GetValue method

Definition at line 51 of file ControlMeasureLogData.h.

Member Enumeration Documentation

Please do not change existing values in this list except the size - it will break backwards compadibility.

This is the list of log data for control measures. To add a new element, put it in the list (anywhere), assign it a value one greater than the current maximum, and increase the maximum's value. Then add a case to ControlMeasureLogData::DataTypeToName. Once you've done that, you're done! :)

Enumerator
InvalidNumericLogDataType 

This is a placeholder for unset values.

Obsolete_Eccentricity 

Deprecated keyword kept for backwards compatability with older Control Networks.

DO NOT USE!!

GoodnessOfFit 

GoodnessOfFit is pointreg information for reference measures.

This measures how well the computed fit area matches the pattern area.

MinimumPixelZScore 

Control measures store z-scores in pairs.

A pair contains the z-scores of the minimum and maximum pixels in the pattern chip generated for the given measure during point registration. Each z-score indicates how many standard deviations the given pixel value is above or below the mean DN.

MaximumPixelZScore 
See Also
MinimumPixelZScore
PixelShift 

Deprecated keyword kept for backwards compatability with older Control Networks.

DO NOT USE!!

WholePixelCorrelation 

Deprecated keyword kept for backwards compatability with older Control Networks.

DO NOT USE!!

SubPixelCorrelation 

Deprecated keyword kept for backwards compatability with older Control Networks.

DO NOT USE!!

Obsolete_AverageResidual 

Deprecated keyword kept for backwards compatability with older Control Networks.

DO NOT USE!!

Definition at line 63 of file ControlMeasureLogData.h.

Constructor & Destructor Documentation

Isis::ControlMeasureLogData::ControlMeasureLogData ( )

This creates an empty, invalid (IsValid() will return false), instance.

Definition at line 14 of file ControlMeasureLogData.cpp.

References Init().

Isis::ControlMeasureLogData::ControlMeasureLogData ( NumericLogDataType  dataType)

This creates an instance with the given type but no value yet.

IsValid() will return false until a value is set.

Parameters
dataTypeWhat the instance is describing (the field)

Definition at line 38 of file ControlMeasureLogData.cpp.

References Init(), and p_dataType.

Isis::ControlMeasureLogData::ControlMeasureLogData ( PvlKeyword  keywordRep)

This creates an instance while attempting to interpret keywordRep.

On failure, the IsValid() test will return false.

Parameters
keywordRepThe PvlKeyword representing log data

Definition at line 51 of file ControlMeasureLogData.cpp.

References Init(), InvalidNumericLogDataType, Isis::PvlKeyword::name(), NameToDataType(), p_dataType, p_numericalValue, and Isis::toDouble().

Isis::ControlMeasureLogData::ControlMeasureLogData ( NumericLogDataType  dataType,
double  value 
)

This creates an instance with the given type and value for that type.

Parameters
dataTypeWhat the value is describing (the field)
valueThe numerical value of this field

Definition at line 25 of file ControlMeasureLogData.cpp.

References p_dataType, and p_numericalValue.

Isis::ControlMeasureLogData::ControlMeasureLogData ( const ControlNetLogDataProtoV0001_Point_Measure_DataEntry protoBuf)

This creates an instance based on the protocol buffer.

This assumes the protocol buffer is correct and does no extra validation.

Parameters
protoBufThe protocol buffer version of a log data

Definition at line 67 of file ControlMeasureLogData.cpp.

References p_dataType, and p_numericalValue.

Isis::ControlMeasureLogData::ControlMeasureLogData ( const ControlPointFileEntryV0002_Measure_MeasureLogData protoBuf)

This creates an instance based on the protocol buffer.

This assumes the protocol buffer is correct and does no extra validation.

Parameters
protoBufThe protocol buffer version of a log data

Definition at line 80 of file ControlMeasureLogData.cpp.

References p_dataType, and p_numericalValue.

Isis::ControlMeasureLogData::ControlMeasureLogData ( const ControlMeasureLogData other)

Copy constructor.

Parameters
otherThe instance to copy into this one.

Definition at line 94 of file ControlMeasureLogData.cpp.

References p_dataType, and p_numericalValue.

Isis::ControlMeasureLogData::~ControlMeasureLogData ( )

Destructor.

This frees allocated memory by the instance of this class.

Definition at line 104 of file ControlMeasureLogData.cpp.

Member Function Documentation

QString Isis::ControlMeasureLogData::DataTypeToName ( NumericLogDataType  type) const

This converts the log data type to a string and is used internally for convertions to and from Pvl.

This is also useful for GUI programs that need to display log information.

Parameters
typeThe data type to convert to a string

Definition at line 252 of file ControlMeasureLogData.cpp.

References _FILEINFO_, GoodnessOfFit, InvalidNumericLogDataType, MaximumPixelZScore, MinimumPixelZScore, Obsolete_AverageResidual, Obsolete_Eccentricity, PixelShift, Isis::IException::Programmer, SubPixelCorrelation, Isis::toString(), and WholePixelCorrelation.

Referenced by NameToDataType(), ToKeyword(), and Isis::ControlMeasure::UpdateLogData().

ControlMeasureLogData::NumericLogDataType Isis::ControlMeasureLogData::GetDataType ( ) const

Get the data type associated with this log data.

The return value is InvalidNumericLogDataType is no value has been set..

Returns
A numerical representation of the current DataType

Definition at line 158 of file ControlMeasureLogData.cpp.

References p_dataType.

Referenced by Isis::ControlMeasure::DeleteLogData(), Isis::ControlMeasure::GetLogValue(), Isis::ControlMeasure::HasLogData(), Isis::ControlMeasure::SetLogData(), and Isis::ControlMeasure::UpdateLogData().

double Isis::ControlMeasureLogData::GetNumericalValue ( ) const

Get the value associated with this log data.

Returns Null is IsValid() if false.

Returns
A numerical representation of the current DataType

Definition at line 146 of file ControlMeasureLogData.cpp.

References p_numericalValue.

Referenced by Isis::MatchTool::loadMeasureTable(), Isis::QnetTool::loadMeasureTable(), Isis::ControlNetFilter::PointGoodnessOfFitFilter(), Isis::MatchTool::updateLeftMeasureInfo(), and Isis::MatchTool::updateRightMeasureInfo().

QVariant Isis::ControlMeasureLogData::GetValue ( ) const

Get the data type associated with this log data.

The return value is an invalid variant type if the value is not set.

Definition at line 167 of file ControlMeasureLogData.cpp.

References p_numericalValue.

Referenced by Isis::ControlMeasure::GetLogValue().

void Isis::ControlMeasureLogData::Init ( )
private

This is a helper method for the constructor that initializes the data to a default, invalid state.

Definition at line 112 of file ControlMeasureLogData.cpp.

References InvalidNumericLogDataType, Isis::Null, p_dataType, and p_numericalValue.

Referenced by ControlMeasureLogData(), and SetDataType().

bool Isis::ControlMeasureLogData::IsValid ( ) const

This tests if the log data is complete and valid.

Returns
True if type and value are known, false otherwise

Definition at line 177 of file ControlMeasureLogData.cpp.

References InvalidNumericLogDataType, Isis::Null, p_dataType, and p_numericalValue.

Referenced by Isis::ControlNetVersioner::LatestPvlToBinary(), Isis::ControlMeasure::SetLogData(), ToKeyword(), and ToProtocolBuffer().

ControlMeasureLogData::NumericLogDataType Isis::ControlMeasureLogData::NameToDataType ( QString  name) const

This converts a string to a log data type and is useful for converting Pvl keywords to Numeric Log Data Type.

Parameters
nameThe string to convert to data type
Returns
The data type converted from a string

Definition at line 226 of file ControlMeasureLogData.cpp.

References DataTypeToName(), InvalidNumericLogDataType, and MaximumNumericLogDataType.

Referenced by ControlMeasureLogData().

void Isis::ControlMeasureLogData::SetDataType ( NumericLogDataType  newDataType)

This changes the type of this log data.

This will reset the value of the log data also.

Parameters
newDataTypeThe data type this log data should represent

Definition at line 134 of file ControlMeasureLogData.cpp.

References Init(), and p_dataType.

void Isis::ControlMeasureLogData::SetNumericalValue ( double  value)

This updates the value associated with a NumericLogDataType.

Parameters
valueThe new value for this log data

Definition at line 123 of file ControlMeasureLogData.cpp.

References p_numericalValue.

PvlKeyword Isis::ControlMeasureLogData::ToKeyword ( ) const

This converts the log data to a PvlKeyword.

These should be understandable by the constructor.

Returns
A PVL representation of this log data

Definition at line 189 of file ControlMeasureLogData.cpp.

References DataTypeToName(), IsValid(), p_dataType, p_numericalValue, and Isis::toString().

Referenced by Isis::ControlNetFileV0002::toPvl(), and Isis::ControlNetFileV0001::toPvl().

ControlPointFileEntryV0002_Measure_MeasureLogData Isis::ControlMeasureLogData::ToProtocolBuffer ( ) const

This converts the log data to a protocol buffer object.

This should be understandable by the constructor that takes a protocol buffer object.

Returns
A protocol buffer representation of this log data

Definition at line 204 of file ControlMeasureLogData.cpp.

References _FILEINFO_, IsValid(), p_dataType, p_numericalValue, and Isis::IException::Programmer.

Referenced by Isis::ControlNetVersioner::LatestPvlToBinary().

Member Data Documentation

const int Isis::ControlMeasureLogData::MaximumNumericLogDataType = 9
static

This value must be > the largest enumerated value in this type or convertions to and from Pvl will not work.

Definition at line 125 of file ControlMeasureLogData.h.

Referenced by NameToDataType().

NumericLogDataType Isis::ControlMeasureLogData::p_dataType
private

Which kind of value are we storing.

Definition at line 158 of file ControlMeasureLogData.h.

Referenced by ControlMeasureLogData(), GetDataType(), Init(), IsValid(), SetDataType(), ToKeyword(), and ToProtocolBuffer().

double Isis::ControlMeasureLogData::p_numericalValue
private

The actual value of the data.

Definition at line 160 of file ControlMeasureLogData.h.

Referenced by ControlMeasureLogData(), GetNumericalValue(), GetValue(), Init(), IsValid(), SetNumericalValue(), ToKeyword(), and ToProtocolBuffer().


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