19 #ifndef itkCSVFileReaderBase_h
20 #define itkCSVFileReaderBase_h
27 #include "ITKIOCSVExport.h"
79 itkSetStringMacro(FileName);
84 itkSetMacro(FieldDelimiterCharacter,
char);
87 itkGetMacro(FieldDelimiterCharacter,
char);
91 itkSetMacro(UseStringDelimiterCharacter,
bool);
94 itkGetConstMacro(UseStringDelimiterCharacter,
bool);
97 itkSetMacro(StringDelimiterCharacter,
char);
100 itkGetMacro(StringDelimiterCharacter,
char);
104 itkSetMacro(HasRowHeaders,
bool);
107 itkGetConstMacro(HasRowHeaders,
bool);
111 itkSetMacro(HasColumnHeaders,
bool);
114 itkGetConstMacro(HasColumnHeaders,
bool);
119 itkBooleanMacro(HasRowHeaders);
120 itkBooleanMacro(HasColumnHeaders);
121 itkBooleanMacro(UseStringDelimiterCharacter);
130 void GetNextField(std::string & );
139 template <
typename TData>
143 std::istringstream isstream(str);
146 if ((isstream >> value).fail() || !(isstream >> std::ws).eof())
148 return std::numeric_limits<TData>::quiet_NaN();
161 virtual void Parse()=0;
177 void PrintSelf(std::ostream & os,
Indent indent)
const override;
180 void PrepareForParsing();
Light weight base class for most itk classes.
unsigned long SizeValueType
char m_FieldDelimiterCharacter
char m_StringDelimiterCharacter
std::ifstream m_InputStream
bool m_UseStringDelimiterCharacter
LightProcessObject is the base class for all process objects (source, filters, mappers) in the Insigh...
Control indentation during Print() invocation.
A base class that contains common methods used for parsing csv files.
TData ConvertStringToValueType(const std::string str)
Base class for most ITK classes.
int m_EndOfColumnHeadersLine