VTK  9.3.0
vtkOpenVDBWriter.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
12 #ifndef vtkOpenVDBWriter_h
13 #define vtkOpenVDBWriter_h
14 
15 #include "vtkIOOpenVDBModule.h" //needed for exports
16 #include "vtkSmartPointer.h" // For protected ivars
17 #include "vtkWriter.h"
18 
19 VTK_ABI_NAMESPACE_BEGIN
21 class vtkImageData;
23 class vtkOpenVDBWriterInternals;
24 class vtkPointSet;
25 class vtkScalarsToColors;
27 
28 class VTKIOOPENVDB_EXPORT vtkOpenVDBWriter : public vtkWriter
29 {
30 public:
31  static vtkOpenVDBWriter* New();
32  vtkTypeMacro(vtkOpenVDBWriter, vtkWriter);
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
42 
44 
49  vtkSetMacro(WriteAllTimeSteps, bool);
50  vtkGetMacro(WriteAllTimeSteps, bool);
52 
54 
59  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
61 
63 
67  vtkSetMacro(EnableColoring, bool);
68  vtkGetMacro(EnableColoring, bool);
70 
72 
76  vtkSetMacro(EnableAlpha, bool);
77  vtkGetMacro(EnableAlpha, bool);
79 
81 
86  vtkGetObjectMacro(Controller, vtkMultiProcessController);
88 
89 protected:
91  ~vtkOpenVDBWriter() override;
92 
93  void WriteData() override;
94 
95  void WriteImageData(vtkImageData* imageData);
96  void WritePointSet(vtkPointSet* pointSet);
97 
98  // see algorithm for more info.
99  // This writer takes in vtkTable, vtkDataSet or vtkCompositeDataSet.
101 
102  // see algorithm for more info. needed here so we can request pieces.
104  vtkInformationVector* outputVector) override;
105 
107 
108  char* FileName;
109 
111 
117 
119 
127 
128 private:
129  vtkOpenVDBWriter(const vtkOpenVDBWriter&) = delete;
130  void operator=(const vtkOpenVDBWriter&) = delete;
131 
133 
136  vtkMultiProcessController* Controller;
138 
139  vtkOpenVDBWriterInternals* Internals;
140  friend class vtkOpenVDBWriterInternals;
141 };
142 
143 VTK_ABI_NAMESPACE_END
144 #endif
represent and manipulate attribute data in a dataset
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
OpenVDB writer for vtkImageData or vtkPointSet Writes a vtkImageData or vtkPointSet as a VDB file.
void WriteData() override
~vtkOpenVDBWriter() override
int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkSetFilePathMacro(FileName)
Get/Set the filename for the file.
bool EnableAlpha
For outputting the Lookup Table in the VDB file.
void WritePointSet(vtkPointSet *pointSet)
bool EnableColoring
For outputting the Lookup Table in the VDB file.
vtkGetFilePathMacro(FileName)
Get/Set the filename for the file.
void SetRGBA(vtkIdType num, vtkUnsignedCharArray *rgba, vtkDataSetAttributes *attributes)
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void WriteImageData(vtkImageData *imageData)
void SetController(vtkMultiProcessController *)
Get/Set the controller to use.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetLookupTable(vtkScalarsToColors *)
A lookup table can be specified in order to convert data arrays to RGBA colors.
bool WriteAllTimeSteps
Whether or not to write out all time steps.
vtkScalarsToColors * LookupTable
For outputting the Lookup Table in the VDB file.
static vtkOpenVDBWriter * New()
concrete class for storing a set of points
Definition: vtkPointSet.h:68
Superclass for mapping scalar values to colors.
dynamic, self-adjusting array of unsigned char
abstract class to write data to file(s)
Definition: vtkWriter.h:35
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
int vtkIdType
Definition: vtkType.h:315