VTK: Rendering/RayTracing/vtkOSPRayVolumeMapperNode.h Source File

| 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:
27 static vtkOSPRayVolumeMapperNode* New();
28 vtkTypeMacro(vtkOSPRayVolumeMapperNode, vtkVolumeMapperNode);
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:
45 vtkOSPRayVolumeMapperNode();
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
58 vtkTimeStamp BuildTime;
59 vtkTimeStamp PropertyTime;
60 vtkDataArray* LastArray;
61 int LastComponent;
62
63 OSPVolume OSPRayVolume;
64 OSPVolumetricModel OSPRayVolumeModel;
65 OSPGeometricModel Cropper;
66 OSPTransferFunction TransferFunction;
67 OSPInstance OSPRayInstance;
68
69 std::vector<float> TFVals;
70 std::vector<float> TFOVals;
71
72 vtkOSPRayCache<vtkOSPRayCacheItemObject>* Cache;
73
74 private:
75 vtkOSPRayVolumeMapperNode(const vtkOSPRayVolumeMapperNode&) = delete;
76 void operator=(const vtkOSPRayVolumeMapperNode&) = delete;
77 };
78 VTK_ABI_NAMESPACE_END
79 #endif
RTWrapper.h
OSPGeometricModel
#define OSPGeometricModel
Definition: RTWrapper.h:22
OSPVolumetricModel
#define OSPVolumetricModel
Definition: RTWrapper.h:33
OSPInstance
#define OSPInstance
Definition: RTWrapper.h:21
OSPVolume
#define OSPVolume
Definition: RTWrapper.h:32
OSPTransferFunction
#define OSPTransferFunction
Definition: RTWrapper.h:34
RTW::Backend
Definition: Backend.h:11
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkOSPRayCache< vtkOSPRayCacheItemObject >
vtkOSPRayVolumeMapperNode
links vtkVolumeMapper to OSPRay
Definition: vtkOSPRayVolumeMapperNode.h:25
vtkOSPRayVolumeMapperNode::Cropper
OSPGeometricModel Cropper
Definition: vtkOSPRayVolumeMapperNode.h:65
vtkOSPRayVolumeMapperNode::vtkOSPRayVolumeMapperNode
vtkOSPRayVolumeMapperNode()
vtkOSPRayVolumeMapperNode::Render
void Render(bool prepass) override
Make ospray calls to render me.
vtkOSPRayVolumeMapperNode::TFVals
std::vector< float > TFVals
Definition: vtkOSPRayVolumeMapperNode.h:69
vtkOSPRayVolumeMapperNode::SamplingRate
double SamplingRate
Definition: vtkOSPRayVolumeMapperNode.h:55
vtkOSPRayVolumeMapperNode::LastComponent
int LastComponent
Definition: vtkOSPRayVolumeMapperNode.h:61
vtkOSPRayVolumeMapperNode::SamplingStep
double SamplingStep
Definition: vtkOSPRayVolumeMapperNode.h:56
vtkOSPRayVolumeMapperNode::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOSPRayVolumeMapperNode::TransferFunction
OSPTransferFunction TransferFunction
Definition: vtkOSPRayVolumeMapperNode.h:66
vtkOSPRayVolumeMapperNode::OSPRayInstance
OSPInstance OSPRayInstance
Definition: vtkOSPRayVolumeMapperNode.h:67
vtkOSPRayVolumeMapperNode::OSPRayVolumeModel
OSPVolumetricModel OSPRayVolumeModel
Definition: vtkOSPRayVolumeMapperNode.h:64
vtkOSPRayVolumeMapperNode::SetSamplingRate
void SetSamplingRate(double rate)
TODO: fix me should be controlled by VTK SampleDistance, otherwise should use macros and modify self.
Definition: vtkOSPRayVolumeMapperNode.h:41
vtkOSPRayVolumeMapperNode::OSPRayVolume
OSPVolume OSPRayVolume
Definition: vtkOSPRayVolumeMapperNode.h:63
vtkOSPRayVolumeMapperNode::TFOVals
std::vector< float > TFOVals
Definition: vtkOSPRayVolumeMapperNode.h:70
vtkOSPRayVolumeMapperNode::GetSamplingRate
double GetSamplingRate()
Definition: vtkOSPRayVolumeMapperNode.h:42
vtkOSPRayVolumeMapperNode::Cache
vtkOSPRayCache< vtkOSPRayCacheItemObject > * Cache
Definition: vtkOSPRayVolumeMapperNode.h:72
vtkOSPRayVolumeMapperNode::LastArray
vtkDataArray * LastArray
Definition: vtkOSPRayVolumeMapperNode.h:60
vtkOSPRayVolumeMapperNode::NumColors
int NumColors
Definition: vtkOSPRayVolumeMapperNode.h:54
vtkOSPRayVolumeMapperNode::New
static vtkOSPRayVolumeMapperNode * New()
vtkOSPRayVolumeMapperNode::BuildTime
vtkTimeStamp BuildTime
Definition: vtkOSPRayVolumeMapperNode.h:58
vtkOSPRayVolumeMapperNode::PropertyTime
vtkTimeStamp PropertyTime
Definition: vtkOSPRayVolumeMapperNode.h:59
vtkOSPRayVolumeMapperNode::UpdateTransferFunction
void UpdateTransferFunction(RTW::Backend *be, vtkVolume *vol, double *dataRange=nullptr)
updates internal OSPRay transfer function for volume
vtkOSPRayVolumeMapperNode::~vtkOSPRayVolumeMapperNode
~vtkOSPRayVolumeMapperNode() override
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:34
vtkVolumeMapperNode
vtkViewNode specialized for vtkVolumeMappers
Definition: vtkVolumeMapperNode.h:26
vtkVolume
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:49
vtkOSPRayCache.h
vtkVolumeMapperNode.h