OTB  5.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
otb::VectorDataFileReader< TOutputVectorData > Class Template Reference

#include <otbVectorDataFileReader.h>

+ Inheritance diagram for otb::VectorDataFileReader< TOutputVectorData >:
+ Collaboration diagram for otb::VectorDataFileReader< TOutputVectorData >:

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef TOutputVectorData OutputVectorType
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::Point< double,
VDimension
PointType
 
typedef VectorDataFileReader Self
 
typedef itk::Vector< double,
VDimension
SpacingType
 
typedef VectorDataSource
< TOutputVectorData > 
Superclass
 
typedef VectorDataIOBase VectorDataIOBaseType
 
- Public Types inherited from otb::VectorDataSource< TOutputVectorData >
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef
itk::ProcessObject::DataObjectPointerArraySizeType 
DataObjectPointerArraySizeType
 
typedef TOutputVectorData::Pointer OutputVectorDataPointer
 
typedef TOutputVectorData OutputVectorDataType
 
typedef itk::SmartPointer< SelfPointer
 
typedef VectorDataSource Self
 
typedef itk::ProcessObject Superclass
 
- Public Types inherited from itk::ProcessObject
typedef SmartPointer< const SelfConstPointer
 
typedef
DataObject::DataObjectIdentifierType 
DataObjectIdentifierType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef std::vector
< DataObjectPointer
DataObjectPointerArray
 
typedef
DataObjectPointerArray::size_type 
DataObjectPointerArraySizeType
 
typedef std::vector
< DataObjectIdentifierType
NameArray
 
typedef SmartPointer< SelfPointer
 
typedef ProcessObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
virtual void SetFileName (const char *_arg)
 
virtual const char * GetFileName () const
 
void SetVectorDataIO (VectorDataIOBaseType *vectorDataIO)
 
 itkGetObjectMacro (VectorDataIO, VectorDataIOBaseType)
 
- Public Member Functions inherited from otb::VectorDataSource< TOutputVectorData >
virtual void GraftNthOutput (unsigned int idx, itk::DataObject *output)
 
virtual void GraftOutput (itk::DataObject *output)
 
virtual OutputVectorDataTypeGetOutput (void)
 
virtual OutputVectorDataTypeGetOutput (DataObjectPointerArraySizeType idx)
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual void EnlargeOutputRequestedRegion (DataObject *)
 
virtual const bool & GetAbortGenerateData () const
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
NameArray GetInputNames () const
 
DataObjectPointerArray GetInputs ()
 
MultiThreader * GetMultiThreader () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual const ThreadIdTypeGetNumberOfThreads () const
 
virtual
DataObjectPointerArraySizeType 
GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
DataObjectPointerArray GetOutputs ()
 
virtual const float & GetProgress () const
 
virtual const bool & GetReleaseDataBeforeUpdateFlag () const
 
virtual bool GetReleaseDataFlag () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
virtual DataObjectPointer MakeOutput (const DataObjectIdentifierType &)
 
virtual DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx)
 
virtual void PrepareOutputs ()
 
virtual void PropagateRequestedRegion (DataObject *output)
 
virtual void ReleaseDataBeforeUpdateFlagOff ()
 
virtual void ReleaseDataBeforeUpdateFlagOn ()
 
void ReleaseDataFlagOff ()
 
void ReleaseDataFlagOn ()
 
virtual void ResetPipeline ()
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void SetNumberOfThreads (ThreadIdType _arg)
 
void SetProgress (float progress)
 
virtual void SetReleaseDataBeforeUpdateFlag (bool _arg)
 
virtual void SetReleaseDataFlag (bool flag)
 
virtual void Update ()
 
virtual void UpdateLargestPossibleRegion ()
 
virtual void UpdateOutputData (DataObject *output)
 
virtual void UpdateOutputInformation ()
 
void UpdateProgress (float progress)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
const MetaDataDictionaryGetMetaDataDictionary (void) const
 
