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 
50  vtkSetFilePathMacro(FileName);
51  vtkGetFilePathMacro(FileName);
53 
55 
60  vtkSetMacro(WriteAllTimeSteps, bool);
61  vtkGetMacro(WriteAllTimeSteps, bool);
63 
65 
69  virtual void SetLookupTable(vtkScalarsToColors*);
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 
96  void SetController(vtkMultiProcessController*);
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.
111  int FillInputPortInformation(int port, vtkInformation* info) override;
112 
113  // see algorithm for more info. needed here so we can request pieces.
114  int ProcessRequest(vtkInformation* request, vtkInformationVector** inputVector,
115  vtkInformationVector* outputVector) override;
116 
117  void SetRGBA(vtkIdType num, vtkUnsignedCharArray* rgba, vtkDataSetAttributes* attributes);
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
bool EnableAlpha
For outputting the Lookup Table in the VDB file.
Store vtkAlgorithm input/output information.
vtkScalarsToColors * LookupTable
For outputting the Lookup Table in the VDB file.
concrete class for storing a set of points
Definition: vtkPointSet.h:69
int vtkIdType
Definition: vtkType.h:332
Superclass for mapping scalar values to colors.
abstract class to write data to file(s)
Definition: vtkWriter.h:45
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool WriteAllTimeSteps
Whether or not to write out all time steps.
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:53
represent and manipulate attribute data in a dataset
bool EnableColoring
For outputting the Lookup Table in the VDB file.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
dynamic, self-adjusting array of unsigned char
OpenVDB writer for vtkImageData or vtkPointSet Writes a vtkImageData or vtkPointSet as a VDB file...
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
virtual void WriteData()=0
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
Multiprocessing communication superclass.