19 #ifndef itkCSVFileReaderBase_h
20 #define itkCSVFileReaderBase_h
23 #include <vcl_limits.h>
27 #include "ITKIOCSVExport.h"
75 itkSetStringMacro(FileName);
80 itkSetMacro(FieldDelimiterCharacter,
char);
83 itkGetMacro(FieldDelimiterCharacter,
char);
87 itkSetMacro(UseStringDelimiterCharacter,
bool);
90 itkGetConstMacro(UseStringDelimiterCharacter,
bool);
93 itkSetMacro(StringDelimiterCharacter,
char);
96 itkGetMacro(StringDelimiterCharacter,
char);
100 itkSetMacro(HasRowHeaders,
bool);
103 itkGetConstMacro(HasRowHeaders,
bool);
107 itkSetMacro(HasColumnHeaders,
bool);
110 itkGetConstMacro(HasColumnHeaders,
bool);
115 itkBooleanMacro(HasRowHeaders);
116 itkBooleanMacro(HasColumnHeaders);
117 itkBooleanMacro(UseStringDelimiterCharacter);
126 void GetNextField(std::string & );
135 template <
typename TData>
139 std::istringstream isstream(str);
142 if ((isstream >> value).fail() || !(isstream >> std::ws).eof())
144 return std::numeric_limits<TData>::quiet_NaN();
157 virtual void Parse()=0;
173 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
176 void PrepareForParsing();
180 void operator=(
const Self &);
Light weight base class for most itk classes.
char m_FieldDelimiterCharacter
unsigned long SizeValueType
char m_StringDelimiterCharacter
LightProcessObject Superclass
virtual ~CSVFileReaderBase()
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