19 #ifndef itkCSVFileReaderBase_h
20 #define itkCSVFileReaderBase_h
23 #if !defined( ITK_LEGACY_FUTURE_REMOVE )
24 # include <vcl_limits.h>
30 #include "ITKIOCSVExport.h"
80 itkSetStringMacro(FileName);
85 itkSetMacro(FieldDelimiterCharacter,
char);
88 itkGetMacro(FieldDelimiterCharacter,
char);
92 itkSetMacro(UseStringDelimiterCharacter,
bool);
95 itkGetConstMacro(UseStringDelimiterCharacter,
bool);
98 itkSetMacro(StringDelimiterCharacter,
char);
101 itkGetMacro(StringDelimiterCharacter,
char);
105 itkSetMacro(HasRowHeaders,
bool);
108 itkGetConstMacro(HasRowHeaders,
bool);
112 itkSetMacro(HasColumnHeaders,
bool);
115 itkGetConstMacro(HasColumnHeaders,
bool);
120 itkBooleanMacro(HasRowHeaders);
121 itkBooleanMacro(HasColumnHeaders);
122 itkBooleanMacro(UseStringDelimiterCharacter);
131 void GetNextField(std::string & );
140 template <
typename TData>
144 std::istringstream isstream(str);
147 if ((isstream >> value).fail() || !(isstream >> std::ws).eof())
149 return std::numeric_limits<TData>::quiet_NaN();
162 virtual void Parse()=0;
178 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
181 void PrepareForParsing();
virtual ~CSVFileReaderBase() override
char m_FieldDelimiterCharacter
unsigned long SizeValueType
char m_StringDelimiterCharacter
LightProcessObject Superclass
std::ifstream m_InputStream
bool m_UseStringDelimiterCharacter
SmartPointer< Self > Pointer
SmartPointer< const Self > ConstPointer
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)
int m_EndOfColumnHeadersLine