Isis 3 Programmer Reference
Isis::FeatureNomenclatureTool::FeaturePosition Class Reference

A named feature's position in a cube. More...

Collaboration diagram for Isis::FeatureNomenclatureTool::FeaturePosition:
Collaboration graph

Public Member Functions

 FeaturePosition ()
 Instiantiates a feature position with no data.
 
 FeaturePosition (MdiCubeViewport *, FeatureNomenclature::Feature, VectorType vectorType)
 Instiantiates a feature position.
 
 FeaturePosition (const FeaturePosition &other)
 Copies a feature position.
 
 ~FeaturePosition ()
 Cleans up allocated memory.
 
bool isValid () const
 Test if sample/line coordinates could be found for this feature.
 
QPair< double, double > center () const
 Get the center sample/line position of the feature.
 
QList< QPair< double, double > > edges () const
 Get the edge sample/line positions of the feature.
 
FeatureNomenclature::Featurefeature ()
 Get the feature associated with this feature position.
 
const FeatureNomenclature::Featurefeature () const
 Get the feature associated with this feature position.
 
void applyExtentType (VectorType vectorType)
 Applies the type of extents to the feature.
 
void swap (FeaturePosition &other)
 Trade member data with other.
 
FeaturePositionoperator= (const FeaturePosition &rhs)
 Assign rhs to this.
 

Private Attributes

double m_centerLine
 The cube line position of the feature center, Null if !isValid()
 
double m_centerSample
 The cube sample position of the feature center, Null if !isValid()
 
UniversalGroundMapm_gmap
 The map used to determine the sample, line pair from a lat, lon pair.
 
QList< QPair< double, double > > * m_featureEdgeLineSamples
 The pair is cube sample, line (first and second) respectively.
 
FeatureNomenclature::Feature m_feature
 The feature for which we're encapsulating a viewport position.
 

Detailed Description

A named feature's position in a cube.

This class encapsulates the sample,line position and extents of a named feature given an image (in this case, a viewport, because that holds the universal ground map).

Author
2012-03-22 Steven Lambright and Jai Rideout
History
2012-06-06 Steven Lambright and Kimberly Oyama - Added support for multiple extent/vector types (FeaturePosition(), applyExtentType()). Fixes #852. Fixes #892.

Definition at line 188 of file FeatureNomenclatureTool.h.

Constructor & Destructor Documentation

◆ FeaturePosition() [1/3]

Isis::FeatureNomenclatureTool::FeaturePosition::FeaturePosition ( )

Instiantiates a feature position with no data.

Definition at line 1027 of file FeatureNomenclatureTool.cpp.

References m_centerLine, m_centerSample, m_featureEdgeLineSamples, m_gmap, and Isis::Null.

◆ FeaturePosition() [2/3]

Isis::FeatureNomenclatureTool::FeaturePosition::FeaturePosition ( MdiCubeViewport * vp,
FeatureNomenclature::Feature feature,
VectorType vectorType )

Instiantiates a feature position.

This will calculate the line/sample coordinates of the feature.

Parameters
vpThe viewport to use for ground information
featureThe feature with nomenclature database lat/lon values to be translated into cube line/sample coordinates.
vectorTypeThe type of extent vector to display

Definition at line 1046 of file FeatureNomenclatureTool.cpp.

References Isis::Null, and Isis::FeatureNomenclatureTool::vectorType().

◆ FeaturePosition() [3/3]

Isis::FeatureNomenclatureTool::FeaturePosition::FeaturePosition ( const FeaturePosition & other)

Copies a feature position.

Parameters
otherThe feature position to copy

Definition at line 1076 of file FeatureNomenclatureTool.cpp.

◆ ~FeaturePosition()

Isis::FeatureNomenclatureTool::FeaturePosition::~FeaturePosition ( )

Cleans up allocated memory.

Definition at line 1096 of file FeatureNomenclatureTool.cpp.

References Isis::Null.

Member Function Documentation

◆ applyExtentType()

void Isis::FeatureNomenclatureTool::FeaturePosition::applyExtentType ( VectorType vectorType)

Applies the type of extents to the feature.