MetaDataDictionaryGetMetaDataDictionary (void)
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const ITK_OVERRIDE
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual void SetReferenceCount (int) ITK_OVERRIDE
 
virtual void UnRegister () const ITK_OVERRIDE
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from otb::VectorDataSource< TOutputVectorData >
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static const unsigned int VDimension = OutputVectorType::DataNodeType::Dimension
 

Protected Member Functions

 VectorDataFileReader ()
 
virtual ~VectorDataFileReader ()
 
- Protected Member Functions inherited from otb::VectorDataSource< TOutputVectorData >
virtual void AllocateOutputs ()
 
virtual ~VectorDataSource ()
 
 VectorDataSource ()
 
- Protected Member Functions inherited from itk::ProcessObject
virtual void AddInput (DataObject *input)
 
virtual void AddOutput (DataObject *output)
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void GenerateInputRequestedRegion ()
 
virtual void GenerateOutputRequestedRegion (DataObject *output)
 
DataObjectGetInput (const DataObjectIdentifierType &key)
 
const DataObjectGetInput (const DataObjectIdentifierType &key) const
 
DataObjectGetInput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetInput (DataObjectPointerArraySizeType idx) const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredInputs () const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredOutputs () const
 
DataObjectGetOutput (const DataObjectIdentifierType &key)
 
const DataObjectGetOutput (const DataObjectIdentifierType &key) const
 
DataObjectGetOutput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetPrimaryInput ()
 
const DataObjectGetPrimaryInput () const
 
virtual const char * GetPrimaryInputName (void) const
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
virtual const char * GetPrimaryOutputName (void) const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
 itkLegacyMacro (virtual void RemoveOutput(DataObject *output))
 
 itkLegacyMacro (void SetNumberOfOutputs(DataObjectPointerArraySizeType num))
 
 itkLegacyMacro (virtual void RemoveInput(DataObject *input))
 
 itkLegacyMacro (void SetNumberOfInputs(DataObjectPointerArraySizeType num))
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
virtual void PopBackInput ()
 
virtual void PopFrontInput ()
 
 ProcessObject ()
 
virtual void PropagateResetPipeline ()
 
virtual void PushBackInput (const DataObject *input)
 
virtual void PushFrontInput (const DataObject *input)
 
virtual void ReleaseInputs ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType num, DataObject *input)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual void SetOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void SetPrimaryInput (DataObject *input)
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual void SetPrimaryOutput (DataObject *output)
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
void SetRequiredInputNames (const NameArray &)
 
virtual void VerifyInputInformation ()
 
virtual void VerifyPreconditions ()
 
 ~ProcessObject ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Protected Attributes

std::string m_ExceptionMessage
 
std::string m_FileName
 
bool m_UserSpecifiedVectorDataIO
 
VectorDataIOBaseType::Pointer m_VectorDataIO
 
- Protected Attributes inherited from itk::ProcessObject
TimeStamp m_OutputInformationMTime
 
bool m_Updating
 
- Protected Attributes inherited from itk::LightObject
InternalReferenceCountType m_ReferenceCount
 
SimpleFastMutexLock m_ReferenceCountLock
 

Private Member Functions

void operator= (const Self &)
 
 VectorDataFileReader (const Self &)
 
virtual void GenerateOutputInformation (void)
 
virtual void GenerateData ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const
 
void TestFileExistanceAndReadability ()
 

Additional Inherited Members

- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 

Detailed Description

template<class TOutputVectorData>
class otb::VectorDataFileReader< TOutputVectorData >

Data source that reads vector data from a single file.

This source object is a general filter to read data from a variety of vector data file formats. It works with a VectorDataIOBase subclass to actually do the reading of the data. Object factory machinery can be used to automatically create the VectorDataIOBase, or the VectorDataIOBase can be manually created and set. Note that this class reads data from a single file.

TOutputVectorData is the type expected by the external users of the filter. If data stored in the file is stored in a different format then specified by TOutputVectorData, than this filter converts data between the file type and the external expected type.

