19 #ifndef itkCSVFileReaderBase_h 20 #define itkCSVFileReaderBase_h 23 #if !defined( ITK_LEGACY_FUTURE_REMOVE ) 24 # include <vcl_limits.h> 30 #include "ITKIOCSVExport.h" 75 itkTypeMacro(Self,Superclass);
78 itkSetStringMacro(FileName);
83 itkSetMacro(FieldDelimiterCharacter,
char);
86 itkGetMacro(FieldDelimiterCharacter,
char);
90 itkSetMacro(UseStringDelimiterCharacter,
bool);
93 itkGetConstMacro(UseStringDelimiterCharacter,
bool);
96 itkSetMacro(StringDelimiterCharacter,
char);
99 itkGetMacro(StringDelimiterCharacter,
char);
103 itkSetMacro(HasRowHeaders,
bool);
106 itkGetConstMacro(HasRowHeaders,
bool);
110 itkSetMacro(HasColumnHeaders,
bool);
113 itkGetConstMacro(HasColumnHeaders,
bool);
118 itkBooleanMacro(HasRowHeaders);
119 itkBooleanMacro(HasColumnHeaders);
120 itkBooleanMacro(UseStringDelimiterCharacter);
129 void GetNextField(std::string & );
138 template <
typename TData>
142 std::istringstream isstream(str);
145 if ((isstream >> value).fail() || !(isstream >> std::ws).eof())
147 return std::numeric_limits<TData>::quiet_NaN();
160 virtual void Parse()=0;
176 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
179 void PrepareForParsing();
183 void operator=(
const Self &) ITK_DELETE_FUNCTION;
char m_FieldDelimiterCharacter
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
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)
int m_EndOfColumnHeadersLine