VTK
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 "vtkRenderingOSPRayModule.h" // For export macro
26 #include "vtkVolumeMapperNode.h"
27 
28 #include "ospray/ospray.h" // for ospray handle types
29 
30 class vtkAbstractArray;
31 class vtkDataSet;
32 class vtkVolume;
34 
35 class VTKRENDERINGOSPRAY_EXPORT vtkOSPRayVolumeMapperNode :
36  public vtkVolumeMapperNode
37 {
38 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
46  virtual void Render(bool prepass) override;
47 
53  void SetSamplingRate(double rate) { this->SamplingRate = rate; }
54  double GetSamplingRate() { return this->SamplingRate; }
55 
56 protected:
59 
63  void UpdateTransferFunction(vtkVolume* vol, double *dataRange=nullptr);
64 
65  //TODO: SetAndGetters?
66  int NumColors;
67  double SamplingRate;
68  double SamplingStep; //base sampling step of each voxel
70  OSPData SharedData;
71 
74 
75  OSPGeometry OSPRayIsosurface;
76  OSPVolume OSPRayVolume;
77  OSPTransferFunction TransferFunction;
78  std::vector<float> TFVals;
79  std::vector<float> TFOVals;
80 
82 
83 private:
85  void operator=(const vtkOSPRayVolumeMapperNode&) = delete;
86 };
87 #endif
temporal cache ospray structures to speed flipbooks
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:50
vtkViewNode specialized for vtkVolumeMappers
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
Abstract superclass for all arrays.
record modification and/or execution time
Definition: vtkTimeStamp.h:35
a simple class to control print indentation
Definition: vtkIndent.h:39
links vtkVolumeMapper to OSPRay
static vtkVolumeMapperNode * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void Render(bool)
Makes calls to make self visible.
Definition: vtkViewNode.h:67
void SetSamplingRate(double rate)
TODO: fix me should be controlled by VTK SampleDistance, otherwise should use macros and modify self...