OTB  9.0.0
Orfeo Toolbox
List of all members
otb::GeometriesSet Class Reference

#include <otbGeometriesSet.h>

+ Inheritance diagram for otb::GeometriesSet:
+ Collaboration diagram for otb::GeometriesSet:

Public Types

Standard ITK typedefs
typedef GeometriesSet Self
 
typedef itk::DataObject Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

Standard macros
virtual const char * GetNameOfClass () const
 
Geometries accessors
void Set (ogr::DataSource::Pointer datasource)
 
void Set (ogr::Layer layer)
 
Application of a command to a geometries set, through a visitor
template<typename Visitor >
Visitor::result_type apply (Visitor const &visitor)
 
template<typename Visitor >
Visitor::result_type apply (Visitor const &visitor) const
 
template<typename Visitor >
Visitor::result_type apply (Visitor const &visitor, Self &visitable)
 
template<typename Visitor >
Visitor::result_type apply (Visitor const &visitor, Self &visitable) const
 
bool IsSet () const
 

Factory functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
static Pointer New ()
 
static Pointer New (ogr::DataSource::Pointer datasource)
 
static Pointer New (ogr::Layer layer)
 

Image reference (spacing + origin)

typedef ogr::ImageReference< double > ImageReference
 
typedef boost::variant< ogr::DataSource::Pointer, ogr::LayerAnyGeometriesSetType
 
AnyGeometriesSetType m_GeometriesSet
 
ImageReference m_ImageReference
 
void SetImageReference (ImageReference const &imageReference)
 
ImageReference const & GetImageReference () const
 
 GeometriesSet ()
 
 GeometriesSet (ogr::DataSource::Pointer datasource)
 
 GeometriesSet (ogr::Layer layer)
 
 ~GeometriesSet () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 

Detailed Description

Common ITK type to manipulate any set of geometries: a otb::ogr::DataSource, or a otb::ogr::Layer.

Since
OTB v 3.14.0

Definition at line 38 of file otbGeometriesSet.h.

Member Typedef Documentation

◆ AnyGeometriesSetType

ImageReference setter.

Definition at line 179 of file otbGeometriesSet.h.

◆ ConstPointer

typedef itk::SmartPointer<const Self> otb::GeometriesSet::ConstPointer

Definition at line 47 of file otbGeometriesSet.h.

◆ ImageReference

ImageReference setter.

Definition at line 140 of file otbGeometriesSet.h.

◆ Pointer

typedef itk::SmartPointer<Self> otb::GeometriesSet::Pointer

Definition at line 46 of file otbGeometriesSet.h.

◆ Self

Definition at line 44 of file otbGeometriesSet.h.

◆ Superclass

typedef itk::DataObject otb::GeometriesSet::Superclass

Definition at line 45 of file otbGeometriesSet.h.

Constructor & Destructor Documentation

◆ GeometriesSet() [1/3]

otb::GeometriesSet::GeometriesSet ( )
protected

Default constructor. This actual geometries set is an in-memory otb::ogr::DataSource. It needs to be set to a set of geometries if you expect to serialize it or work on a otb::Layer.

When using this construction path, you'll likelly need to Set() the actual geometries set.

◆ GeometriesSet() [2/3]

otb::GeometriesSet::GeometriesSet ( ogr::DataSource::Pointer  datasource)
protected

Init constructor from a otb::DataSource.

◆ GeometriesSet() [3/3]

otb::GeometriesSet::GeometriesSet ( ogr::Layer  layer)
protected

Init constructor from a otb::Layer.

◆ ~GeometriesSet()

otb::GeometriesSet::~GeometriesSet ( )
overrideprotected

Destructor.

Member Function Documentation

◆ apply() [1/4]

template<typename Visitor >
Visitor::result_type otb::GeometriesSet::apply ( Visitor const &  visitor)
inline

Unary visiting function to apply a visitor on any kind of geometies set.

As a GeometriesSet contains either a otb::ogr::DataSource, or a otb::ogr::Layer, one needs to apply a function on either kind of data. This can be done thanks to a specialization of boost::static_visitor<> that has a const operator() that takes either one (or two in case of binary visitors) otb::DataSource or otb::Layer as parameter(s).

Exceptions
Whateveris thrown by the actual visitor.
Template Parameters
Visitortype of the visitor functor.
Parameters
[in]visitorFunctor visitor that shal derive from boost::static_visitor.

Definition at line 96 of file otbGeometriesSet.h.

◆ apply() [2/4]

