VTK  9.4.20241223
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
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
35VTK_ABI_NAMESPACE_BEGIN
37
38class VTKIOCELLGRID_EXPORT vtkCellGridReader : public vtkCellGridAlgorithm
39{
40public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
46
52
54 bool FromJSON(const nlohmann::json& jj, vtkCellGrid* grid);
55
56protected:
59
60 char* FileName = nullptr;
62
65
66private:
67 vtkCellGridReader(const vtkCellGridReader&) = delete;
68 void operator=(const vtkCellGridReader&) = delete;
69};
70
71VTK_ABI_NAMESPACE_END
72#endif
Superclass for algorithms that produce only polydata as output.
Serialize/deserialize vtkCellMetadata records.
Read a cell-grid file.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkCellGridReader() override
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkGetFilePathMacro(FileName)
Set/Get the name of the file from which to read data.
vtkSetFilePathMacro(FileName)
Set/Get the name of the file from which to read data.
static vtkCellGridReader * New()
vtkNew< vtkCellGridIOQuery > Query
bool FromJSON(const nlohmann::json &jj, vtkCellGrid *grid)
Read directly from jj into grid.
Visualization data composed of cells of arbitrary type.
Definition vtkCellGrid.h:49
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Allocate and hold a VTK object.
Definition vtkNew.h:167