OTB  7.4.0
Orfeo Toolbox
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::VectorData< TPrecision, VDimension, TValuePrecision > Class Template Reference

#include <otbVectorData.h>

+ Inheritance diagram for otb::VectorData< TPrecision, VDimension, TValuePrecision >:
+ Collaboration diagram for otb::VectorData< TPrecision, VDimension, TValuePrecision >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef DataNodeType::Pointer DataNodePointerType
 
typedef otb::DataNode< TPrecision, VDimension, TValuePrecision > DataNodeType
 
typedef DataTreeType::Pointer DataTreePointerType
 
typedef itk::TreeContainer< DataNodePointerTypeDataTreeType
 
typedef DataNodeType::LineType LineType
 
typedef itk::Point< double, 2 > OriginType
 
typedef itk::SmartPointer< SelfPointer
 
typedef DataNodeType::PointType PointType
 
typedef DataNodeType::PolygonType PolygonType
 
typedef TPrecision PrecisionType
 
typedef VectorData Self
 
typedef itk::Vector< double, 2 > SpacingType
 
typedef itk::DataObject Superclass
 
typedef TValuePrecision ValuePrecisionType
 

Public Member Functions

virtual bool Clear ()
 
virtual const DataTreeTypeGetDataTree () const
 
virtual const OriginTypeGetOrigin () const
 
virtual std::string GetProjectionRef () const
 
virtual const SpacingTypeGetSpacing () const
 
void Graft (const itk::DataObject *data) override
 
 itkGetObjectMacro (DataTree, DataTreeType)
 
virtual void SetProjectionRef (const std::string &projectionRef)
 
virtual int Size () const
 
void TransformPointToPhysicalPoint (const PointType &point, PointType &physicalPoint) const
 
virtual void SetOrigin (OriginType _arg)
 
virtual void SetOrigin (const double origin[2])
 
virtual void SetOrigin (const float origin[2])
 
virtual void SetSpacing (const SpacingType &spacing)
 
virtual void SetSpacing (const double spacing[2])
 
virtual void SetSpacing (const float spacing[2])
 

Protected Member Functions

void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 VectorData ()
 
 ~VectorData () override
 

Private Member Functions

void operator= (const Self &)=delete
 
 VectorData (const Self &)=delete
 

Private Attributes

DataTreePointerType m_DataTree
 
OriginType m_Origin
 
SpacingType m_Spacing
 
static const unsigned int Dimension = VDimension
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 

Detailed Description

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
class otb::VectorData< TPrecision, VDimension, TValuePrecision >

This class represents a hierarchy of vector data.

This class contains an itk::TreeContainer templated with otb::DataNode. It represents a tree structure of vector data. These data can be read from shapefiles or kml files for instance.

The internal tree can be walked with itk::TreeIteratorBase subclasses.

The three templates indicate

The elements in the VectorData have their coordinates in the projection specified by the WKT string. This class also offer the possibility to store the coordinates directly into an image coordinate system, using the origin and spacing in a similar way as the corresponding image.

See also
DataNode
VectorDataFileReader
VectorDataFileWriter
Examples:
Projections/VectorDataExtractROIExample.cxx, and Projections/VectorDataProjectionExample.cxx.

Definition at line 58 of file otbVectorData.h.

Member Typedef Documentation

◆ ConstPointer

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef itk::SmartPointer<const Self> otb::VectorData< TPrecision, VDimension, TValuePrecision >::ConstPointer

Definition at line 65 of file otbVectorData.h.

◆ DataNodePointerType

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef DataNodeType::Pointer otb::VectorData< TPrecision, VDimension, TValuePrecision >::DataNodePointerType

Definition at line 78 of file otbVectorData.h.

◆ DataNodeType

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef otb::DataNode<TPrecision, VDimension, TValuePrecision> otb::VectorData< TPrecision, VDimension, TValuePrecision >::DataNodeType

Definition at line 77 of file otbVectorData.h.

◆ DataTreePointerType

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef DataTreeType::Pointer otb::VectorData< TPrecision, VDimension, TValuePrecision >::DataTreePointerType

Definition at line 80 of file otbVectorData.h.

◆ DataTreeType

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef itk::TreeContainer<DataNodePointerType> otb::VectorData< TPrecision, VDimension, TValuePrecision >::DataTreeType

