OTB  9.0.0
Orfeo Toolbox
Public Types | 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 itk::SmartPointer< SelfPointer
 
typedef VectorData Self
 
typedef itk::DataObject Superclass
 
typedef TPrecision PrecisionType
 
typedef TValuePrecision ValuePrecisionType
 
typedef otb::DataNode< TPrecision, VDimension, TValuePrecision > DataNodeType
 
typedef DataNodeType::Pointer DataNodePointerType
 
typedef itk::TreeContainer< DataNodePointerTypeDataTreeType
 
typedef DataTreeType::Pointer DataTreePointerType
 
typedef DataNodeType::PointType PointType
 
typedef DataNodeType::LineType LineType
 
typedef DataNodeType::PolygonType PolygonType
 
typedef itk::Vector< double, 2 > SpacingType
 
typedef itk::Point< double, 2 > OriginType
 
static const unsigned int Dimension = VDimension
 
DataTreePointerType m_DataTree
 
SpacingType m_Spacing
 
OriginType m_Origin
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
 itkGetObjectMacro (DataTree, DataTreeType)
 
virtual const DataTreeTypeGetDataTree () const
 
virtual void SetProjectionRef (const std::string &projectionRef)
 
virtual std::string GetProjectionRef () const
 
virtual void SetOrigin (OriginType _arg)
 
virtual void SetOrigin (const double origin[2])
 
virtual void SetOrigin (const float origin[2])
 
virtual const OriginTypeGetOrigin () const
 
virtual void SetSpacing (const SpacingType &spacing)
 
virtual void SetSpacing (const double spacing[2])
 
virtual void SetSpacing (const float spacing[2])
 
virtual const SpacingTypeGetSpacing () const
 
virtual bool Clear ()
 
virtual int Size () const
 
void TransformPointToPhysicalPoint (const PointType &point, PointType &physicalPoint) const
 
void Graft (const itk::DataObject *data) override
 
 VectorData ()
 
 ~VectorData () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 VectorData (const Self &)=delete
 
void operator= (const Self &)=delete
 

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

Template parameters typedef

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

Template parameters typedef

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

Template parameters typedef

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

Template parameters typedef

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

Template parameters typedef

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

Template parameters typedef

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

Template parameters typedef

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

Template parameters typedef

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

Template parameters typedef

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

Template parameters typedef

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

Constructor

Definition at line 32 of file otbVectorData.hxx.

◆ ~VectorData()

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

Destructor

Definition at line 141 of file otbVectorData.h.

◆ VectorData() [2/2]

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

Template parameters typedef

Member Function Documentation

◆ Clear()

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
bool otb::VectorData< TPrecision, VDimension, TValuePrecision >::Clear
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

Template parameters typedef

◆ GetDataTree()

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

Template parameters typedef

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

◆ GetNameOfClass()

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

Template parameters typedef

◆ GetOrigin()

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

Template parameters typedef

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

◆ GetProjectionRef()

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

Template parameters typedef

Definition at line 52 of file otbVectorData.hxx.

References otb::MetaDataKey::ProjectionRefKey.

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

◆ GetSpacing()

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

Template parameters typedef

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

◆ 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(), and otb::VectorData< TPrecision, VDimension, TValuePrecision >::GetSpacing().

◆ itkGetObjectMacro()

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

Template parameters typedef

◆ 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

Template parameters typedef

◆ 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.

◆ SetOrigin() [1/3]

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

Template parameters typedef

Definition at line 90 of file otbVectorData.hxx.

◆ SetOrigin() [2/3]

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

Template parameters typedef

Definition at line 97 of file otbVectorData.hxx.

◆ SetOrigin() [3/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()

◆ SetProjectionRef()

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

Template parameters typedef

Definition at line 43 of file otbVectorData.hxx.

References otb::MetaDataKey::ProjectionRefKey.

Referenced by otb::LabelImageToVectorDataFilter< TInputImage, TPrecision >::GenerateData().

◆ SetSpacing() [1/3]

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

Template parameters typedef

Definition at line 74 of file otbVectorData.hxx.

◆ SetSpacing() [2/3]

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

Template parameters typedef

Definition at line 81 of file otbVectorData.hxx.

◆ SetSpacing() [3/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.

◆ Size()

template<class TPrecision , unsigned int VDimension, class TValuePrecision >
int otb::VectorData< TPrecision, VDimension, TValuePrecision >::Size
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

Template parameters typedef

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

Template parameters typedef

Definition at line 156 of file otbVectorData.h.

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

◆ m_Spacing

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

Template parameters typedef

Definition at line 155 of file otbVectorData.h.

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


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