15#ifndef __vtkMRMLScalarVolumeDisplayNode_h
16#define __vtkMRMLScalarVolumeDisplayNode_h
23class vtkImageAlgorithm;
24class vtkImageAppendComponents;
25class vtkImageHistogramStatistics;
28class vtkImageMapToColors;
30class vtkImageThreshold;
31class vtkImageExtractComponents;
32class vtkImageMathematics;
33class vtkScalarsToColors;
46 void PrintSelf(ostream& os, vtkIndent indent)
override;
56 void WriteXML(ostream& of,
int indent)
override;
74 "vtkMRMLScalarVolumeDisplayNode::GetWindowLevelLocked method is deprecated. To check if the mouse mode cannot change window/level, get info from the interaction node. "
75 "e.g. slicer.app.applicationLogic().GetInteractionNode().GetCurrentInteractionMode() == slicer.vtkMRMLInteractionNode.AdjustWindowLevel");
82 vtkWarningMacro(
"vtkMRMLScalarVolumeDisplayNode::SetWindowLevelLocked method is deprecated. To prevent the mouse from changing window/level, set the interaction node to "
83 "something other than AdjustWindowLevel. "
84 "e.g. slicer.app.applicationLogic().GetInteractionNode().SetCurrentInteractionMode(slicer.vtkMRMLInteractionNode.ViewTransform)");
Subclass of vtkImageMapToWindowLevelColors that adds the option to compress values within the window ...
WindowMappingMode
Window Scalar Mapping Modes.
Abstract MRML node to represent color information.
WindowLevelPreset(double window, double level)
std::vector< WindowLevelPreset > WindowLevelPresets
window level presets
static vtkImageMapToWindowLevelAddon::WindowMappingMode GetWindowMappingMethodFromIndex(int idx)
virtual void SetInvertDisplayScalarRange(int invert)
void SetDefaultColorMap() override
set gray colormap or override in subclass
void SetInputToImageDataPipeline(vtkAlgorithmOutput *imageDataConnection) override
virtual vtkAlgorithmOutput * GetScalarImageDataConnection()
double GetLevel()
The level value to use when autoWindowLevel is 'no'.
virtual void SetWindowMappingMethod(int method)
void PrintSelf(ostream &os, vtkIndent indent) override
vtkImageExtractComponents * ExtractRGB
vtkImageHistogramStatistics * HistogramStatistics
Used internally in CalculateScalarAutoLevels and CalculateStatisticsAutoLevels.
~vtkMRMLScalarVolumeDisplayNode() override
virtual void SetLevel(double)
virtual void SetUpperThreshold(double upper)
vtkMRMLScalarVolumeDisplayNode()
static const char * GetWindowMappingMethodAsString(int type)
virtual vtkScalarsToColors * GetLookupTable()
void UpdateLookupTable(vtkMRMLColorNode *newColorNode)
void SetInputImageDataConnection(vtkAlgorithmOutput *imageDataConnection) override
Set the pipeline input.
void SetWindowLevelPresets(const std::vector< WindowLevelPreset > &windowLevelPresets)
double GetLevelPreset(int p)
vtkImageStencil * MultiplyAlpha
static int GetWindowMappingMethodFromString(const char *name)
virtual void SetApplyThreshold(int)
virtual void SetWindowLevel(double window, double level)
vtkAlgorithmOutput * GetOutputImageDataConnection() override
Gets the pipeline output.
void SetWindowLevelFromPreset(int p)
Set Window and Level from preset p.
vtkAlgorithmOutput * GetBackgroundImageStencilDataConnection() override
virtual void SetLowerThreshold(double lower)
vtkImageThreshold * Threshold
double GetWindowPreset(int p)
Return a specific preset, returns 0 if p out of range.
vtkImageData * GetScalarImageData()
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
vtkImageLogic * AlphaLogic
vtkImageAppendComponents * AppendComponents
void SetColorNodeInternal(vtkMRMLColorNode *newColorNode) override
double GetWindowLevelMax()
Utility function that returns the maximum value of the window level.
void SetBackgroundImageStencilDataConnection(vtkAlgorithmOutput *imageDataConnection) override
Get/set background mask stencil.
static vtkMRMLScalarVolumeDisplayNode * New()
void ResetWindowLevelPresets()
Remove all presets.
virtual double GetUpperThreshold()
double GetWindow()
The window value to use when autoWindowLevel is 'no'.
virtual void SetWindowLevelLocked(bool)
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
alternative method to propagate events generated in Display nodes
static bool GetWindowLevelFromPresetString(const char *preset, double &window, double &level)
Parse a window level preset string (window and level values separated by "|") to numeric values.
void CalculateAutoLevels()
vtkMRMLCopyContentMacro(vtkMRMLScalarVolumeDisplayNode)
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
vtkMRMLScalarVolumeDisplayNode(const vtkMRMLScalarVolumeDisplayNode &)
vtkImageMapToWindowLevelAddon * MapToWindowLevelColors
void AddWindowLevelPreset(double window, double level)
Add a window level preset.
virtual void GetDisplayScalarRange(double range[2])
vtkImageExtractComponents * ExtractAlpha
void operator=(const vtkMRMLScalarVolumeDisplayNode &)
vtkAlgorithmOutput * GetInputImageDataConnection() override
Gets the pipeline input.
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
virtual void SetWindow(double)
void AddWindowLevelPresetFromString(const char *preset)
Parse a string with window and level as double|double, and add a preset.
static std::string GetWindowLevelAsPresetString(double window, double level)
Convert window and level values to preset string (window and level values separated by "|")
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
int GetNumberOfWindowLevelPresets()
Get the number of window/level presets.
vtkImageMapToColors * MapToColors
bool GetWindowLevelLocked()
Display Information.
virtual void SetThreshold(double lower, double upper)
void SetWindowLevelMinMax(double min, double max)
int InvertDisplayScalarRange
bool IsInCalculateAutoLevels
virtual double GetLowerThreshold()
double GetWindowLevelMin()
Utility function that returns the minimum value of the window level.
vtkMRMLVolumeDisplayNode()