19 #ifndef __itkCSVFileReaderBase_h
20 #define __itkCSVFileReaderBase_h
23 #include <vcl_limits.h>
74 itkSetStringMacro(FileName);
79 itkSetMacro(FieldDelimiterCharacter,
char);
82 itkGetMacro(FieldDelimiterCharacter,
char);
86 itkSetMacro(UseStringDelimiterCharacter,
bool);
89 itkGetConstMacro(UseStringDelimiterCharacter,
bool);
92 itkSetMacro(StringDelimiterCharacter,
char);
95 itkGetMacro(StringDelimiterCharacter,
char);
99 itkSetMacro(HasRowHeaders,
bool);
102 itkGetConstMacro(HasRowHeaders,
bool);
106 itkSetMacro(HasColumnHeaders,
bool);
109 itkGetConstMacro(HasColumnHeaders,
bool);
114 itkBooleanMacro(HasRowHeaders);
115 itkBooleanMacro(HasColumnHeaders);
116 itkBooleanMacro(UseStringDelimiterCharacter);
125 void GetNextField(std::string & );
134 template <
class TData>
135 TData ConvertStringToValueType(
const std::string str)
138 std::istringstream isstream(str);
141 if ((isstream >> value).fail() || !(isstream >> std::ws).eof())
143 return vcl_numeric_limits<TData>::quiet_NaN();
156 virtual void Parse()=0;
172 void PrintSelf(std::ostream & os,
Indent indent)
const;
175 void PrepareForParsing();
179 void operator=(
const Self &);