VTK  9.0.3
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 
31 class vtkAbstractArray;
32 class vtkDataSet;
33 class vtkVolume;
34 
35 class VTKRENDERINGRAYTRACING_EXPORT vtkOSPRayVolumeMapperNode : public vtkVolumeMapperNode
36 {
37 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
45  virtual void Render(bool prepass) override;
46 
52  void SetSamplingRate(double rate) { this->SamplingRate = rate; }
53  double GetSamplingRate() { return this->SamplingRate; }
54 
55 protected:
58 
62  void UpdateTransferFunction(RTW::Backend* be, vtkVolume* vol, double* dataRange = nullptr);
63 
64  // TODO: SetAndGetters?
65  int NumColors;
66  double SamplingRate;
67  double SamplingStep; // base sampling step of each voxel
69  bool Shade; // volume shading set through volProperty
71 
74 
78  std::vector<float> TFVals;
79  std::vector<float> TFOVals;
80 
82 
83 private:
85  void operator=(const vtkOSPRayVolumeMapperNode&) = delete;
86 };
87 #endif
#define OSPData
Definition: RTWrapper.h:17
#define OSPGeometry
Definition: RTWrapper.h:24
#define OSPVolume
Definition: RTWrapper.h:26
#define OSPTransferFunction
Definition: RTWrapper.h:27
Abstract superclass for all arrays.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
a simple class to control print indentation
Definition: vtkIndent.h:34
links vtkVolumeMapper to OSPRay
virtual 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
static vtkOSPRayVolumeMapperNode * New()
void UpdateTransferFunction(RTW::Backend *be, vtkVolume *vol, double *dataRange=nullptr)
updates internal OSPRay transfer function for volume
record modification and/or execution time
Definition: vtkTimeStamp.h:33
vtkViewNode specialized for vtkVolumeMappers
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:45