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 class vtkAbstractArray;
29 class vtkDataSet;
30 class vtkVolume;
31 
32 namespace osp
33 {
34  struct TransferFunction;
35  struct Volume;
36 }
37 
38 class VTKRENDERINGOSPRAY_EXPORT vtkOSPRayVolumeMapperNode :
39  public vtkVolumeMapperNode
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
49  virtual void Render(bool prepass) override;
50 
56  void SetSamplingRate(double rate) { this->SamplingRate = rate; }
57  double GetSamplingRate() { return this->SamplingRate; }
58 
59 protected:
62 
66  void UpdateTransferFunction(vtkVolume* vol);
67 
68  //TODO: SetAndGetters?
69  int NumColors;
70  double SamplingRate;
71 
74 
75  osp::Volume* OSPRayVolume;
76  osp::TransferFunction* TransferFunction;
77  std::vector<float> TFVals;
78  std::vector<float> TFOVals;
79 
80 private:
82  void operator=(const vtkOSPRayVolumeMapperNode&) = delete;
83 };
84 #endif
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
osp::TransferFunction * TransferFunction
void SetSamplingRate(double rate)
TODO: fix me should be controlled by VTK SampleDistance, otherwise should use macros and modify self.