VTK  9.3.1
vtkOSPRayVolumeMapperNode.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
10 #ifndef vtkOSPRayVolumeMapperNode_h
11 #define vtkOSPRayVolumeMapperNode_h
12 
13 #include "vtkOSPRayCache.h" // For common cache infrastructure
14 #include "vtkRenderingRayTracingModule.h" // For export macro
15 #include "vtkVolumeMapperNode.h"
16 
17 #include "RTWrapper/RTWrapper.h" // for handle types
18 
19 VTK_ABI_NAMESPACE_BEGIN
20 class vtkDataArray;
21 class vtkDataSet;
22 class vtkVolume;
23 
24 class VTKRENDERINGRAYTRACING_EXPORT vtkOSPRayVolumeMapperNode : public vtkVolumeMapperNode
25 {
26 public:
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
34  void Render(bool prepass) override;
35 
41  void SetSamplingRate(double rate) { this->SamplingRate = rate; }
42  double GetSamplingRate() { return this->SamplingRate; }
43 
44 protected:
46  ~vtkOSPRayVolumeMapperNode() override;
47 
51  void UpdateTransferFunction(RTW::Backend* be, vtkVolume* vol, double* dataRange = nullptr);
52 
53  // TODO: SetAndGetters?
54  int NumColors;
55  double SamplingRate;
56  double SamplingStep; // base sampling step of each voxel
57 
62 
68 
69  std::vector<float> TFVals;
70  std::vector<float> TFOVals;
71 
73 
74 private:
76  void operator=(const vtkOSPRayVolumeMapperNode&) = delete;
77 };
78 VTK_ABI_NAMESPACE_END
79 #endif
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:39
vtkViewNode specialized for vtkVolumeMappers
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
record modification and/or execution time
Definition: vtkTimeStamp.h:24
#define OSPVolumetricModel
Definition: RTWrapper.h:33
a simple class to control print indentation
Definition: vtkIndent.h:28
links vtkVolumeMapper to OSPRay
static vtkVolumeMapperNode * New()
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define OSPInstance
Definition: RTWrapper.h:21
#define OSPTransferFunction
Definition: RTWrapper.h:34
virtual void Render(bool)
Makes calls to make self visible.
Definition: vtkViewNode.h:56
vtkOSPRayCache< vtkOSPRayCacheItemObject > * Cache
void SetSamplingRate(double rate)
TODO: fix me should be controlled by VTK SampleDistance, otherwise should use macros and modify self...
#define OSPVolume
Definition: RTWrapper.h:32
#define OSPGeometricModel
Definition: RTWrapper.h:22