50 #ifndef vtkDelimitedTextReader_h
51 #define vtkDelimitedTextReader_h
53 #include "vtkIOInfovisModule.h"
60 VTK_ABI_NAMESPACE_BEGIN
75 vtkGetFilePathMacro(FileName);
76 vtkSetFilePathMacro(FileName);
86 void SetInputString(
const char* in);
87 vtkGetStringMacro(InputString);
88 void SetInputString(
const char* in,
int len);
89 vtkGetMacro(InputStringLength,
int);
92 this->SetInputString(input.c_str(),
static_cast<int>(input.length()));
118 vtkGetStringMacro(UnicodeCharacterSet);
119 vtkSetStringMacro(UnicodeCharacterSet);
128 void SetUTF8RecordDelimiters(
const char* delimiters);
129 const char* GetUTF8RecordDelimiters();
140 vtkSetStringMacro(FieldDelimiterCharacters);
141 vtkGetStringMacro(FieldDelimiterCharacters);
144 void SetUTF8FieldDelimiters(
const char* delimiters);
145 const char* GetUTF8FieldDelimiters();
157 vtkGetMacro(StringDelimiter,
char);
158 vtkSetMacro(StringDelimiter,
char);
161 void SetUTF8StringDelimiters(
const char* delimiters);
162 const char* GetUTF8StringDelimiters();
168 vtkSetMacro(UseStringDelimiter,
bool);
169 vtkGetMacro(UseStringDelimiter,
bool);
170 vtkBooleanMacro(UseStringDelimiter,
bool);
178 vtkGetMacro(HaveHeaders,
bool);
179 vtkSetMacro(HaveHeaders,
bool);
188 vtkSetMacro(MergeConsecutiveDelimiters,
bool);
189 vtkGetMacro(MergeConsecutiveDelimiters,
bool);
190 vtkBooleanMacro(MergeConsecutiveDelimiters,
bool);
222 vtkSetMacro(DetectNumericColumns,
bool);
223 vtkGetMacro(DetectNumericColumns,
bool);
224 vtkBooleanMacro(DetectNumericColumns,
bool);
233 vtkSetMacro(ForceDouble,
bool);
234 vtkGetMacro(ForceDouble,
bool);
235 vtkBooleanMacro(ForceDouble,
bool);
254 vtkSetMacro(TrimWhitespacePriorToNumericConversion,
bool);
255 vtkGetMacro(TrimWhitespacePriorToNumericConversion,
bool);
256 vtkBooleanMacro(TrimWhitespacePriorToNumericConversion,
bool);
264 vtkSetMacro(DefaultIntegerValue,
int);
265 vtkGetMacro(DefaultIntegerValue,
int);
273 vtkSetMacro(DefaultDoubleValue,
double);
274 vtkGetMacro(DefaultDoubleValue,
double);
282 vtkSetStringMacro(PedigreeIdArrayName);
283 vtkGetStringMacro(PedigreeIdArrayName);
291 vtkSetMacro(GeneratePedigreeIds,
bool);
292 vtkGetMacro(GeneratePedigreeIds,
bool);
293 vtkBooleanMacro(GeneratePedigreeIds,
bool);
300 vtkSetMacro(OutputPedigreeIds,
bool);
301 vtkGetMacro(OutputPedigreeIds,
bool);
302 vtkBooleanMacro(OutputPedigreeIds,
bool);
311 vtkSetMacro(AddTabFieldDelimiter,
bool);
312 vtkGetMacro(AddTabFieldDelimiter,
bool);
313 vtkBooleanMacro(AddTabFieldDelimiter,
bool);
329 vtkSetMacro(ReplacementCharacter, vtkTypeUInt32);
330 vtkGetMacro(ReplacementCharacter, vtkTypeUInt32);
346 vtkSetMacro(PreviewNumberOfLines,
vtkIdType);
347 vtkGetMacro(PreviewNumberOfLines,
vtkIdType);
369 int ReadData(
vtkTable* output_table);
371 char* FileName =
nullptr;
373 char* InputString =
nullptr;
374 int InputStringLength = 0;
375 char* UnicodeCharacterSet =
nullptr;
384 bool DetectNumericColumns =
false;
385 bool ForceDouble =
false;
386 bool TrimWhitespacePriorToNumericConversion =
false;
387 int DefaultIntegerValue = 0;
388 double DefaultDoubleValue = 0.;
389 char* FieldDelimiterCharacters =
nullptr;
390 char StringDelimiter =
'"';
391 bool UseStringDelimiter =
true;
392 bool HaveHeaders =
false;
393 bool MergeConsecutiveDelimiters =
false;
394 char* PedigreeIdArrayName =
nullptr;
395 bool GeneratePedigreeIds =
true;
396 bool OutputPedigreeIds =
false;
397 bool AddTabFieldDelimiter =
false;
399 vtkTypeUInt32 ReplacementCharacter =
'x';
409 std::unique_ptr<std::istream> OpenStream();
415 void ReadBOM(std::istream* stream);
421 vtkTextCodec* CreateTextCodec(std::istream* input_stream);
427 VTK_ABI_NAMESPACE_END
void SetInputString(const vtkStdString &input)
Specify the InputString for use when reading from a character array.
Wrapper around std::string to keep symbols short.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkTableAlgorithm * New()
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Virtual class to act as an interface for all text codecs.
reads in delimited ascii or unicode text files and outputs a vtkTable data structure.
a simple class to control print indentation
A table, which contains similar-typed columns of data.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Superclass for algorithms that produce only vtkTables as output.