ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns > Class Template Reference

#include <itkCSVNumericObjectFileWriter.h>

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

Public Types

using ConstPointer = SmartPointer< const Self >
 
using itkMatrixType = itk::Matrix< TValue, NRows, NColumns >
 
using Pointer = SmartPointer< Self >
 
using Self = CSVNumericObjectFileWriter
 
using SizeValueType = itk::Size< 2 >::SizeValueType
 
using StringVectorType = std::vector< std::string >
 
using Superclass = LightProcessObject
 
using vnlFixedMatrixType = vnl_matrix_fixed< TValue, NRows, NColumns >
 
using vnlMatrixType = vnl_matrix< TValue >
 
- Public Types inherited from itk::LightProcessObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightProcessObject
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

void ColumnHeadersPushBack (const std::string &)
 
virtual ::itk::LightObject::Pointer CreateAnother () 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 itkMatrixType *obj)
 
void SetInput (const vnlFixedMatrixType *obj)
 
void SetInput (const vnlMatrixType *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 () const
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void SetProgress (float _arg)
 
virtual const float & GetProgress () const
 
void UpdateProgress (float amount)
 
virtual void UpdateOutputData ()
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () 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
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
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 val)
 
- 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 override
 
 ~CSVNumericObjectFileWriter () override=default
 
- Protected Member Functions inherited from itk::LightProcessObject
 LightProcessObject ()
 
 ~LightProcessObject () override
 
virtual void GenerateData ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
- 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 Attributes

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

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TValue, unsigned int NRows = 0, unsigned int NColumns = 0>
class itk::CSVNumericObjectFileWriter< TValue, 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 62 of file itkCSVNumericObjectFileWriter.h.

Member Typedef Documentation

◆ ConstPointer

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
using itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::ConstPointer = SmartPointer<const Self>

Definition at line 71 of file itkCSVNumericObjectFileWriter.h.

◆ itkMatrixType

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
using itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::itkMatrixType = itk::Matrix<TValue, NRows, NColumns>

Definition at line 82 of file itkCSVNumericObjectFileWriter.h.

◆ Pointer

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
using itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::Pointer = SmartPointer<Self>

Definition at line 70 of file itkCSVNumericObjectFileWriter.h.

◆ Self

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
using itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::Self = CSVNumericObjectFileWriter

Standard class type aliases

Definition at line 68 of file itkCSVNumericObjectFileWriter.h.

◆ SizeValueType

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
using itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::SizeValueType = itk::Size<2>::SizeValueType

Definition at line 86 of file itkCSVNumericObjectFileWriter.h.

◆ StringVectorType

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
using itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::StringVectorType = std::vector<std::string>

Definition at line 84 of file itkCSVNumericObjectFileWriter.h.

◆ Superclass

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
using itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::Superclass = LightProcessObject

Definition at line 69 of file itkCSVNumericObjectFileWriter.h.

◆ vnlFixedMatrixType

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
using itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::vnlFixedMatrixType = vnl_matrix_fixed<TValue, NRows, NColumns>

Definition at line 81 of file itkCSVNumericObjectFileWriter.h.

◆ vnlMatrixType

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
using itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::vnlMatrixType = vnl_matrix<TValue>

Definition at line 80 of file itkCSVNumericObjectFileWriter.h.

Constructor & Destructor Documentation

◆ CSVNumericObjectFileWriter()

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::CSVNumericObjectFileWriter ( )
protected

◆ ~CSVNumericObjectFileWriter()

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::~CSVNumericObjectFileWriter ( )
overrideprotecteddefault

Member Function Documentation

◆ ColumnHeadersPushBack()

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::ColumnHeadersPushBack ( const std::string &  )

◆ CreateAnother()

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
virtual::itk::LightObject::Pointer itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::CreateAnother ( ) 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.

◆ GetNameOfClass()

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

Run-time type information (and related methods).

Reimplemented from itk::LightProcessObject.

◆ New()

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

Method for creation through the object factory.

◆ PrepareForWriting()

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::PrepareForWriting ( )

◆ PrintSelf()

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

These support the progress method and aborting filter execution.

Reimplemented from itk::LightProcessObject.

◆ RowHeadersPushBack()

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::RowHeadersPushBack ( const std::string &  )

◆ SetColumnHeaders()

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::SetColumnHeaders ( const StringVectorType columnheaders)

◆ SetFieldDelimiterCharacter()

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
virtual void itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::SetFieldDelimiterCharacter ( char  _arg)
virtual

◆ SetFileName()

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
virtual void itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::SetFileName ( const char *  _arg)
virtual

◆ SetInput() [1/3]

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

Set the input object if the matrix is of itkMatrixType.

◆ SetInput() [2/3]

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

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

◆ SetInput() [3/3]

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::SetInput ( const vnlMatrixType obj)

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

◆ SetRowHeaders()

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
void itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::SetRowHeaders ( const StringVectorType rowheaders)

◆ Update()

template<typename TValue , unsigned int NRows = 0, unsigned int NColumns = 0>
virtual void itk::CSVNumericObjectFileWriter< TValue, NRows, NColumns >::Update ( )
virtual

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

◆ Write()

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

Write out the object

Member Data Documentation

◆ m_ColumnHeaders

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

Definition at line 138 of file itkCSVNumericObjectFileWriter.h.

◆ m_Columns

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

Definition at line 137 of file itkCSVNumericObjectFileWriter.h.

◆ m_FieldDelimiterCharacter

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

Definition at line 135 of file itkCSVNumericObjectFileWriter.h.

◆ m_FileName

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

Definition at line 133 of file itkCSVNumericObjectFileWriter.h.

◆ m_InputObject

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

Definition at line 134 of file itkCSVNumericObjectFileWriter.h.

◆ m_RowHeaders

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

Definition at line 139 of file itkCSVNumericObjectFileWriter.h.

◆ m_Rows

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

Definition at line 136 of file itkCSVNumericObjectFileWriter.h.


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