A Pluggable factory pattern is used this allows different kinds of readers to be registered (even at run time) without having to modify the code in this class. Normally just setting the FileName with the appropriate suffix is enough to get the reader to instantiate the correct VectorDataIO and read the file properly. However, some files (like raw binary format) have no accepted suffix, so you will have to manually create the VectorDataIO instance of the write type.

See Also
VectorDataIOBase
Examples:
Projections/VectorDataExtractROIExample.cxx, and Projections/VectorDataProjectionExample.cxx.

Definition at line 83 of file otbVectorDataFileReader.h.

Member Typedef Documentation

template<class TOutputVectorData >
typedef itk::SmartPointer<const Self> otb::VectorDataFileReader< TOutputVectorData >::ConstPointer

Definition at line 91 of file otbVectorDataFileReader.h.

template<class TOutputVectorData >
typedef TOutputVectorData otb::VectorDataFileReader< TOutputVectorData >::OutputVectorType

Definition at line 97 of file otbVectorDataFileReader.h.

template<class TOutputVectorData >
typedef itk::SmartPointer<Self> otb::VectorDataFileReader< TOutputVectorData >::Pointer

Definition at line 90 of file otbVectorDataFileReader.h.

template<class TOutputVectorData >
typedef itk::Point<double, VDimension> otb::VectorDataFileReader< TOutputVectorData >::PointType

Definition at line 104 of file otbVectorDataFileReader.h.

template<class TOutputVectorData >
typedef VectorDataFileReader otb::VectorDataFileReader< TOutputVectorData >::Self

Standard class typedefs.

Definition at line 88 of file otbVectorDataFileReader.h.

template<class TOutputVectorData >
typedef itk::Vector<double, VDimension> otb::VectorDataFileReader< TOutputVectorData >::SpacingType

Definition at line 103 of file otbVectorDataFileReader.h.

template<class TOutputVectorData >
typedef VectorDataSource<TOutputVectorData> otb::VectorDataFileReader< TOutputVectorData >::Superclass

Definition at line 89 of file otbVectorDataFileReader.h.

template<class TOutputVectorData >
typedef VectorDataIOBase otb::VectorDataFileReader< TOutputVectorData >::VectorDataIOBaseType

Definition at line 100 of file otbVectorDataFileReader.h.

Constructor & Destructor Documentation

template<class TOutputVectorData >
otb::VectorDataFileReader< TOutputVectorData >::VectorDataFileReader ( )
protected

Constructor

Definition at line 39 of file otbVectorDataFileReader.txx.

References NULL.

template<class TOutputVectorData >
otb::VectorDataFileReader< TOutputVectorData >::~VectorDataFileReader ( )
protectedvirtual

Destructor

Definition at line 51 of file otbVectorDataFileReader.txx.

template<class TOutputVectorData >
otb::VectorDataFileReader< TOutputVectorData >::VectorDataFileReader ( const Self )
private

Member Function Documentation

template<class TOutputVectorData >
virtual::itk::LightObject::Pointer otb::VectorDataFileReader< TOutputVectorData >::CreateAnother ( void  ) const
virtual
template<class TOutputVectorData >
void otb::VectorDataFileReader< TOutputVectorData >::GenerateData ( void  )
virtual

Does the real work.

Reimplemented from itk::ProcessObject.

Definition at line 190 of file otbVectorDataFileReader.txx.

References itk::ExceptionObject::GetDescription().

template<class TOutputVectorData >
void otb::VectorDataFileReader< TOutputVectorData >::GenerateOutputInformation ( void  )
virtual

Prepare the allocation of the output vector data during the first back propagation of the pipeline.

Reimplemented from itk::ProcessObject.

Definition at line 120 of file otbVectorDataFileReader.txx.

References itk::ObjectFactoryBase::CreateAllInstance(), otb::VectorDataIOFactory::CreateVectorDataIO(), itk::ExceptionObject::GetDescription(), otb::VectorDataIOBase::GetNameOfClass(), and otb::VectorDataIOFactory::ReadMode.