Definition at line 79 of file otbVectorData.h.

◆ LineType

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef DataNodeType::LineType otb::VectorData< TPrecision, VDimension, TValuePrecision >::LineType

Definition at line 83 of file otbVectorData.h.

◆ OriginType

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef itk::Point<double, 2> otb::VectorData< TPrecision, VDimension, TValuePrecision >::OriginType

Definition at line 87 of file otbVectorData.h.

◆ Pointer

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef itk::SmartPointer<Self> otb::VectorData< TPrecision, VDimension, TValuePrecision >::Pointer

Definition at line 64 of file otbVectorData.h.

◆ PointType

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef DataNodeType::PointType otb::VectorData< TPrecision, VDimension, TValuePrecision >::PointType

Definition at line 82 of file otbVectorData.h.

◆ PolygonType

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef DataNodeType::PolygonType otb::VectorData< TPrecision, VDimension, TValuePrecision >::PolygonType

Definition at line 84 of file otbVectorData.h.

◆ PrecisionType

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef TPrecision otb::VectorData< TPrecision, VDimension, TValuePrecision >::PrecisionType

Template parameters typedef

Definition at line 74 of file otbVectorData.h.

◆ Self

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef VectorData otb::VectorData< TPrecision, VDimension, TValuePrecision >::Self

Standard class typedefs

Definition at line 62 of file otbVectorData.h.

◆ SpacingType

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef itk::Vector<double, 2> otb::VectorData< TPrecision, VDimension, TValuePrecision >::SpacingType

Definition at line 86 of file otbVectorData.h.

◆ Superclass

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef itk::DataObject otb::VectorData< TPrecision, VDimension, TValuePrecision >::Superclass

Definition at line 63 of file otbVectorData.h.

◆ ValuePrecisionType

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
typedef TValuePrecision otb::VectorData< TPrecision, VDimension, TValuePrecision >::ValuePrecisionType

Definition at line 75 of file otbVectorData.h.

Constructor & Destructor Documentation

◆ VectorData() [1/2]

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
otb::VectorData< TPrecision, VDimension, TValuePrecision >::VectorData ( )
protected

◆ ~VectorData()

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
otb::VectorData< TPrecision, VDimension, TValuePrecision >::~VectorData ( )
inlineoverrideprotected

◆ VectorData() [2/2]

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
otb::VectorData< TPrecision, VDimension, TValuePrecision >::VectorData ( const Self )
privatedelete

Member Function Documentation

◆ Clear()

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
bool otb::VectorData< TPrecision, VDimension, TValuePrecision >::Clear ( void  )
virtual

Clear the vector data

Definition at line 106 of file otbVectorData.hxx.

◆ CreateAnother()

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
virtual::itk::LightObject::Pointer otb::VectorData< TPrecision, VDimension, TValuePrecision >::CreateAnother ( void  ) const

Standard macros

◆ GetDataTree()

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
virtual const DataTreeType* otb::VectorData< TPrecision, VDimension, TValuePrecision >::GetDataTree ( ) const
virtual

◆ GetNameOfClass()

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
virtual const char* otb::VectorData< TPrecision, VDimension, TValuePrecision >::GetNameOfClass ( ) const
virtual

Standard macros

◆ GetOrigin()

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
virtual const OriginType& otb::VectorData< TPrecision, VDimension, TValuePrecision >::GetOrigin ( ) const
virtual

◆ GetProjectionRef()

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
std::string otb::VectorData< TPrecision, VDimension, TValuePrecision >::GetProjectionRef ( void  ) const
virtual

◆ GetSpacing()

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
virtual const SpacingType& otb::VectorData< TPrecision, VDimension, TValuePrecision >::GetSpacing ( ) const
virtual

◆ Graft()

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
void otb::VectorData< TPrecision, VDimension, TValuePrecision >::Graft ( const itk::DataObject *  data)
override

Graft the data and information from one VectorData to another. This is a convenience method to setup a second VectorData with all the meta information of another VectorData and use the same DataTree Note that this method is different than just using two SmartPointers to the same VectorData since separate DataObjects are still maintained. This method is similar to VectorDataSource::GraftOutput().

Definition at line 141 of file otbVectorData.hxx.

