15#ifndef __vtkMRMLScalarVolumeDisplayNode_h
16#define __vtkMRMLScalarVolumeDisplayNode_h
22class vtkImageAlgorithm;
23class vtkImageAppendComponents;
24class vtkImageHistogramStatistics;
27class vtkImageMapToColors;
28class vtkImageMapToWindowLevelColors;
30class vtkImageThreshold;
31class vtkImageExtractComponents;
32class vtkImageMathematics;
45 void PrintSelf(ostream& os, vtkIndent indent)
override;
55 void WriteXML(ostream& of,
int indent)
override;
73 vtkWarningMacro(
"vtkMRMLScalarVolumeDisplayNode::GetWindowLevelLocked method is deprecated. To check if the mouse mode cannot change window/level, get info from the interaction node. "
74 "e.g. slicer.app.applicationLogic().GetInteractionNode().GetCurrentInteractionMode() == slicer.vtkMRMLInteractionNode.AdjustWindowLevel");
80 vtkWarningMacro(
"vtkMRMLScalarVolumeDisplayNode::SetWindowLevelLocked method is deprecated. To prevent the mouse from changing window/level, set the interaction node to something other than AdjustWindowLevel. "
81 "e.g. slicer.app.applicationLogic().GetInteractionNode().SetCurrentInteractionMode(slicer.vtkMRMLInteractionNode.ViewTransform)");
Abstract MRML node to represent color information.
std::vector< WindowLevelPreset > WindowLevelPresets
window level presets
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'.
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()
void UpdateLookupTable(vtkMRMLColorNode *newColorNode)
void SetInputImageDataConnection(vtkAlgorithmOutput *imageDataConnection) override
Set the pipeline input.
double GetLevelPreset(int p)
vtkImageStencil * MultiplyAlpha
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
void CalculateAutoLevels()
vtkMRMLCopyContentMacro(vtkMRMLScalarVolumeDisplayNode)
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
vtkImageMapToWindowLevelColors * MapToWindowLevelColors
vtkMRMLScalarVolumeDisplayNode(const vtkMRMLScalarVolumeDisplayNode &)
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.
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)
bool IsInCalculateAutoLevels
virtual double GetLowerThreshold()
double GetWindowLevelMin()
Utility function that returns the minimum value of the window level.
vtkMRMLVolumeDisplayNode()