template<class TOutputVectorData >
virtual const char* otb::VectorDataFileReader< TOutputVectorData >::GetFileName ( ) const
virtual

Specify the file to read

template<class TOutputVectorData >
virtual const char* otb::VectorDataFileReader< TOutputVectorData >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from otb::VectorDataSource< TOutputVectorData >.

template<class TOutputVectorData >
otb::VectorDataFileReader< TOutputVectorData >::itkGetObjectMacro ( VectorDataIO  ,
VectorDataIOBaseType   
)

Set/Get the VectorDataIO helper class. Often this is created via the object factory mechanism that determines whether a particular VectorDataIO can read a certain file. This method provides a way to get the VectorDataIO instance that is created. Or you can directly specify the VectorDataIO to use to read a particular file in case the factory mechanism will not work properly (e.g., unknown or unusual extension).

template<class TOutputVectorData >
static Pointer otb::VectorDataFileReader< TOutputVectorData >::New ( )
static

Method for creation through the object factory.

template<class TOutputVectorData >
void otb::VectorDataFileReader< TOutputVectorData >::operator= ( const Self )
private
template<class TOutputVectorData >
void otb::VectorDataFileReader< TOutputVectorData >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protectedvirtual

Prepare the allocation of the output vector data during the first back propagation of the pipeline.

Reimplemented from otb::VectorDataSource< TOutputVectorData >.

Definition at line 231 of file otbVectorDataFileReader.txx.

template<class TOutputVectorData >
virtual void otb::VectorDataFileReader< TOutputVectorData >::SetFileName ( const char *  _arg)
virtual

Specify the file to read

template<class TOutputVectorData >
void otb::VectorDataFileReader< TOutputVectorData >::SetVectorDataIO ( VectorDataIOBaseType vectorDataIO)

Set/Get the VectorDataIO helper class. Often this is created via the object factory mechanism that determines whether a particular VectorDataIO can read a certain file. This method provides a way to get the VectorDataIO instance that is created. Or you can directly specify the VectorDataIO to use to read a particular file in case the factory mechanism will not work properly (e.g., unknown or unusual extension).

Definition at line 106 of file otbVectorDataFileReader.txx.

template<class TOutputVectorData >
void otb::VectorDataFileReader< TOutputVectorData >::TestFileExistanceAndReadability ( )
private

Test whether the given filename exist and it is readable. If the file doesn't exist or it is not readable, and exception with an appropriate message will be thrown.

Test whether the given filename exist and it is readable, this is intended to be called before attempting to use VectorDataIO classes for actually reading the file. If the file doesn't exist or it is not readable, and exception with an approriate message will be thrown.

Definition at line 63 of file otbVectorDataFileReader.txx.

References itk::ExceptionObject::SetDescription().

Member Data Documentation

template<class TOutputVectorData >
std::string otb::VectorDataFileReader< TOutputVectorData >::m_ExceptionMessage
protected

Definition at line 131 of file otbVectorDataFileReader.h.

template<class TOutputVectorData >
std::string otb::VectorDataFileReader< TOutputVectorData >::m_FileName
protected

Definition at line 138 of file otbVectorDataFileReader.h.

template<class TOutputVectorData >
bool otb::VectorDataFileReader< TOutputVectorData >::m_UserSpecifiedVectorDataIO
protected

Definition at line 134 of file otbVectorDataFileReader.h.

template<class TOutputVectorData >
VectorDataIOBaseType::Pointer otb::VectorDataFileReader< TOutputVectorData >::m_VectorDataIO
protected

Definition at line 133 of file otbVectorDataFileReader.h.

template<class TOutputVectorData >
const unsigned int otb::VectorDataFileReader< TOutputVectorData >::VDimension = OutputVectorType::DataNodeType::Dimension
static

Definition at line 102 of file otbVectorDataFileReader.h.


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