References otb::VectorData< TPrecision, VDimension, TValuePrecision >::GetDataTree(), otb::VectorData< TPrecision, VDimension, TValuePrecision >::GetOrigin(), otb::VectorData< TPrecision, VDimension, TValuePrecision >::GetProjectionRef(), otb::VectorData< TPrecision, VDimension, TValuePrecision >::GetSpacing(), and name().

Referenced by otb::VectorData< TPrecision, VDimension, TValuePrecision >::TransformPointToPhysicalPoint().

◆ itkGetObjectMacro()

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
otb::VectorData< TPrecision, VDimension, TValuePrecision >::itkGetObjectMacro ( DataTree  ,
DataTreeType   
)

◆ New()

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
static Pointer otb::VectorData< TPrecision, VDimension, TValuePrecision >::New ( )
static

Standard macros

◆ operator=()

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
void otb::VectorData< TPrecision, VDimension, TValuePrecision >::operator= ( const Self )
privatedelete

◆ PrintSelf()

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
void otb::VectorData< TPrecision, VDimension, TValuePrecision >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

PrintSelf method

Definition at line 118 of file otbVectorData.hxx.

Referenced by otb::VectorData< TPrecision, VDimension, TValuePrecision >::~VectorData().

◆ SetOrigin() [1/3]

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
virtual void otb::VectorData< TPrecision, VDimension, TValuePrecision >::SetOrigin ( OriginType  _arg)
virtual

Set the origin of the vector data to put it in the corresponding image coordinates

See also
GetOrigin()

◆ SetOrigin() [2/3]

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
void otb::VectorData< TPrecision, VDimension, TValuePrecision >::SetOrigin ( const double  origin[2])
virtual

Set the origin of the vector data to put it in the corresponding image coordinates

See also
GetOrigin()

Definition at line 90 of file otbVectorData.hxx.

◆ SetOrigin() [3/3]

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
void otb::VectorData< TPrecision, VDimension, TValuePrecision >::SetOrigin ( const float  origin[2])
virtual

Set the origin of the vector data to put it in the corresponding image coordinates

See also
GetOrigin()

Definition at line 97 of file otbVectorData.hxx.

◆ SetProjectionRef()

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
void otb::VectorData< TPrecision, VDimension, TValuePrecision >::SetProjectionRef ( const std::string &  projectionRef)
virtual

◆ SetSpacing() [1/3]

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
void otb::VectorData< TPrecision, VDimension, TValuePrecision >::SetSpacing ( const SpacingType spacing)
virtual

Set the spacing of the vector data to put it in the corresponding image coordinates

See also
GetSignedSpacing()

Definition at line 63 of file otbVectorData.hxx.

◆ SetSpacing() [2/3]

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
void otb::VectorData< TPrecision, VDimension, TValuePrecision >::SetSpacing ( const double  spacing[2])
virtual

Set the spacing of the vector data to put it in the corresponding image coordinates

See also
GetSignedSpacing()

Definition at line 74 of file otbVectorData.hxx.

◆ SetSpacing() [3/3]

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
void otb::VectorData< TPrecision, VDimension, TValuePrecision >::SetSpacing ( const float  spacing[2])
virtual

Set the spacing of the vector data to put it in the corresponding image coordinates

See also
GetSignedSpacing()

Definition at line 81 of file otbVectorData.hxx.

◆ Size()

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
int otb::VectorData< TPrecision, VDimension, TValuePrecision >::Size ( void  ) const
virtual

Return the number of element in the tree

Definition at line 112 of file otbVectorData.hxx.

◆ TransformPointToPhysicalPoint()

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
void otb::VectorData< TPrecision, VDimension, TValuePrecision >::TransformPointToPhysicalPoint ( const PointType point,
PointType physicalPoint 
) const
inline

Member Data Documentation

◆ Dimension

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
const unsigned int otb::VectorData< TPrecision, VDimension, TValuePrecision >::Dimension = VDimension
static

Standard macros

Definition at line 70 of file otbVectorData.h.

◆ m_DataTree

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
DataTreePointerType otb::VectorData< TPrecision, VDimension, TValuePrecision >::m_DataTree
private

Data tree

Definition at line 153 of file otbVectorData.h.

◆ m_Origin

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
OriginType otb::VectorData< TPrecision, VDimension, TValuePrecision >::m_Origin
private

◆ m_Spacing

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
SpacingType otb::VectorData< TPrecision, VDimension, TValuePrecision >::m_Spacing
private

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