Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
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 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)
 

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)
 

Private Attributes

std::string m_FileName
 

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
template<class TInputGraph >
void otb::RCC8GraphFileWriter< TInputGraph >::GenerateData ( void  )
protectedvirtual

Main computation method.

Definition at line 120 of file otbRCC8GraphFileWriter.txx.

References otbMsgDevMacro.

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.

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

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.

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

Update method.

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

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: