ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::CSVArray2DDataObject< TData > Class Template Reference

#include <itkCSVArray2DDataObject.h>

Detailed Description

template<typename TData>
class itk::CSVArray2DDataObject< TData >

Stores parsed data from csv files.

CSVArray2DDataObject contains methods for accessing data from the Array2D object. It is used in the CSVFileToArray2DReader class for storing parsed data. The CSVArray2DDataObject comprises of an Array2D object and two std string vectors for storing row and column headers. Individual rows, columns and data fields can be accessed either by the names of the headers or by indices. There are also some mutator methods that can be used to modify values in the Array2D object as well as PushBack functions for pushing column and row headers into their respective vectors.

Definition at line 47 of file itkCSVArray2DDataObject.h.

+ Inheritance diagram for itk::CSVArray2DDataObject< TData >:
+ Collaboration diagram for itk::CSVArray2DDataObject< TData >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using MatrixType = typename itk::Array2D< TData >
 
using NumericVectorType = typename std::vector< TData >
 
using Pointer = SmartPointer< Self >
 
using Self = CSVArray2DDataObject
 
using StringVectorType = typename std::vector< std::string >
 
using Superclass = DataObject
 
- Public Types inherited from itk::DataObject
using ConstPointer = SmartPointer< const Self >
 
using DataObjectIdentifierType = std::string
 
using DataObjectPointerArraySizeType = std::vector< Pointer >::size_type
 
using Pointer = SmartPointer< Self >
 
using Self = DataObject
 
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 &)
 
void EraseFirstColumnHeader ()
 
void FillMatrix (TData value)
 
NumericVectorType GetColumn (const std::string &) const
 
NumericVectorType GetColumn (const unsigned int) const
 
TData GetColumnData (const std::string &, const unsigned int) const
 
StringVectorType GetColumnHeaders () const
 
unsigned int GetColumnIndexByName (const std::string &) const
 
TData GetData (const std::string &, const std::string &) const
 
TData GetData (const unsigned int, const unsigned int) const
 
virtual MatrixType GetMatrix ()
 
const char * GetNameOfClass () const override
 
NumericVectorType GetRow (const std::string &) const
 
NumericVectorType GetRow (const unsigned int) const
 
TData GetRowData (const std::string &, const unsigned int) const
 
StringVectorType GetRowHeaders () const
 
unsigned int GetRowIndexByName (const std::string &) const
 
TData operator() (const std::string &, const std::string &) const
 
TData operator() (const unsigned int, const unsigned int) const
 
void RowHeadersPushBack (const std::string &)
 
void SetMatrixData (unsigned int, unsigned int, TData)
 
void SetMatrixSize (unsigned int, unsigned int)
 
virtual void SetHasColumnHeaders (bool _arg)
 
virtual void SetHasRowHeaders (bool _arg)
 
virtual void HasColumnHeadersOn ()
 
virtual void HasRowHeadersOn ()
 
virtual bool GetHasColumnHeaders () const
 
virtual bool GetHasRowHeaders () const
 
- Public Member Functions inherited from itk::DataObject
virtual void CopyInformation (const DataObject *)
 
virtual void DataHasBeenGenerated ()
 
void DisconnectPipeline ()
 
bool GetDataReleased () const
 
const char * GetNameOfClass () const override
 
virtual const bool & GetReleaseDataFlag () const
 
SmartPointer< ProcessObjectGetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierTypeGetSourceOutputName () const
 
virtual ModifiedTimeType GetUpdateMTime () const
 
virtual void Graft (const DataObject *)
 
virtual void Initialize ()
 
virtual void PrepareForNewData ()
 
virtual void PropagateRequestedRegion ()
 
void ReleaseData ()
 
virtual void ReleaseDataFlagOn ()
 
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion ()
 
virtual void ResetPipeline ()
 
void SetReleaseDataFlag (bool flag)
 
virtual void SetRequestedRegion (const DataObject *)
 
virtual void SetRequestedRegionToLargestPossibleRegion ()
 
bool ShouldIReleaseData () const
 
virtual void Update ()
 
virtual void UpdateOutputData ()
 
virtual void UpdateOutputInformation ()
 
void UpdateSource () const
 
virtual bool VerifyRequestedRegion ()
 
void SetPipelineMTime (ModifiedTimeType time)
 
virtual const ModifiedTimeTypeGetPipelineMTime () const
 
virtual void SetRealTimeStamp (RealTimeStamp _arg)
 
virtual const RealTimeStampGetRealTimeStamp () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *cmd) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
const char * GetNameOfClass () const override
 
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) const
 
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 Pointer CreateAnother () const
 
virtual void Delete ()
 
virtual const char * GetNameOfClass () const
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const noexcept
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::DataObject
static bool GetGlobalReleaseDataFlag ()
 
static void GlobalReleaseDataFlagOff ()
 
static void GlobalReleaseDataFlagOn ()
 
static Pointer New ()
 
static void SetGlobalReleaseDataFlag (bool val)
 
- 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

 CSVArray2DDataObject ()=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~CSVArray2DDataObject () override=default
 
- Protected Member Functions inherited from itk::DataObject
 DataObject ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void PropagateResetPipeline ()
 
 ~DataObject () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintSelf (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

StringVectorType m_ColumnHeaders {}
 
bool m_HasColumnHeaders { false }
 
bool m_HasRowHeaders { false }
 
MatrixType m_Matrix {}
 
StringVectorType m_RowHeaders {}
 

Additional Inherited Members

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

Member Typedef Documentation

◆ ConstPointer

template<typename TData >
using itk::CSVArray2DDataObject< TData >::ConstPointer = SmartPointer<const Self>

Definition at line 56 of file itkCSVArray2DDataObject.h.

◆ MatrixType

template<typename TData >
using itk::CSVArray2DDataObject< TData >::MatrixType = typename itk::Array2D<TData>

Typedef for the Array2D object.

Definition at line 69 of file itkCSVArray2DDataObject.h.

◆ NumericVectorType

template<typename TData >
using itk::CSVArray2DDataObject< TData >::NumericVectorType = typename std::vector<TData>

Definition at line 65 of file itkCSVArray2DDataObject.h.

◆ Pointer

template<typename TData >
using itk::CSVArray2DDataObject< TData >::Pointer = SmartPointer<Self>

Definition at line 55 of file itkCSVArray2DDataObject.h.

◆ Self

template<typename TData >
using itk::CSVArray2DDataObject< TData >::Self = CSVArray2DDataObject

Definition at line 53 of file itkCSVArray2DDataObject.h.

◆ StringVectorType

template<typename TData >
using itk::CSVArray2DDataObject< TData >::StringVectorType = typename std::vector<std::string>

Definition at line 66 of file itkCSVArray2DDataObject.h.

◆ Superclass

template<typename TData >
using itk::CSVArray2DDataObject< TData >::Superclass = DataObject

Definition at line 54 of file itkCSVArray2DDataObject.h.

Constructor & Destructor Documentation

◆ CSVArray2DDataObject()

template<typename TData >
itk::CSVArray2DDataObject< TData >::CSVArray2DDataObject ( )
protecteddefault

◆ ~CSVArray2DDataObject()

template<typename TData >
itk::CSVArray2DDataObject< TData >::~CSVArray2DDataObject ( )
overrideprotecteddefault

Member Function Documentation

◆ ColumnHeadersPushBack()

template<typename TData >
void itk::CSVArray2DDataObject< TData >::ColumnHeadersPushBack ( const std::string &  )

Method to add a column header to the vector of column headers.

◆ EraseFirstColumnHeader()

template<typename TData >
void itk::CSVArray2DDataObject< TData >::EraseFirstColumnHeader ( )

Method to erase the first column header if it is the name of the table.

◆ FillMatrix()

template<typename TData >
void itk::CSVArray2DDataObject< TData >::FillMatrix ( TData  value)

Method to fill the Array2D object with a value.

◆ GetColumn() [1/2]

template<typename TData >
NumericVectorType itk::CSVArray2DDataObject< TData >::GetColumn ( const std::string &  ) const

Returns a Column. Input to the method is a column header string.

◆ GetColumn() [2/2]

template<typename TData >
NumericVectorType itk::CSVArray2DDataObject< TData >::GetColumn ( const unsigned int  ) const

Get Column method. Input to the method is a column index.

◆ GetColumnData()

template<typename TData >
TData itk::CSVArray2DDataObject< TData >::GetColumnData ( const std::string &  ,
const unsigned int   
) const

Method to access a data field from a particular column. Inputs are the column header string and the row index.

◆ GetColumnHeaders()

template<typename TData >
StringVectorType itk::CSVArray2DDataObject< TData >::GetColumnHeaders ( ) const

Returns the Column Headers.

◆ GetColumnIndexByName()

template<typename TData >
unsigned int itk::CSVArray2DDataObject< TData >::GetColumnIndexByName ( const std::string &  ) const

Returns a Column index by name.

◆ GetData() [1/2]

template<typename TData >
TData itk::CSVArray2DDataObject< TData >::GetData ( const std::string &  ,
const std::string &   
) const

Method to access a data field from the Array2D object. Inputs are row and column header strings in that order.

◆ GetData() [2/2]

template<typename TData >
TData itk::CSVArray2DDataObject< TData >::GetData ( const unsigned int  ,
const unsigned int   
) const

Method to access a data field from the Array2D object. Inputs are row and column indices in that order.

◆ GetHasColumnHeaders()

template<typename TData >
virtual bool itk::CSVArray2DDataObject< TData >::GetHasColumnHeaders ( ) const
virtual

Get macros for Column and Row headers.

◆ GetHasRowHeaders()

template<typename TData >
virtual bool itk::CSVArray2DDataObject< TData >::GetHasRowHeaders ( ) const
virtual

Get macros for Column and Row headers.

◆ GetMatrix()

template<typename TData >
virtual MatrixType itk::CSVArray2DDataObject< TData >::GetMatrix ( )
virtual

Get macro for the matrix.

◆ GetNameOfClass()

template<typename TData >
const char * itk::CSVArray2DDataObject< TData >::GetNameOfClass ( ) const
overridevirtual
See also
LightObject::GetNameOfClass()

Reimplemented from itk::DataObject.

◆ GetRow() [1/2]

template<typename TData >
NumericVectorType itk::CSVArray2DDataObject< TData >::GetRow ( const std::string &  ) const

Returns a row. Input to the method is a row header string.

◆ GetRow() [2/2]

template<typename TData >
NumericVectorType itk::CSVArray2DDataObject< TData >::GetRow ( const unsigned int  ) const

Returns a Row. Input to the method is a row index.

◆ GetRowData()

template<typename TData >
TData itk::CSVArray2DDataObject< TData >::GetRowData ( const std::string &  ,
const unsigned int   
) const

Method to access a data field from a particular row. Inputs are the row header string and the column index.

◆ GetRowHeaders()

template<typename TData >
StringVectorType itk::CSVArray2DDataObject< TData >::GetRowHeaders ( ) const

Returns the Row Headers.

◆ GetRowIndexByName()

template<typename TData >
unsigned int itk::CSVArray2DDataObject< TData >::GetRowIndexByName ( const std::string &  ) const

Returns a Row index by name.

◆ HasColumnHeadersOn()

template<typename TData >
virtual void itk::CSVArray2DDataObject< TData >::HasColumnHeadersOn ( )
virtual

Set macros

◆ HasRowHeadersOn()

template<typename TData >
virtual void itk::CSVArray2DDataObject< TData >::HasRowHeadersOn ( )
virtual

Set macros

◆ New()

template<typename TData >
static Pointer itk::CSVArray2DDataObject< TData >::New ( )
static

Standard New method.

◆ operator()() [1/2]

template<typename TData >
TData itk::CSVArray2DDataObject< TData >::operator() ( const std::string &  ,
const std::string &   
) const

Method to access a data field from the Array2D object using the () operator.Inputs are the row and column header strings in that order.

◆ operator()() [2/2]

template<typename TData >
TData itk::CSVArray2DDataObject< TData >::operator() ( const unsigned int  ,
const unsigned int   
) const

Method to access a data field from the Array2D object using the () operator. Inputs are the row and column indices in that order.

◆ PrintSelf()

template<typename TData >
void itk::CSVArray2DDataObject< TData >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Print method

Reimplemented from itk::DataObject.

◆ RowHeadersPushBack()

template<typename TData >
void itk::CSVArray2DDataObject< TData >::RowHeadersPushBack ( const std::string &  )

Method to add a row header to the vector of row headers.

◆ SetHasColumnHeaders()

template<typename TData >
virtual void itk::CSVArray2DDataObject< TData >::SetHasColumnHeaders ( bool  _arg)
virtual

Set macros

◆ SetHasRowHeaders()

template<typename TData >
virtual void itk::CSVArray2DDataObject< TData >::SetHasRowHeaders ( bool  _arg)
virtual

Set macros

◆ SetMatrixData()

template<typename TData >
void itk::CSVArray2DDataObject< TData >::SetMatrixData ( unsigned int  ,
unsigned int  ,
TData   
)

Method to set the Array2D object with data at particular row and column indices.

◆ SetMatrixSize()

template<typename TData >
void itk::CSVArray2DDataObject< TData >::SetMatrixSize ( unsigned int  ,
unsigned int   
)

Method to set the size of the Array2D object.

Member Data Documentation

◆ m_ColumnHeaders

template<typename TData >
StringVectorType itk::CSVArray2DDataObject< TData >::m_ColumnHeaders {}
private

Definition at line 182 of file itkCSVArray2DDataObject.h.

◆ m_HasColumnHeaders

template<typename TData >
bool itk::CSVArray2DDataObject< TData >::m_HasColumnHeaders { false }
private

Definition at line 185 of file itkCSVArray2DDataObject.h.

◆ m_HasRowHeaders

template<typename TData >
bool itk::CSVArray2DDataObject< TData >::m_HasRowHeaders { false }
private

Definition at line 184 of file itkCSVArray2DDataObject.h.

◆ m_Matrix

template<typename TData >
MatrixType itk::CSVArray2DDataObject< TData >::m_Matrix {}
private

Definition at line 181 of file itkCSVArray2DDataObject.h.

◆ m_RowHeaders

template<typename TData >
StringVectorType itk::CSVArray2DDataObject< TData >::m_RowHeaders {}
private

Definition at line 183 of file itkCSVArray2DDataObject.h.


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