VTK  9.1.0
vtkOSPRayVolumeMapperNode.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkOSPRayVolumeMapperNode.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=========================================================================*/
22#ifndef vtkOSPRayVolumeMapperNode_h
23#define vtkOSPRayVolumeMapperNode_h
24
25#include "vtkOSPRayCache.h" // For common cache infrastructure
26#include "vtkRenderingRayTracingModule.h" // For export macro
27#include "vtkVolumeMapperNode.h"
28
29#include "RTWrapper/RTWrapper.h" // for handle types
30
31class vtkDataArray;
32class vtkDataSet;
33class vtkVolume;
34
35class VTKRENDERINGRAYTRACING_EXPORT vtkOSPRayVolumeMapperNode : public vtkVolumeMapperNode
36{
37public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
45 void Render(bool prepass) override;
46
52 void SetSamplingRate(double rate) { this->SamplingRate = rate; }
53 double GetSamplingRate() { return this->SamplingRate; }
54
55protected:
58
62 void UpdateTransferFunction(RTW::Backend* be, vtkVolume* vol, double* dataRange = nullptr);
63
64 // TODO: SetAndGetters?
67 double SamplingStep; // base sampling step of each voxel
68
73
79
80 std::vector<float> TFVals;
81 std::vector<float> TFOVals;
82
84
85private:
87 void operator=(const vtkOSPRayVolumeMapperNode&) = delete;
88};
89#endif
#define OSPGeometricModel
Definition: RTWrapper.h:19
#define OSPVolumetricModel
Definition: RTWrapper.h:30
#define OSPInstance
Definition: RTWrapper.h:18
#define OSPVolume
Definition: RTWrapper.h:29
#define OSPTransferFunction
Definition: RTWrapper.h:31
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
a simple class to control print indentation
Definition: vtkIndent.h:113
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
Definition: vtkTimeStamp.h:52
vtkViewNode specialized for vtkVolumeMappers
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:134