15 #ifndef __vtkSlicerVolumeRenderingLogic_h 16 #define __vtkSlicerVolumeRenderingLogic_h 19 #include "vtkSlicerVolumeRenderingModuleLogicExport.h" 38 class vtkColorTransferFunction;
40 class vtkPiecewiseFunction;
41 class vtkScalarsToColors;
42 class vtkVolumeProperty;
65 void PrintSelf(ostream& os, vtkIndent indent)
override;
71 void RegisterRenderingMethod(
const char* methodName,
72 const char* displayNodeClassName);
74 std::map<std::string, std::string> GetRenderingMethods();
79 vtkSetStringMacro(DefaultRenderingMethod);
80 vtkGetStringMacro(DefaultRenderingMethod);
86 vtkSetMacro(UseLinearRamp,
bool);
87 vtkGetMacro(UseLinearRamp,
bool);
127 void AddAllVolumeRenderingDisplayNodes();
131 void RemoveAllVolumeRenderingDisplayNodes();
135 void ChangeVolumeRenderingMethod(
const char* displayNodeClassName =
nullptr);
152 void CopyDisplayToVolumeRenderingDisplayNode(
161 void CopyScalarDisplayToVolumeRenderingDisplayNode(
170 void CopyLabelMapDisplayToVolumeRenderingDisplayNode(
189 void SetThresholdToVolumeProp(
190 double scalarRange[2],
double threshold[2],
191 vtkVolumeProperty* node,
192 bool linearRamp =
false,
bool stayUpAtUpperLimit =
false);
216 void SetWindowLevelToVolumeProp(
217 double scalarRange[2],
double windowLevel[2],
218 vtkLookupTable* lut, vtkVolumeProperty* node);
223 void SetGradientOpacityToVolumeProp(
224 double scalarRange[2], vtkVolumeProperty* node);
229 void SetLabelMapToVolumeProp(
230 vtkScalarsToColors* lut, vtkVolumeProperty* node);
240 bool createROI=
true);
251 char *displayNodeID);
305 int LoadCustomPresetsScene(
const char* sceneFilePath);
321 bool IsDifferentFunction(vtkPiecewiseFunction* function1,
322 vtkPiecewiseFunction* function2)
const;
326 bool IsDifferentFunction(vtkColorTransferFunction* function1,
327 vtkColorTransferFunction* function2)
const;
329 vtkSetMacro(DefaultROIClassName, std::string);
330 vtkGetMacro(DefaultROIClassName, std::string);
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkSlicerModuleLogic * New()
The Usual vtk class functions.
vtkMRMLShaderPropertyNode volume shader custom code and custom uniform variables defined by users or ...
MRML node for representing a volume display attributes.
static const char * GetIconVolumeReferenceRole()
std::vector< vtkMRMLNode * > DisplayNodesType
virtual void OnMRMLNodeModified(vtkMRMLNode *)
A set of MRML Nodes that supports serialization and undo/redo.
virtual void OnMRMLSceneNodeAdded(vtkMRMLNode *)
std::string DefaultROIClassName
virtual void RegisterNodes()
virtual void OnMRMLSceneNodeRemoved(vtkMRMLNode *)
vtkMRMLScene * PresetsScene
char * DefaultRenderingMethod
virtual void ObserveMRMLScene()
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene)
MRML node for representing a volume (image stack).
MRML node to represent a 3D view.
std::map< std::string, std::string > RenderingMethods
MRML node for representing a volume (image stack).
Abstract Superclass for all specific types of MRML nodes.
DisplayNodesType DisplayNodes
vtkMRMLVolumePropertyNode contains the transfer functions (scalar opacity, color and gradient opacity...
MRML node for representing a volume display attributes.
MRML node for representing a volume display attributes.