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;
32 
33 namespace osp
34 {
35  struct TransferFunction;
36  struct Volume;
37 }
38 
39 class VTKRENDERINGOSPRAY_EXPORT vtkOSPRayVolumeMapperNode :
40  public vtkVolumeMapperNode
41 {
42 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
50  virtual void Render(bool prepass) override;
51 
57  void SetSamplingRate(double rate) { this->SamplingRate = rate; }
58  double GetSamplingRate() { return this->SamplingRate; }
59 
60 protected:
63 
67  void UpdateTransferFunction(vtkVolume* vol);
68 
69  //TODO: SetAndGetters?
70  int NumColors;
71  double SamplingRate;
72 
75 
76  osp::Volume* OSPRayVolume;
77  osp::TransferFunction* 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:44
vtkViewNode specialized for vtkVolumeMappers
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
Abstract superclass for all arrays.
record modification and/or execution time
Definition: vtkTimeStamp.h:32
a simple class to control print indentation
Definition: vtkIndent.h:33
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:64
osp::TransferFunction * TransferFunction
void SetSamplingRate(double rate)
TODO: fix me should be controlled by VTK SampleDistance, otherwise should use macros and modify self.