VTK  9.6.20260617
vtkFidesReader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
24
25#ifndef vtkFidesReader_h
26#define vtkFidesReader_h
27
28#include "vtkAlgorithm.h"
29#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_6_0
30#include "vtkIOFidesModule.h" // For export macro
31#include <memory> // for std::unique_ptr
32#include <string> // for std::string
33
34VTK_ABI_NAMESPACE_BEGIN
37
38class VTKIOFIDES_EXPORT vtkFidesReader : public vtkAlgorithm
39{
40public:
51
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
59
64 int CanReadFile(VTK_FILEPATH const std::string& name);
65
69 void SetFileName(VTK_FILEPATH const std::string& fname);
70
72
77 void ParseDataModel(VTK_FILEPATH const std::string& fname);
80
86 void SetDataSourcePath(const std::string& name, VTK_FILEPATH const std::string& path);
87
91 void SetDataSourceEngine(const std::string& name, const std::string& engine);
92
99 void SetDataSourceIO(const std::string& name, const std::string& ioAddress);
100
105
114
122
128
130
136 VTK_DEPRECATED_IN_9_6_0("ConvertToVTK is deprecated since vtkmDataSet was deprecated.")
137 virtual void SetConvertToVTK(bool){};
138 VTK_DEPRECATED_IN_9_6_0("ConvertToVTK is deprecated since vtkmDataSet was deprecated.")
139 virtual bool GetConvertToVTK() { return true; };
140 VTK_DEPRECATED_IN_9_6_0("ConvertToVTK is deprecated since vtkmDataSet was deprecated.")
141 virtual void ConvertToVTKOn() {}
142 VTK_DEPRECATED_IN_9_6_0("ConvertToVTK is deprecated since vtkmDataSet was deprecated.")
143 virtual void ConvertToVTKOff() {}
145
147
150 vtkBooleanMacro(StreamSteps, bool);
151 vtkSetMacro(StreamSteps, bool);
152 vtkGetMacro(StreamSteps, bool);
154
156
160 vtkBooleanMacro(CreateSharedPoints, bool);
161 vtkSetMacro(CreateSharedPoints, bool);
162 vtkGetMacro(CreateSharedPoints, bool);
164
169
174
179
181
188
190
194 const char* GetPointArrayName(int index);
195 const char* GetCellArrayName(int index);
196 const char* GetFieldArrayName(int index);
198
200
204 int GetPointArrayStatus(const char* name);
205 int GetCellArrayStatus(const char* name);
206 int GetFieldArrayStatus(const char* name);
207 void SetPointArrayStatus(const char* name, int status);
208 void SetCellArrayStatus(const char* name, int status);
209 void SetFieldArrayStatus(const char* name, int status);
211
216
218
222 virtual void SetController(vtkMultiProcessController* controller);
225
226protected:
228 ~vtkFidesReader() override;
229
230 struct vtkFidesReaderImpl;
231 std::unique_ptr<vtkFidesReaderImpl> Impl;
232
233 std::string FileName;
237
238 virtual int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
239 vtkInformationVector* outputVector);
240 virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
241 vtkInformationVector* outputVector);
242 virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
243 vtkInformationVector* outputVector);
244
245 int FillOutputPortInformation(int port, vtkInformation* info) override;
246
250
252
253 int ADIOSAttributeCheck(const std::string& name);
254
255private:
256 vtkFidesReader(const vtkFidesReader&) = delete;
257 void operator=(const vtkFidesReader&) = delete;
258};
259
260VTK_ABI_NAMESPACE_END
261#endif
Store on/off settings for data arrays, etc.
void ParseDataModel()
Given a json filename, parse and internally store a data model.
int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Implements various pipeline passes.
const char * GetCellArrayName(int index)
Get the name of the point or cell array with the given index in the input.
void SetFieldArrayStatus(const char *name, int status)
Get/Set whether the point or cell array with the given name is to be read.
const char * GetPointArrayName(int index)
Get the name of the point or cell array with the given index in the input.
virtual void SetConvertToVTK(bool)
Methods to determine whether to output a set of vtkmDataSets or native VTK datasets.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const char * GetFieldArrayName(int index)
Get the name of the point or cell array with the given index in the input.
virtual bool GetConvertToVTK()
Methods to determine whether to output a set of vtkmDataSets or native VTK datasets.
int GetCellArrayStatus(const char *name)
Get/Set whether the point or cell array with the given name is to be read.
vtkMTimeType GetMTime() override
Overridden to take into account mtimes for vtkDataArraySelection instances.
void SetFileName(const std::string &fname)
Set the filename to be read.
void PrepareNextStep()
This method has to be called before each step when streaming.
void ParseDataModel(const std::string &fname)
Given a json filename, parse and internally store a data model.
static vtkFidesReader * New()
Construct a new reader instance.
void SetPointArrayStatus(const char *name, int status)
Get/Set whether the point or cell array with the given name is to be read.
virtual void SetController(vtkMultiProcessController *controller)
Set/Get the multiprocess controller.
void SetCellArrayStatus(const char *name, int status)
Get/Set whether the point or cell array with the given name is to be read.
int GetPointArrayStatus(const char *name)
Get/Set whether the point or cell array with the given name is to be read.
StepStatus NextStepStatus
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkDataArraySelection * CellDataArraySelection
virtual void ConvertToVTKOff()
Methods to determine whether to output a set of vtkmDataSets or native VTK datasets.
vtkDataArraySelection * FieldDataArraySelection
virtual void ConvertToVTKOn()
Methods to determine whether to output a set of vtkmDataSets or native VTK datasets.
std::string FileName
int CanReadFile(const std::string &name)
Test whether or not a given file should even be attempted for use with this reader.
std::unique_ptr< vtkFidesReaderImpl > Impl
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
StepStatus
When using streaming mode instead of random access, PrepareNextStep receives a step status from Fides...
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
int GetFieldArrayStatus(const char *name)
Get/Set whether the point or cell array with the given name is to be read.
int GetNextStepStatus()
Get the StepStatus of the next step reported by Fides.
int GetNumberOfPointArrays()
Get the number of point or cell arrays available in the input.
void SetDataSourcePath(const std::string &name, const std::string &path)
Set the path for a Fides data source.
double GetTimeOfCurrentStep()
Gets the time (from the specified ADIOS variable) of the current step.
void SetDataSourceIO(const std::string &name, const std::string &ioAddress)
Set the ADIOS2::IO object to be used for setting up the Inline engine reader.
void SetDataSourceEngine(const std::string &name, const std::string &engine)
Set the engine for a Fides data source.
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkMultiProcessController * Controller
int GetNumberOfCellArrays()
Get the number of point or cell arrays available in the input.
int GetNumberOfFieldArrays()
Get the number of point or cell arrays available in the input.
int ADIOSAttributeCheck(const std::string &name)
~vtkFidesReader() override
vtkDataArraySelection * PointDataArraySelection
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
#define VTK_DEPRECATED_IN_9_6_0(reason)
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318
#define VTK_FILEPATH