15 #ifndef __vtkMRMLScalarVolumeDisplayNode_h 16 #define __vtkMRMLScalarVolumeDisplayNode_h 22 class vtkImageAlgorithm;
23 class vtkImageAppendComponents;
24 class vtkImageHistogramStatistics;
27 class vtkImageMapToColors;
28 class vtkImageMapToWindowLevelColors;
29 class vtkImageStencil;
30 class vtkImageThreshold;
31 class vtkImageExtractComponents;
32 class vtkImageMathematics;
45 void PrintSelf(ostream& os, vtkIndent indent)
override;
55 void WriteXML(ostream& of,
int indent)
override;
72 vtkGetMacro(WindowLevelLocked,
bool);
73 vtkSetMacro(WindowLevelLocked,
bool);
77 vtkBooleanMacro(AutoWindowLevel,
int);
78 vtkGetMacro(AutoWindowLevel,
int);
79 vtkSetMacro(AutoWindowLevel,
int);
84 virtual void SetWindow(
double);
89 virtual void SetLevel(
double);
93 virtual void SetWindowLevel(
double window,
double level);
96 void SetWindowLevelMinMax(
double min,
double max);
99 double GetWindowLevelMin();
101 double GetWindowLevelMax();
105 vtkBooleanMacro(ApplyThreshold,
int);
106 vtkGetMacro(ApplyThreshold,
int);
107 virtual void SetApplyThreshold(
int);
111 vtkBooleanMacro(AutoThreshold,
int);
112 vtkGetMacro(AutoThreshold,
int);
113 vtkSetMacro(AutoThreshold,
int);
118 virtual double GetLowerThreshold();
119 virtual void SetLowerThreshold(
double lower);
124 virtual double GetUpperThreshold();
125 virtual void SetUpperThreshold(
double upper);
127 virtual void SetThreshold(
double lower,
double upper);
131 vtkGetMacro(Interpolate,
int);
132 vtkSetMacro(Interpolate,
int);
133 vtkBooleanMacro(Interpolate,
int);
159 void AddWindowLevelPresetFromString(
const char *preset);
162 void AddWindowLevelPreset(
double window,
double level);
166 void ResetWindowLevelPresets();
170 void SetWindowLevelFromPreset(
int p);
174 int GetNumberOfWindowLevelPresets();
178 double GetWindowPreset(
int p);
179 double GetLevelPreset(
int p);
186 virtual void GetDisplayScalarRange(
double range[2]);
196 void CalculateAutoLevels();
200 vtkImageData* GetScalarImageData();
201 virtual vtkAlgorithmOutput* GetScalarImageDataConnection();
vtkImageExtractComponents * ExtractRGB
vtkImageStencil * MultiplyAlpha
virtual void SetInputImageDataConnection(vtkAlgorithmOutput *imageDataConnection)
MRML node for representing a volume display attributes.
void PrintSelf(ostream &os, vtkIndent indent) override
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
virtual void SetDefaultColorMap()
set gray colormap or override in subclass
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
virtual void SetColorNodeInternal(vtkMRMLColorNode *newColorNode)
vtkImageMapToColors * MapToColors
virtual void Copy(vtkMRMLNode *node)
Copy node contents from another node of the same type. Does not copy node ID and Scene. Performs deep copy - an independent copy is created from all data, including bulk data.
vtkImageMapToWindowLevelColors * MapToWindowLevelColors
std::vector< WindowLevelPreset > WindowLevelPresets
window level presets
vtkImageThreshold * Threshold
virtual void SetBackgroundImageStencilDataConnection(vtkAlgorithmOutput *imageDataConnection)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
bool IsInCalculateAutoLevels
Abstract MRML node to represent color information.
vtkImageLogic * AlphaLogic
vtkImageAppendComponents * AppendComponents
vtkImageExtractComponents * ExtractAlpha
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
alternative method to propagate events generated in Display nodes
virtual void SetInputToImageDataPipeline(vtkAlgorithmOutput *imageDataConnection)
void operator=(const vtkMRMLVolumeDisplayNode &)
virtual vtkAlgorithmOutput * GetOutputImageDataConnection()
Abstract Superclass for all specific types of MRML nodes.
virtual vtkAlgorithmOutput * GetBackgroundImageStencilDataConnection()
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
MRML node for representing a volume display attributes.
vtkImageHistogramStatistics * HistogramStatistics
Used internally in CalculateScalarAutoLevels and CalculateStatisticsAutoLevels
virtual vtkAlgorithmOutput * GetInputImageDataConnection()