15 #ifndef __vtkMRMLDisplayNode_h 16 #define __vtkMRMLDisplayNode_h 24 class vtkAlgorithmOutput;
30 class vtkTextProperty;
42 void PrintSelf(ostream& os, vtkIndent indent)
override;
47 PointsRepresentation = 0,
55 FlatInterpolation = 0,
74 UseManualScalarRange = 0,
80 NUM_SCALAR_RANGE_FLAGS
81 } ScalarRangeFlagType;
98 static const char* GetScalarRangeFlagTypeAsString(
int flag);
100 static int GetScalarRangeFlagTypeFromString(
const char* name);
112 void WriteXML(ostream& of,
int indent)
override;
122 void *callData)
override;
139 vtkSetVector3Macro(Color,
double);
142 vtkGetVector3Macro(Color,
double);
146 vtkSetVector3Macro(EdgeColor,
double);
149 vtkGetVector3Macro(EdgeColor,
double);
153 vtkSetVector3Macro(SelectedColor,
double);
156 vtkGetVector3Macro(SelectedColor,
double);
160 vtkSetMacro(SelectedAmbient,
double);
163 vtkGetMacro(SelectedAmbient,
double);
167 vtkSetMacro(SelectedSpecular,
double);
170 vtkGetMacro(SelectedSpecular,
double);
174 vtkSetMacro(PointSize,
double);
177 vtkGetMacro(PointSize,
double);
181 vtkSetMacro(LineWidth,
double);
184 vtkGetMacro(LineWidth,
double);
188 vtkSetMacro(Representation,
int);
191 vtkGetMacro(Representation,
int);
195 vtkSetMacro(Opacity,
double);
198 vtkGetMacro(Opacity,
double);
202 vtkSetMacro(SliceIntersectionOpacity,
double);
205 vtkGetMacro(SliceIntersectionOpacity,
double);
209 vtkSetMacro(Ambient,
double);
212 vtkGetMacro(Ambient,
double);
216 vtkSetMacro(Diffuse,
double);
219 vtkGetMacro(Diffuse,
double);
223 vtkSetMacro(Specular,
double);
226 vtkGetMacro(Specular,
double);
230 vtkSetMacro(Power,
double);
233 vtkGetMacro(Power,
double);
236 vtkSetMacro(Metallic,
double);
239 vtkGetMacro(Metallic,
double);
243 vtkSetMacro(Roughness,
double);
246 vtkGetMacro(Roughness,
double);
251 vtkSetMacro(Visibility,
int);
254 vtkGetMacro(Visibility,
int);
257 vtkBooleanMacro(Visibility,
int);
265 virtual bool GetVisibility(
const char* viewNodeID);
270 vtkSetMacro(Visibility2D,
int);
274 vtkGetMacro(Visibility2D,
int);
278 vtkBooleanMacro(Visibility2D,
int);
283 vtkSetMacro(Visibility3D,
int);
287 vtkGetMacro(Visibility3D,
int);
291 vtkBooleanMacro(Visibility3D,
int);
295 vtkSetMacro(EdgeVisibility,
int);
296 vtkBooleanMacro(EdgeVisibility,
int);
299 vtkGetMacro(EdgeVisibility,
int);
303 vtkSetMacro(Clipping,
int);
306 vtkGetMacro(Clipping,
int);
309 vtkBooleanMacro(Clipping,
int);
316 void SetSliceIntersectionVisibility(
int on);
322 int GetSliceIntersectionVisibility();
328 void SliceIntersectionVisibilityOn();
334 void SliceIntersectionVisibilityOff();
338 vtkSetMacro(SliceIntersectionThickness,
int);
341 vtkGetMacro(SliceIntersectionThickness,
int);
351 vtkSetMacro(FrontfaceCulling,
int);
352 vtkGetMacro(FrontfaceCulling,
int);
353 vtkBooleanMacro(FrontfaceCulling,
int);
354 vtkSetMacro(BackfaceCulling,
int);
355 vtkGetMacro(BackfaceCulling,
int);
356 vtkBooleanMacro(BackfaceCulling,
int);
362 vtkSetMacro(Lighting,
int);
366 vtkGetMacro(Lighting,
int);
369 vtkBooleanMacro(Lighting,
int);
373 vtkSetMacro(Interpolation,
int);
376 vtkGetMacro(Interpolation,
int);
380 vtkSetMacro(Shading,
int);
383 vtkGetMacro(Shading,
int);
388 vtkSetMacro(ScalarVisibility,
int);
392 vtkGetMacro(ScalarVisibility,
int);
395 vtkBooleanMacro(ScalarVisibility,
int);
400 vtkSetMacro(VectorVisibility,
int);
404 vtkGetMacro(VectorVisibility,
int);
407 vtkBooleanMacro(VectorVisibility,
int);
412 vtkSetMacro(TensorVisibility,
int);
416 vtkGetMacro(TensorVisibility,
int);
419 vtkBooleanMacro(TensorVisibility,
int);
425 void SetAutoScalarRange(
int b);
430 int GetAutoScalarRange();
434 void AutoScalarRangeOn();
435 void AutoScalarRangeOff();
444 virtual void UpdateScalarRange();
448 vtkSetVector2Macro(ScalarRange,
double);
451 vtkGetVector2Macro(ScalarRange,
double);
456 virtual void SetScalarRangeFlag(
int flag);
459 vtkGetMacro(ScalarRangeFlag,
int);
462 const char* GetScalarRangeFlagAsString();
465 void SetScalarRangeFlagFromString(
const char* str);
469 vtkSetMacro(FolderDisplayOverrideAllowed,
bool);
472 vtkGetMacro(FolderDisplayOverrideAllowed,
bool);
475 vtkBooleanMacro(FolderDisplayOverrideAllowed,
bool);
478 vtkSetMacro(ShowMode,
int);
487 vtkGetMacro(ShowMode,
int);
492 static const char* GetShowModeAsString(
int flag);
495 static int GetShowModeFromString(
const char* name);
500 virtual void SetTextureImageDataConnection(vtkAlgorithmOutput *ImageDataConnection);
503 vtkGetObjectMacro(TextureImageDataConnection, vtkAlgorithmOutput);
508 vtkSetMacro(InterpolateTexture,
int);
512 vtkGetMacro(InterpolateTexture,
int);
515 vtkBooleanMacro(InterpolateTexture,
int);
519 virtual void SetAndObserveColorNodeID(
const char *ColorNodeID);
523 void SetAndObserveColorNodeID(
const std::string& ColorNodeID);
526 vtkGetStringMacro(ColorNodeID);
535 vtkSetStringMacro(ActiveScalarName);
538 vtkGetStringMacro(ActiveScalarName);
543 vtkSetMacro(ActiveAttributeLocation,
int);
546 vtkGetMacro(ActiveAttributeLocation,
int);
549 const char* GetActiveAttributeLocationAsString();
552 void SetActiveAttributeLocationFromString(
const char* str);
557 virtual void SetActiveScalar(
const char *scalarName,
int location);
568 void AddViewNodeID(
const char* viewNodeID);
576 void RemoveViewNodeID(
char* viewNodeID);
579 void RemoveAllViewNodeIDs();
583 inline int GetNumberOfViewNodeIDs()
const;
587 const char* GetNthViewNodeID(
unsigned int index);
591 inline std::vector< std::string > GetViewNodeIDs()
const;
595 bool IsViewNodeIDPresent(
const char* viewNodeID)
const;
600 bool IsDisplayableInView(
const char* viewNodeID)
const;
605 void SetDisplayableOnlyInView(
const char *viewNodeID);
609 void SetViewNodeIDs(
const std::vector< std::string >& viewNodeIDs);
612 static const char* GetAttributeLocationAsString(
int id);
614 static int GetAttributeLocationFromString(
const char* name);
618 static std::string GetTextPropertyAsString(vtkTextProperty* property);
622 static void UpdateTextPropertyFromString(std::string inputString, vtkTextProperty* property);
638 static void GetColorFromString(
const std::string& colorString,
double color[4]);
834 double ScalarRange[2];
851 double SelectedColor[3];
882 void SetColorNodeID(
const char*
id);
int GetNumberOfViewNodeIDs() const
virtual vtkDataArray * GetActiveScalarArray()
vtkAlgorithmOutput * TextureImageDataConnection
bool FolderDisplayOverrideAllowed
vtkMRMLColorNode * ColorNode
std::vector< std::string > ViewNodeIDs
set visibility manually, useful for non-essential display nodes (e.g., color legend) ...
virtual void UpdateReferences()
The method should remove all pointers and observations to all nodes that are not in the scene anymore...
virtual void ReadXMLAttributes(const char **atts)
void operator=(const vtkMRMLNode &)
virtual void UpdateReferenceID(const char *oldID, const char *newID)
Update the stored reference to another node in the scene.
virtual void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData)
Propagate events generated in mrml.
std::vector< std::string > GetViewNodeIDs() const
virtual void SetSceneReferences()
Update the references of the node to the scene.
set visibility of this node if user requests show of the displayable node
A set of MRML Nodes that supports serialization and undo/redo.
int SliceIntersectionThickness
vtkWeakPointer< vtkMRMLDisplayableNode > LastFoundDisplayableNode
Cached value of last found displayable node (it is expensive to determine it)
virtual vtkDataSet * GetScalarDataSet()
Abstract MRML node to represent color information.
virtual void WriteXML(ostream &of, int indent)
double SliceIntersectionOpacity
int ActiveAttributeLocation
void PrintSelf(ostream &os, vtkIndent indent) override
#define vtkMRMLCopyContentMacro(thisClassName)
Abstract class that contains graphical display properties for displayable nodes.
Abstract Superclass for all specific types of MRML nodes.
virtual void UpdateAssignedAttribute()
virtual void UpdateScene(vtkMRMLScene *)