ITK  4.3.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns > Class Template Reference

#include <itkCSVNumericObjectFileWriter.h>

+ Inheritance diagram for itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >:
+ Collaboration diagram for itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >:

Detailed Description

template<class TValueType, unsigned int NRows = 0, unsigned int NColumns = 0>
class itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >

Writes out numeric itk data objects to a csv file.

CSVNumericObjectFileWriter writes numeric data from an itk object into a csv file. It is templated over the type of data being written, the number of rows and the number of columns. The writer uses the datablock member from vnl_matrix or vnl_matrix_fixed. As of now the objects itkMatrix, itkArray2D, and any vnl_matrix based objects are supported.

The user specifies the file name and the field delimiter character using the Set macro method for each. The user can also write out row and column headers. The methods ColumnHeadersPushBack() and RowHeadersPushBack() can be used to push strings into the vectors for row and column headers. The row and column headers can also be set using the Set macro methods for each if vectors for the headers are already set. The SetInput() method is overloaded to allow various itk objects to be set as input.

The method Write() is used to output the object data to a csv file.

The writer will output a warning if the number of row headers is not consistent with the number of rows in the input object or if the number of column headers is not consistent with the number of columns in the input object. It is up to the user to check this.

Definition at line 61 of file itkCSVNumericObjectFileWriter.h.

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef itk::Matrix
< TValueType, NRows, NColumns > 
itkMatrixType
 
typedef SmartPointer< SelfPointer
 
typedef CSVNumericObjectFileWriter Self
 
typedef itk::Size
< 2 >::SizeValueType 
SizeValueType
 
typedef std::vector< std::string > StringVectorType
 
typedef LightProcessObject Superclass
 
typedef vnl_matrix_fixed
< TValueType, NRows, NColumns > 
vnlFixedMatrixType
 
typedef vnl_matrix< TValueType > vnlMatrixType
 
- Public Types inherited from itk::LightProcessObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightProcessObject 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

void ColumnHeadersPushBack (const std::string &)
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
void PrepareForWriting ()
 
void RowHeadersPushBack (const std::string &)
 
void SetColumnHeaders (const StringVectorType &columnheaders)
 
virtual void SetFieldDelimiterCharacter (char _arg)
 
virtual void SetFileName (const char *_arg)
 
void SetInput (const vnlMatrixType *obj)
 
void SetInput (const vnlFixedMatrixType *obj)
 
void SetInput (const itkMatrixType *obj)
 
void SetRowHeaders (const StringVectorType &rowheaders)
 
virtual void Update ()
 
virtual void Write ()
 
- Public Member Functions inherited from itk::LightProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual const bool & GetAbortGenerateData ()
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void UpdateOutputData ()
 
void UpdateProgress (float amount)
 
virtual void SetProgress (float _arg)
 
virtual const float & GetProgress ()
 
- 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 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
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const
 
- 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 itk::LightProcessObject
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 ()
 

Protected Member Functions

 CSVNumericObjectFileWriter ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
virtual ~CSVNumericObjectFileWriter ()
 
- Protected Member Functions inherited from itk::LightProcessObject
virtual void GenerateData ()
 
 LightProcessObject ()
 
 ~LightProcessObject ()
 
- 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 ()
 

Private Member Functions

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

Private Attributes

StringVectorType m_ColumnHeaders
 
SizeValueType m_Columns
 
char m_FieldDelimiterCharacter
 
std::string m_FileName
 
TValueType * m_InputObject
 
StringVectorType m_RowHeaders
 
SizeValueType m_Rows
 

Additional Inherited Members

- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 
- Protected Attributes inherited from itk::LightObject
InternalReferenceCountType m_ReferenceCount
 
SimpleFastMutexLock m_ReferenceCountLock
 

Member Typedef Documentation

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
typedef SmartPointer<const Self> itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::ConstPointer

Definition at line 68 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
typedef itk::Matrix<TValueType,NRows,NColumns> itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::itkMatrixType

Definition at line 79 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
typedef SmartPointer<Self> itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::Pointer

Definition at line 67 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
typedef CSVNumericObjectFileWriter itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::Self

Standard class typedefs

Definition at line 65 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
typedef itk::Size<2>::SizeValueType itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::SizeValueType

Definition at line 83 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
typedef std::vector<std::string> itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::StringVectorType

Definition at line 81 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
typedef LightProcessObject itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::Superclass

Definition at line 66 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
typedef vnl_matrix_fixed<TValueType, NRows, NColumns> itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::vnlFixedMatrixType

Definition at line 78 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
typedef vnl_matrix<TValueType> itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::vnlMatrixType

Definition at line 74 of file itkCSVNumericObjectFileWriter.h.

Constructor & Destructor Documentation

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::CSVNumericObjectFileWriter ( )
protected
template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
virtual itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::~CSVNumericObjectFileWriter ( )
inlineprotectedvirtual

Definition at line 116 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::CSVNumericObjectFileWriter ( const Self )
private

Member Function Documentation

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::ColumnHeadersPushBack ( const std::string &  )
template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
virtual::itk::LightObject::Pointer itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::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::LightProcessObject.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
virtual const char* itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::LightProcessObject.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
static Pointer itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::New ( )
static

Method for creation through the object factory.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::operator= ( const Self )
private
template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::PrepareForWriting ( )
template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::LightProcessObject.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::RowHeadersPushBack ( const std::string &  )
template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::SetColumnHeaders ( const StringVectorType columnheaders)
template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
virtual void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::SetFieldDelimiterCharacter ( char  _arg)
virtual
template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
virtual void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::SetFileName ( const char *  _arg)
virtual
template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::SetInput ( const vnlMatrixType obj)

Set the input object if the matrix is of vnl_matrix type or Array2D.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::SetInput ( const vnlFixedMatrixType obj)

Set the input object if the matrix is of vnl_matrix_fixed type.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::SetInput ( const itkMatrixType obj)

Set the input object if the matrix is of itkMatrixType.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::SetRowHeaders ( const StringVectorType rowheaders)
template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
virtual void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::Update ( )
virtual

Aliased to the Write() method to be consistent with the rest of the pipeline.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
virtual void itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::Write ( )
virtual

Write out the object

Member Data Documentation

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
StringVectorType itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::m_ColumnHeaders
private

Definition at line 125 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
SizeValueType itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::m_Columns
private

Definition at line 124 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
char itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::m_FieldDelimiterCharacter
private

Definition at line 122 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
std::string itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::m_FileName
private

Definition at line 120 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
TValueType* itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::m_InputObject
private

Definition at line 121 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
StringVectorType itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::m_RowHeaders
private

Definition at line 126 of file itkCSVNumericObjectFileWriter.h.

template<class TValueType , unsigned int NRows = 0, unsigned int NColumns = 0>
SizeValueType itk::CSVNumericObjectFileWriter< TValueType, NRows, NColumns >::m_Rows
private

Definition at line 123 of file itkCSVNumericObjectFileWriter.h.


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