VTK  9.2.6
vtkOpenVDBWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenVDBWriter.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 =========================================================================*/
24 #ifndef vtkOpenVDBWriter_h
25 #define vtkOpenVDBWriter_h
26 
27 #include "vtkIOOpenVDBModule.h" //needed for exports
28 #include "vtkSmartPointer.h" // For protected ivars
29 #include "vtkWriter.h"
30 
32 class vtkImageData;
34 class vtkOpenVDBWriterInternals;
35 class vtkPointSet;
36 class vtkScalarsToColors;
38 
39 class VTKIOOPENVDB_EXPORT vtkOpenVDBWriter : public vtkWriter
40 {
41 public:
42  static vtkOpenVDBWriter* New();
43  vtkTypeMacro(vtkOpenVDBWriter, vtkWriter);
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
53 
55 
60  vtkSetMacro(WriteAllTimeSteps, bool);
61  vtkGetMacro(WriteAllTimeSteps, bool);
63 
65 
70  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
72 
74 
78  vtkSetMacro(EnableColoring, bool);
79  vtkGetMacro(EnableColoring, bool);
81 
83 
87  vtkSetMacro(EnableAlpha, bool);
88  vtkGetMacro(EnableAlpha, bool);
90 
92 
97  vtkGetObjectMacro(Controller, vtkMultiProcessController);
99 
100 protected:
102  ~vtkOpenVDBWriter() override;
103 
104  void WriteData() override;
105 
106  void WriteImageData(vtkImageData* imageData);
107  void WritePointSet(vtkPointSet* pointSet);
108 
109  // see algorithm for more info.
110  // This writer takes in vtkTable, vtkDataSet or vtkCompositeDataSet.
112 
113  // see algorithm for more info. needed here so we can request pieces.
115  vtkInformationVector* outputVector) override;
116 
118 
119  char* FileName;
120 
122 
128 
130 
138 
139 private:
140  vtkOpenVDBWriter(const vtkOpenVDBWriter&) = delete;
141  void operator=(const vtkOpenVDBWriter&) = delete;
142 
144 
147  vtkMultiProcessController* Controller;
149 
150  vtkOpenVDBWriterInternals* Internals;
151  friend class vtkOpenVDBWriterInternals;
152 };
153 
154 #endif
represent and manipulate attribute data in a dataset
topologically and geometrically regular array of data
Definition: vtkImageData.h:163
a simple class to control print indentation
Definition: vtkIndent.h:119
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.
void WritePointSet(vtkPointSet *pointSet)
vtkGetFilePathMacro(FileName)
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:109
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:46
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
int vtkIdType
Definition: vtkType.h:332