Orfeo Toolbox  4.2
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
otb::RCC8GraphFileWriter< TInputGraph > Class Template Reference

This class writes a RCC8 Graph to a dot file (graphviz file format). More...

#include <otbRCC8GraphFileWriter.h>

+ Inheritance diagram for otb::RCC8GraphFileWriter< TInputGraph >:
+ Collaboration diagram for otb::RCC8GraphFileWriter< TInputGraph >:

Public Types

typedef
VertexType::AttributesMapType 
AttributesMapType
 
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef InputGraphType::Pointer InputGraphPointerType
 
typedef TInputGraph InputGraphType
 
typedef itk::SmartPointer< SelfPointer
 
typedef
InputGraphType::RCC8ValueType 
RCC8ValueType
 
typedef RCC8GraphFileWriter Self
 
typedef itk::ProcessObject Superclass
 
typedef
InputGraphType::VertexDescriptorType 
VertexDescriptorType
 
typedef VertexType::Pointer VertexPointerType
 
typedef InputGraphType::VertexType VertexType
 
- 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 * GetFileName () const
 
virtual InputGraphPointerType GetInput ()
 
virtual const char * GetNameOfClass () const
 
virtual void SetFileName (const char *_arg)
 
virtual void SetInput (const InputGraphType *inputGraph)
 
virtual void Update (void)
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual void EnlargeOutputRequestedRegion (DataObject *)
 
virtual const bool & GetAbortGenerateData ()
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
NameArray GetInputNames () const
 
DataObjectPointerArray GetInputs ()
 
MultiThreaderGetMultiThreader () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual const ThreadIdTypeGetNumberOfThreads ()
 
virtual
DataObjectPointerArraySizeType 
GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
DataObjectPointerArray GetOutputs ()
 
virtual const float & GetProgress ()
 
virtual const bool & GetReleaseDataBeforeUpdateFlag ()
 
virtual bool GetReleaseDataFlag () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
virtual DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx)
 
virtual DataObjectPointer MakeOutput (const DataObjectIdentifierType &)
 
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 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
 
MetaDataDictionaryGetMetaDataDictionary (void)
 
const MetaDataDictionaryGetMetaDataDictionary (void) const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName ()
 
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 ()
 

Protected Member Functions

 RCC8GraphFileWriter ()
 
virtual ~RCC8GraphFileWriter ()
 
virtual void GenerateData (void)
 
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const
 
virtual void Write (void)
 
void WriteEdge (std::ofstream &of, VertexDescriptorType source, VertexDescriptorType target, RCC8ValueType value)
 
void WriteVertex (std::ofstream &of, VertexDescriptorType index, VertexPointerType vertex)
 
- Protected Member Functions inherited from itk::ProcessObject
 ProcessObject ()
 
 ~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 GenerateOutputInformation ()
 
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 ()
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredOutputs ()
 
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 ()
 
virtual void PropagateResetPipeline ()
 
virtual void PushBackInput (const DataObject *input)
 
virtual void PushFrontInput (const DataObject *input)
 
virtual void ReleaseInputs ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 Remove an input. More...
 
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 ()
 Verifies that the inputs meta-data is consistent and valid for continued execution of the pipeline, throws an exception if not valid. More...
 
virtual void VerifyPreconditions ()
 Verifies that the process object has been configured correctly, that all required inputs are set, and needed parameters are set appropriately. If not valid an exceptions will be thrown. More...
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
virtual ~Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
- Protected Member Functions inherited from itk::LightObject
 LightObject ()
 
virtual ~LightObject ()
 
virtual LightObject::Pointer InternalClone () const
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 

Private Attributes

std::string m_FileName
 

Additional Inherited Members

- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 
- Protected Attributes inherited from itk::ProcessObject
TimeStamp m_OutputInformationMTime
 
bool m_Updating
 

Detailed Description

template<class TInputGraph>
class otb::RCC8GraphFileWriter< TInputGraph >

This class writes a RCC8 Graph to a dot file (graphviz file format).

The writer first loops on the vertices of the graph, getting the property map from each vertex and printing it in a line.

It then iterates on the edges of the graphs, printing source index, target index, and RCC8 value in a line for each of them.

See Also
RCC8GraphFileReader
RCC8Graph

Definition at line 62 of file otbRCC8GraphFileWriter.h.

Member Typedef Documentation

template<class TInputGraph>
typedef VertexType::AttributesMapType otb::RCC8GraphFileWriter< TInputGraph >::AttributesMapType

Definition at line 82 of file otbRCC8GraphFileWriter.h.

template<class TInputGraph>
typedef itk::SmartPointer<const Self> otb::RCC8GraphFileWriter< TInputGraph >::ConstPointer

Definition at line 70 of file otbRCC8GraphFileWriter.h.

template<class TInputGraph>
typedef InputGraphType::Pointer otb::RCC8GraphFileWriter< TInputGraph >::InputGraphPointerType

Definition at line 77 of file otbRCC8GraphFileWriter.h.

template<class TInputGraph>
typedef TInputGraph otb::RCC8GraphFileWriter< TInputGraph >::InputGraphType

Typedefs for the output graph type

Definition at line 74 of file otbRCC8GraphFileWriter.h.

template<class TInputGraph>
typedef itk::SmartPointer<Self> otb::RCC8GraphFileWriter< TInputGraph >::Pointer

Definition at line 69 of file otbRCC8GraphFileWriter.h.

template<class TInputGraph>
typedef InputGraphType::RCC8ValueType otb::RCC8GraphFileWriter< TInputGraph >::RCC8ValueType

