VTK  9.2.5
vtkTemporalDelimitedTextReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkTemporalDelimitedTextReader.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
41#ifndef vtkTemporalDelimitedTextReader_h
42#define vtkTemporalDelimitedTextReader_h
43
45
46#include "vtkIOInfovisModule.h" // module export
47#include "vtkNew.h" // For ReadTable field
48
49#include <map> // To store the TimeMap
50#include <vector> // To store the TimeMap
51
53{
54public:
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58
60
67 vtkGetMacro(TimeColumnName, std::string);
68 void SetTimeColumnName(const std::string name);
70
72
80 vtkGetMacro(TimeColumnId, int);
81 void SetTimeColumnId(const int idx);
83
85
90 vtkGetMacro(RemoveTimeStepColumn, bool);
93
102
103protected:
106
114 vtkInformationVector* outputVector) override;
116 vtkInformationVector* outputVector) override;
117
125
131
132 // Time column fields
133 std::string TimeColumnName = "";
134 std::string InternalColumnName = "";
135 vtkIdType TimeColumnId = -1;
136 bool RemoveTimeStepColumn = true;
137 std::map<double, std::vector<vtkIdType>> TimeMap;
138
139 // Input file content and update
141 vtkMTimeType LastReadTime = 0;
143
144private:
146 void operator=(const vtkTemporalDelimitedTextReader&) = delete;
147};
148
149#endif
reads in delimited ascii or unicode text files and outputs a vtkTable data structure.
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Allocate and hold a VTK object.
Definition: vtkNew.h:62
reads a delimited ascii or unicode text files and and output a temporal vtkTable.
vtkMTimeType GetMTime() override
Internal fields of this reader use a specific MTime (InternalMTime).
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
In order to fill the TIME_STEPS and TIME_RANGE keys, this method call the ReadData function that actu...
void SetRemoveTimeStepColumn(bool rts)
Set the RemoveTimeStepColumn flag If this boolean is true, the output will not contain the Time step ...
static vtkTemporalDelimitedTextReader * New()
~vtkTemporalDelimitedTextReader() override=default
std::map< double, std::vector< vtkIdType > > TimeMap
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
bool EnforceColumnName()
This function checks if a user specified column has been set and check if this input is valid.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void InternalModified()
When parameters specific of this reader are modified, we do not want to re-read the input file.
void SetTimeColumnId(const int idx)
Get/Set the column to use as time indicator.
void SetTimeColumnName(const std::string name)
Get/Set the name of the column to use as time indicator.
record modification and/or execution time
Definition: vtkTimeStamp.h:36
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287