4 Arrows - N, S, E, W 8 Arrows - N, NE, NW, E, W, S, SE, SW Box - Corners at: NE, NW, SE, SW

Parameters
vectorTypeThe type of extents that will be drawn with the feature

Definition at line 1157 of file FeatureNomenclatureTool.cpp.

References Isis::FeatureNomenclatureTool::Arrows4, Isis::FeatureNomenclatureTool::Arrows8, Isis::FeatureNomenclatureTool::Box, and Isis::FeatureNomenclatureTool::vectorType().

◆ center()

QPair< double, double > Isis::FeatureNomenclatureTool::FeaturePosition::center ( ) const

Get the center sample/line position of the feature.

Returns
first = sample, second = line.

Definition at line 1121 of file FeatureNomenclatureTool.cpp.

◆ edges()

QList< QPair< double, double > > Isis::FeatureNomenclatureTool::FeaturePosition::edges ( ) const

Get the edge sample/line positions of the feature.

Returns
In the pair, first = sample, second = line.

Definition at line 1133 of file FeatureNomenclatureTool.cpp.

◆ feature() [1/2]

FeatureNomenclature::Feature & Isis::FeatureNomenclatureTool::FeaturePosition::feature ( )

Get the feature associated with this feature position.

Returns
The feature

Definition at line 1144 of file FeatureNomenclatureTool.cpp.

◆ feature() [2/2]

const FeatureNomenclature::Feature & Isis::FeatureNomenclatureTool::FeaturePosition::feature ( ) const

Get the feature associated with this feature position.

Returns
The feature

Definition at line 1276 of file FeatureNomenclatureTool.cpp.

◆ isValid()

bool Isis::FeatureNomenclatureTool::FeaturePosition::isValid ( ) const

Test if sample/line coordinates could be found for this feature.

Returns
True if this feature has a sample/line position.

Definition at line 1111 of file FeatureNomenclatureTool.cpp.

References Isis::Null.

◆ operator=()

FeatureNomenclatureTool::FeaturePosition & Isis::FeatureNomenclatureTool::FeaturePosition::operator= ( const FeaturePosition & rhs)

Assign rhs to this.

We'll be taking on (mirroring) the state of the other feature position.

Parameters
rhsThe FeaturePosition on the right hand side of the '=' operator
Returns
*this

Definition at line 1262 of file FeatureNomenclatureTool.cpp.

◆ swap()

void Isis::FeatureNomenclatureTool::FeaturePosition::swap ( FeaturePosition & other)

Trade member data with other.

This should never throw an exception.

Parameters
otherThe instance to trade state with

Definition at line 1244 of file FeatureNomenclatureTool.cpp.

Member Data Documentation

◆ m_centerLine

double Isis::FeatureNomenclatureTool::FeaturePosition::m_centerLine
private

The cube line position of the feature center, Null if !isValid()

Definition at line 208 of file FeatureNomenclatureTool.h.

Referenced by FeaturePosition().

◆ m_centerSample

double Isis::FeatureNomenclatureTool::FeaturePosition::m_centerSample
private

The cube sample position of the feature center, Null if !isValid()

Definition at line 210 of file FeatureNomenclatureTool.h.

Referenced by FeaturePosition().

◆ m_feature

FeatureNomenclature::Feature Isis::FeatureNomenclatureTool::FeaturePosition::m_feature
private

The feature for which we're encapsulating a viewport position.

Definition at line 221 of file FeatureNomenclatureTool.h.

◆ m_featureEdgeLineSamples

QList< QPair<double, double> >* Isis::FeatureNomenclatureTool::FeaturePosition::m_featureEdgeLineSamples
private

The pair is cube sample, line (first and second) respectively.

This holds the edge points/extents of the feature.

Definition at line 219 of file FeatureNomenclatureTool.h.

Referenced by FeaturePosition().

◆ m_gmap

UniversalGroundMap* Isis::FeatureNomenclatureTool::FeaturePosition::m_gmap
private

The map used to determine the sample, line pair from a lat, lon pair.

Definition at line 213 of file FeatureNomenclatureTool.h.

Referenced by FeaturePosition().


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