VTK  9.7.1
vtkCellGridReader.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
3 
19 #ifndef vtkCellGridReader_h
20 #define vtkCellGridReader_h
21 
22 #include "vtkCellGridAlgorithm.h"
23 #include "vtkIOCellGridModule.h" // For export macro
24 #include "vtkNew.h" // For New
25 #include "vtkSmartPointer.h" // For SmartPointer
26 
27 // clang-format off
28 #include <vtk_nlohmannjson.h> // For API.
29 #include VTK_NLOHMANN_JSON(json.hpp) // For API.
30 // clang-format on
31 
32 #include <string> // For std::string
33 #include <vector> // For std::vector
34 
35 VTK_ABI_NAMESPACE_BEGIN
36 class vtkCellGridIOQuery;
37 
38 class VTKIOCELLGRID_EXPORT vtkCellGridReader : public vtkCellGridAlgorithm
39 {
40 public:
41  static vtkCellGridReader* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
49  vtkSetFilePathMacro(FileName);
50  vtkGetFilePathMacro(FileName);
52 
54  bool FromJSON(const nlohmann::json& jj, vtkCellGrid* grid);
55 
56 protected:
58  ~vtkCellGridReader() override;
59 
60  char* FileName = nullptr;
62 
65 
66 private:
67  vtkCellGridReader(const vtkCellGridReader&) = delete;
68  void operator=(const vtkCellGridReader&) = delete;
69 };
70 
71 VTK_ABI_NAMESPACE_END
72 #endif
Store vtkAlgorithm input/output information.
static vtkCellGridAlgorithm * New()
vtkNew< vtkCellGridIOQuery > Query
Serialize/deserialize vtkCellMetadata records.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Visualization data composed of cells of arbitrary type.
Definition: vtkCellGrid.h:48
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
Read a cell-grid file.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store zero or more vtkInformation instances.