15 #ifndef __vtkSlicerVolumeRenderingLogic_h 16 #define __vtkSlicerVolumeRenderingLogic_h 19 #include "vtkSlicerVolumeRenderingModuleLogicExport.h" 37 class vtkColorTransferFunction;
39 class vtkPiecewiseFunction;
40 class vtkScalarsToColors;
41 class vtkVolumeProperty;
64 void PrintSelf(ostream& os, vtkIndent indent)
override;
70 void RegisterRenderingMethod(
const char* methodName,
71 const char* displayNodeClassName);
73 std::map<std::string, std::string> GetRenderingMethods();
78 vtkSetStringMacro(DefaultRenderingMethod);
79 vtkGetStringMacro(DefaultRenderingMethod);
85 vtkSetMacro(UseLinearRamp,
bool);
86 vtkGetMacro(UseLinearRamp,
bool);
126 void AddAllVolumeRenderingDisplayNodes();
130 void RemoveAllVolumeRenderingDisplayNodes();
134 void ChangeVolumeRenderingMethod(
const char* displayNodeClassName =
nullptr);
151 void CopyDisplayToVolumeRenderingDisplayNode(
160 void CopyScalarDisplayToVolumeRenderingDisplayNode(
169 void CopyLabelMapDisplayToVolumeRenderingDisplayNode(
188 void SetThresholdToVolumeProp(
189 double scalarRange[2],
double threshold[2],
190 vtkVolumeProperty* node,
191 bool linearRamp =
false,
bool stayUpAtUpperLimit =
false);
215 void SetWindowLevelToVolumeProp(
216 double scalarRange[2],
double windowLevel[2],
217 vtkLookupTable* lut, vtkVolumeProperty* node);
222 void SetGradientOpacityToVolumeProp(
223 double scalarRange[2], vtkVolumeProperty* node);
228 void SetLabelMapToVolumeProp(
229 vtkScalarsToColors* lut, vtkVolumeProperty* node);
246 char *displayNodeID);
299 int LoadCustomPresetsScene(
const char* sceneFilePath);
315 bool IsDifferentFunction(vtkPiecewiseFunction* function1,
316 vtkPiecewiseFunction* function2)
const;
320 bool IsDifferentFunction(vtkColorTransferFunction* function1,
321 vtkColorTransferFunction* function2)
const;
323 vtkSetMacro(DefaultROIClassName, std::string);
324 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.