template<typename Visitor >
Visitor::result_type otb::GeometriesSet::apply ( Visitor const &  visitor) const
inline

Unary visiting function to apply a visitor on any kind of geometies set.

As a GeometriesSet contains either a otb::ogr::DataSource, or a otb::ogr::Layer, one needs to apply a function on either kind of data. This can be done thanks to a specialization of boost::static_visitor<> that has a const operator() that takes either one (or two in case of binary visitors) otb::DataSource or otb::Layer as parameter(s).

Exceptions
Whateveris thrown by the actual visitor.
Template Parameters
Visitortype of the visitor functor.
Parameters
[in]visitorFunctor visitor that shal derive from boost::static_visitor.

Definition at line 105 of file otbGeometriesSet.h.

◆ apply() [3/4]

template<typename Visitor >
Visitor::result_type otb::GeometriesSet::apply ( Visitor const &  visitor,
Self visitable 
)
inline

Binary visiting function to apply a visitor on any kind of geometies set. Unary visiting function to apply a visitor on any kind of geometies set.

As a GeometriesSet contains either a otb::ogr::DataSource, or a otb::ogr::Layer, one needs to apply a function on either kind of data. This can be done thanks to a specialization of boost::static_visitor<> that has a const operator() that takes either one (or two in case of binary visitors) otb::DataSource or otb::Layer as parameter(s).

Exceptions
Whateveris thrown by the actual visitor.
Template Parameters
Visitortype of the visitor functor.
Parameters
[in]visitorFunctor visitor that shal derive from boost::static_visitor.
[in]visitableother geometries set to visit along side with the current geometries set instance.

Definition at line 117 of file otbGeometriesSet.h.

References m_GeometriesSet.

◆ apply() [4/4]

template<typename Visitor >
Visitor::result_type otb::GeometriesSet::apply ( Visitor const &  visitor,
Self visitable 
) const
inline

Binary visiting function to apply a visitor on any kind of geometies set. Unary visiting function to apply a visitor on any kind of geometies set.

As a GeometriesSet contains either a otb::ogr::DataSource, or a otb::ogr::Layer, one needs to apply a function on either kind of data. This can be done thanks to a specialization of boost::static_visitor<> that has a const operator() that takes either one (or two in case of binary visitors) otb::DataSource or otb::Layer as parameter(s).

Exceptions
Whateveris thrown by the actual visitor.
Template Parameters
Visitortype of the visitor functor.
Parameters
[in]visitorFunctor visitor that shal derive from boost::static_visitor.
[in]visitableother geometries set to visit along side with the current geometries set instance.

Definition at line 126 of file otbGeometriesSet.h.

References m_GeometriesSet.

◆ CreateAnother()

virtual::itk::LightObject::Pointer otb::GeometriesSet::CreateAnother ( void  ) const

ITK method for creation through the object factory.

◆ GetImageReference()

ImageReference const& otb::GeometriesSet::GetImageReference ( ) const
inline

ImageReference getter.

Definition at line 149 of file otbGeometriesSet.h.

◆ GetNameOfClass()

virtual const char* otb::GeometriesSet::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

◆ IsSet()

bool otb::GeometriesSet::IsSet ( ) const

Does it contain a geometries set ?.

◆ New() [1/3]

static Pointer otb::GeometriesSet::New ( )
static

ITK method for creation through the object factory.

◆ New() [2/3]

static Pointer otb::GeometriesSet::New ( ogr::DataSource::Pointer  datasource)
static

Direct builder from an existing otb::DataSource.

◆ New() [3/3]

static Pointer otb::GeometriesSet::New ( ogr::Layer  layer)
static

Direct builder from an existing otb::Layer.

◆ PrintSelf()

void otb::GeometriesSet::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

Prints self to stream.

◆ Set() [1/2]

void otb::GeometriesSet::Set ( ogr::DataSource::Pointer  datasource)

◆ Set() [2/2]

void otb::GeometriesSet::Set ( ogr::Layer  layer)

◆ SetImageReference()

void otb::GeometriesSet::SetImageReference ( ImageReference const &  imageReference)
inline

ImageReference setter.

Definition at line 143 of file otbGeometriesSet.h.

Member Data Documentation

◆ m_GeometriesSet

AnyGeometriesSetType otb::GeometriesSet::m_GeometriesSet
private

ImageReference setter.

Definition at line 180 of file otbGeometriesSet.h.

Referenced by apply().

◆ m_ImageReference

ImageReference otb::GeometriesSet::m_ImageReference
private

ImageReference setter.

Definition at line 181 of file otbGeometriesSet.h.


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