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);
   129   void AddAllVolumeRenderingDisplayNodes();
   133   void RemoveAllVolumeRenderingDisplayNodes();
   137   void ChangeVolumeRenderingMethod(
const char* displayNodeClassName = 
nullptr);
   154   void CopyDisplayToVolumeRenderingDisplayNode(
   163   void CopyScalarDisplayToVolumeRenderingDisplayNode(
   172   void CopyLabelMapDisplayToVolumeRenderingDisplayNode(
   191   void SetThresholdToVolumeProp(
   192     double scalarRange[2], 
double threshold[2],
   193     vtkVolumeProperty* node,
   194     bool linearRamp = 
false, 
bool stayUpAtUpperLimit = 
false);
   218   void SetWindowLevelToVolumeProp(
   219     double scalarRange[2], 
double windowLevel[2],
   220     vtkLookupTable* lut, vtkVolumeProperty* node);
   225   void SetGradientOpacityToVolumeProp(
   226     double scalarRange[2], vtkVolumeProperty* node);
   231   void SetLabelMapToVolumeProp(
   232     vtkScalarsToColors* lut, vtkVolumeProperty* node);
   242                                        bool createROI=
true);
   253                                                                     char *displayNodeID);
   307   int LoadCustomPresetsScene(
const char* sceneFilePath);
   323   bool IsDifferentFunction(vtkPiecewiseFunction* function1,
   324                            vtkPiecewiseFunction* function2) 
const;
   328   bool IsDifferentFunction(vtkColorTransferFunction* function1,
   329                            vtkColorTransferFunction* function2) 
const;
   331   vtkSetMacro(DefaultROIClassName, std::string);
   332   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.