VTK  9.4.20241220
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
19VTK_ABI_NAMESPACE_BEGIN
20class vtkDataArray;
21class vtkDataSet;
22class vtkVolume;
23
24class VTKRENDERINGRAYTRACING_EXPORT vtkOSPRayVolumeMapperNode : public vtkVolumeMapperNode
25{
26public:
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
44protected:
47
51 void UpdateTransferFunction(RTW::Backend* be, vtkVolume* vol, double* dataRange = nullptr);
52
53 // TODO: SetAndGetters?
56 double SamplingStep; // base sampling step of each voxel
57
62
68
69 std::vector<float> TFVals;
70 std::vector<float> TFOVals;
71 std::vector<float> IsoColors;
72
74
75private:
77 void operator=(const vtkOSPRayVolumeMapperNode&) = delete;
78};
79VTK_ABI_NAMESPACE_END
80#endif
#define OSPGeometricModel
Definition RTWrapper.h:22
#define OSPVolumetricModel
Definition RTWrapper.h:33
#define OSPInstance
Definition RTWrapper.h:21
#define OSPVolume
Definition RTWrapper.h:32
#define OSPTransferFunction
Definition RTWrapper.h:34
abstract superclass for arrays of numeric data
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
a simple class to control print indentation
Definition vtkIndent.h:108
temporal cache ospray structures to speed flipbooks
links vtkVolumeMapper to OSPRay
static vtkOSPRayVolumeMapperNode * New()
void Render(bool prepass) override
Make ospray calls to render me.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetSamplingRate(double rate)
TODO: fix me should be controlled by VTK SampleDistance, otherwise should use macros and modify self.
vtkOSPRayCache< vtkOSPRayCacheItemObject > * Cache
void UpdateTransferFunction(RTW::Backend *be, vtkVolume *vol, double *dataRange=nullptr)
updates internal OSPRay transfer function for volume
~vtkOSPRayVolumeMapperNode() override
record modification and/or execution time
vtkViewNode specialized for vtkVolumeMappers
represents a volume (data & properties) in a rendered scene
Definition vtkVolume.h:130