Definition at line 81 of file otbRCC8GraphFileWriter.h.

template<class TInputGraph>
typedef RCC8GraphFileWriter otb::RCC8GraphFileWriter< TInputGraph >::Self

Standards typedefs

Definition at line 67 of file otbRCC8GraphFileWriter.h.

template<class TInputGraph>
typedef itk::ProcessObject otb::RCC8GraphFileWriter< TInputGraph >::Superclass

Definition at line 68 of file otbRCC8GraphFileWriter.h.

template<class TInputGraph>
typedef InputGraphType::VertexDescriptorType otb::RCC8GraphFileWriter< TInputGraph >::VertexDescriptorType

Definition at line 80 of file otbRCC8GraphFileWriter.h.

template<class TInputGraph>
typedef VertexType::Pointer otb::RCC8GraphFileWriter< TInputGraph >::VertexPointerType

Definition at line 79 of file otbRCC8GraphFileWriter.h.

template<class TInputGraph>
typedef InputGraphType::VertexType otb::RCC8GraphFileWriter< TInputGraph >::VertexType

Definition at line 78 of file otbRCC8GraphFileWriter.h.

Constructor & Destructor Documentation

template<class TInputGraph >
otb::RCC8GraphFileWriter< TInputGraph >::RCC8GraphFileWriter ( )
protected

Constructor

Definition at line 34 of file otbRCC8GraphFileWriter.txx.

template<class TInputGraph >
otb::RCC8GraphFileWriter< TInputGraph >::~RCC8GraphFileWriter ( )
protectedvirtual

Destructor

Definition at line 44 of file otbRCC8GraphFileWriter.txx.

Member Function Documentation

template<class TInputGraph>
virtual::itk::LightObject::Pointer otb::RCC8GraphFileWriter< TInputGraph >::CreateAnother ( void  ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

template<class TInputGraph >
void otb::RCC8GraphFileWriter< TInputGraph >::GenerateData ( void  )
protectedvirtual

Main computation method.

Reimplemented from itk::ProcessObject.

Definition at line 120 of file otbRCC8GraphFileWriter.txx.

References itk::Math::e, otbMsgDevMacro, and itk::ExceptionObject::SetDescription().

template<class TInputGraph>
virtual const char* otb::RCC8GraphFileWriter< TInputGraph >::GetFileName ( ) const
virtual

Get the filename

template<class TInputGraph >
RCC8GraphFileWriter< TInputGraph >::InputGraphPointerType otb::RCC8GraphFileWriter< TInputGraph >::GetInput ( void  )
virtual

Get the input graph.

Returns
The input graph pointer.

Definition at line 66 of file otbRCC8GraphFileWriter.txx.

References itk::ProcessObject::GetInput().

template<class TInputGraph>
virtual const char* otb::RCC8GraphFileWriter< TInputGraph >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::ProcessObject.

template<class TInputGraph>
static Pointer otb::RCC8GraphFileWriter< TInputGraph >::New ( )
static

Method for creation through the object factory

template<class TInputGraph >
void otb::RCC8GraphFileWriter< TInputGraph >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protectedvirtual

PrintSelf method

Reimplemented from itk::ProcessObject.

Definition at line 230 of file otbRCC8GraphFileWriter.txx.

template<class TInputGraph>
virtual void otb::RCC8GraphFileWriter< TInputGraph >::SetFileName ( const char *  _arg)
virtual

Set the filename

template<class TInputGraph >
void otb::RCC8GraphFileWriter< TInputGraph >::SetInput ( const InputGraphType graph)
virtual

Set the input graph.

Parameters
inputGraphThe graph to write.

Set the input graph.

Parameters
graphThe graph to write.

Definition at line 54 of file otbRCC8GraphFileWriter.txx.

References itk::ProcessObject::SetNthInput().

template<class TInputGraph >
void otb::RCC8GraphFileWriter< TInputGraph >::Update ( void  )
virtual

Update method.

Update method. (Call the Write() method).

Reimplemented from itk::ProcessObject.

Definition at line 77 of file otbRCC8GraphFileWriter.txx.

template<class TInputGraph >
void otb::RCC8GraphFileWriter< TInputGraph >::Write ( void  )
protectedvirtual

Write Method. Performs checkings and invoke GenerateData().

Definition at line 88 of file otbRCC8GraphFileWriter.txx.

template<class TInputGraph >
void otb::RCC8GraphFileWriter< TInputGraph >::WriteEdge ( std::ofstream &  of,
VertexDescriptorType  source,
VertexDescriptorType  target,
RCC8ValueType  value 
)
protected

Write an edge to file.

Parameters
ofThe output file stream.
sourceThe index of the source vertex.
targetThe index of the target vertex.
valueThe value of the edge.

Definition at line 183 of file otbRCC8GraphFileWriter.txx.

References otbMsgDevMacro.

template<class TInputGraph >
void otb::RCC8GraphFileWriter< TInputGraph >::WriteVertex ( std::ofstream &  of,
VertexDescriptorType  index,
VertexPointerType  vertex 
)
protected

Write a vertex to file.

Parameters
ofThe output file stream.
indexThe index of the edge to write.
vertexThe pointer to the vertex object.

Definition at line 200 of file otbRCC8GraphFileWriter.txx.

References otbMsgDevMacro.

Member Data Documentation

template<class TInputGraph>
std::string otb::RCC8GraphFileWriter< TInputGraph >::m_FileName
private

Filename of the graph file to write

Definition at line 141 of file otbRCC8GraphFileWriter.h.


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

Generated at Sat Oct 11 2014 17:17:31 for Orfeo Toolbox with doxygen 1.8.3.1