Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::VectorData< TPrecision, VDimension, TValuePrecision > Class Template Reference

This class represents a hierarchy of vector data. More...

#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 Self
ConstPointer
 
typedef DataNodeType::Pointer DataNodePointerType
 
typedef otb::DataNode
< TPrecision, VDimension,
TValuePrecision > 
DataNodeType
 
typedef DataTreeType::Pointer DataTreePointerType
 
typedef itk::TreeContainer
< DataNodePointerType
DataTreeType
 
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 ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual DataTreeTypeGetDataTree ()
 
virtual const DataTreeTypeGetDataTree ()
 
virtual const char * GetNameOfClass () const
 
virtual const OriginTypeGetOrigin ()
 
virtual std::string GetProjectionRef () const
 
virtual const SpacingTypeGetSpacing ()
 
virtual void Graft (const itk::DataObject *data)
 
virtual void SetOrigin (OriginType _arg)
 
virtual void SetOrigin (const double origin[2])
 
virtual void SetOrigin (const float origin[2])
 
virtual void SetProjectionRef (const std::string &projectionRef)
 
virtual void SetSpacing (const SpacingType &spacing)
 
virtual void SetSpacing (const double spacing[2])
 
virtual void SetSpacing (const float spacing[2])
 
virtual int Size () const
 
void TransformPointToPhysicalPoint (const PointType &point, PointType &physicalPoint) const
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static const unsigned int Dimension = VDimension
 

Protected Member Functions

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

Private Member Functions

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

Private Attributes

DataTreePointerType m_DataTree
 
OriginType m_Origin
 
SpacingType m_Spacing
 

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 55 of file otbVectorData.h.

Member Typedef Documentation

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 63 of file otbVectorData.h.

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

Definition at line 75 of file otbVectorData.h.

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 74 of file otbVectorData.h.

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

Definition at line 77 of file otbVectorData.h.

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

Definition at line 76 of file otbVectorData.h.

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

Definition at line 80 of file otbVectorData.h.

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 84 of file otbVectorData.h.

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

Definition at line 62 of file otbVectorData.h.

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

Definition at line 79 of file otbVectorData.h.

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

Definition at line 81 of file otbVectorData.h.

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 71 of file otbVectorData.h.

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 60 of file otbVectorData.h.

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 83 of file otbVectorData.h.

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

Definition at line 61 of file otbVectorData.h.

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

Definition at line 72 of file otbVectorData.h.

Constructor & Destructor Documentation

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

Constructor

Definition at line 30 of file otbVectorData.txx.

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

Destructor

Definition at line 135 of file otbVectorData.h.

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

Member Function Documentation

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

Clear the vector data

Definition at line 120 of file otbVectorData.txx.

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

Reimplemented from itk::DataObject.

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
virtual const OriginType& otb::VectorData< TPrecision, VDimension, TValuePrecision >::GetOrigin ( )
virtual
template<class TPrecision , unsigned int VDimension, class TValuePrecision >
std::string otb::VectorData< TPrecision, VDimension, TValuePrecision >::GetProjectionRef ( ) const
virtual
template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
virtual const SpacingType& otb::VectorData< TPrecision, VDimension, TValuePrecision >::GetSpacing ( )
virtual
template<class TPrecision , unsigned int VDimension, class TValuePrecision >
void otb::VectorData< TPrecision, VDimension, TValuePrecision >::Graft ( const itk::DataObject data)
virtual

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 161 of file otbVectorData.txx.

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().

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
static Pointer otb::VectorData< TPrecision, VDimension, TValuePrecision >::New ( )
static
template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
void otb::VectorData< TPrecision, VDimension, TValuePrecision >::operator= ( const Self )
private
template<class TPrecision , unsigned int VDimension, class TValuePrecision >
void otb::VectorData< TPrecision, VDimension, TValuePrecision >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protectedvirtual

PrintSelf method

Reimplemented from itk::DataObject.

Definition at line 136 of file otbVectorData.txx.

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

Definition at line 100 of file otbVectorData.txx.

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

Definition at line 43 of file otbVectorData.txx.

References otb::MetaDataKey::ProjectionRefKey.

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
GetSpacing()

Definition at line 67 of file otbVectorData.txx.

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

Definition at line 80 of file otbVectorData.txx.

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

Definition at line 89 of file otbVectorData.txx.

References itk::Vector< T, NVectorDimension >::CastFrom().

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 128 of file otbVectorData.txx.

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

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

Definition at line 68 of file otbVectorData.h.

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 144 of file otbVectorData.h.

template<class TPrecision = double, unsigned int VDimension = 2, class TValuePrecision = double>
OriginType otb::VectorData< TPrecision, VDimension, TValuePrecision >::m_Origin
private
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: