15 #ifndef __vtkMRMLDisplayNode_h 16 #define __vtkMRMLDisplayNode_h 24 class vtkAlgorithmOutput;
42 void PrintSelf(ostream& os, vtkIndent indent)
override;
47 PointsRepresentation = 0,
55 FlatInterpolation = 0,
73 UseManualScalarRange = 0,
79 NUM_SCALAR_RANGE_FLAGS
80 } ScalarRangeFlagType;
90 static const char* GetScalarRangeFlagTypeAsString(
int flag);
92 static int GetScalarRangeFlagTypeFromString(
const char* name);
104 void WriteXML(ostream& of,
int indent)
override;
114 void *callData)
override;
131 vtkSetVector3Macro(Color,
double);
134 vtkGetVector3Macro(Color,
double);
138 vtkSetVector3Macro(EdgeColor,
double);
141 vtkGetVector3Macro(EdgeColor,
double);
145 vtkSetVector3Macro(SelectedColor,
double);
148 vtkGetVector3Macro(SelectedColor,
double);
152 vtkSetMacro(SelectedAmbient,
double);
155 vtkGetMacro(SelectedAmbient,
double);
159 vtkSetMacro(SelectedSpecular,
double);
162 vtkGetMacro(SelectedSpecular,
double);
166 vtkSetMacro(PointSize,
double);
169 vtkGetMacro(PointSize,
double);
173 vtkSetMacro(LineWidth,
double);
176 vtkGetMacro(LineWidth,
double);
180 vtkSetMacro(Representation,
int);
183 vtkGetMacro(Representation,
int);
187 vtkSetMacro(Opacity,
double);
190 vtkGetMacro(Opacity,
double);
194 vtkSetMacro(SliceIntersectionOpacity,
double);
197 vtkGetMacro(SliceIntersectionOpacity,
double);
201 vtkSetMacro(Ambient,
double);
204 vtkGetMacro(Ambient,
double);
208 vtkSetMacro(Diffuse,
double);
211 vtkGetMacro(Diffuse,
double);
215 vtkSetMacro(Specular,
double);
218 vtkGetMacro(Specular,
double);
222 vtkSetMacro(Power,
double);
225 vtkGetMacro(Power,
double);
229 vtkSetMacro(Visibility,
int);
232 vtkGetMacro(Visibility,
int);
235 vtkBooleanMacro(Visibility,
int);
241 virtual bool GetVisibility(
const char* viewNodeID);
246 vtkSetMacro(Visibility2D,
int);
250 vtkGetMacro(Visibility2D,
int);
254 vtkBooleanMacro(Visibility2D,
int);
259 vtkSetMacro(Visibility3D,
int);
263 vtkGetMacro(Visibility3D,
int);
267 vtkBooleanMacro(Visibility3D,
int);
271 vtkSetMacro(EdgeVisibility,
int);
272 vtkBooleanMacro(EdgeVisibility,
int);
275 vtkGetMacro(EdgeVisibility,
int);
279 vtkSetMacro(Clipping,
int);
282 vtkGetMacro(Clipping,
int);
285 vtkBooleanMacro(Clipping,
int);
292 void SetSliceIntersectionVisibility(
int on);
298 int GetSliceIntersectionVisibility();
304 void SliceIntersectionVisibilityOn();
310 void SliceIntersectionVisibilityOff();
314 vtkSetMacro(SliceIntersectionThickness,
int);
317 vtkGetMacro(SliceIntersectionThickness,
int);
327 vtkSetMacro(FrontfaceCulling,
int);
328 vtkGetMacro(FrontfaceCulling,
int);
329 vtkBooleanMacro(FrontfaceCulling,
int);
330 vtkSetMacro(BackfaceCulling,
int);
331 vtkGetMacro(BackfaceCulling,
int);
332 vtkBooleanMacro(BackfaceCulling,
int);
338 vtkSetMacro(Lighting,
int);
342 vtkGetMacro(Lighting,
int);
345 vtkBooleanMacro(Lighting,
int);
349 vtkSetMacro(Interpolation,
int);
352 vtkGetMacro(Interpolation,
int);
356 vtkSetMacro(Shading,
int);
359 vtkGetMacro(Shading,
int);
364 vtkSetMacro(ScalarVisibility,
int);
368 vtkGetMacro(ScalarVisibility,
int);
371 vtkBooleanMacro(ScalarVisibility,
int);
376 vtkSetMacro(VectorVisibility,
int);
380 vtkGetMacro(VectorVisibility,
int);
383 vtkBooleanMacro(VectorVisibility,
int);
388 vtkSetMacro(TensorVisibility,
int);
392 vtkGetMacro(TensorVisibility,
int);
395 vtkBooleanMacro(TensorVisibility,
int);
401 void SetAutoScalarRange(
int b);
406 int GetAutoScalarRange();
410 void AutoScalarRangeOn();
411 void AutoScalarRangeOff();
420 virtual void UpdateScalarRange();
424 vtkSetVector2Macro(ScalarRange,
double);
427 vtkGetVector2Macro(ScalarRange,
double);
432 virtual void SetScalarRangeFlag(
int flag);
435 vtkGetMacro(ScalarRangeFlag,
int);
438 const char* GetScalarRangeFlagAsString();
441 void SetScalarRangeFlagFromString(
const char* str);
445 vtkSetMacro(FolderDisplayOverrideAllowed,
bool);
448 vtkGetMacro(FolderDisplayOverrideAllowed,
bool);
451 vtkBooleanMacro(FolderDisplayOverrideAllowed,
bool);
455 virtual void SetTextureImageDataConnection(vtkAlgorithmOutput *ImageDataConnection);
458 vtkGetObjectMacro(TextureImageDataConnection, vtkAlgorithmOutput);
463 vtkSetMacro(InterpolateTexture,
int);
467 vtkGetMacro(InterpolateTexture,
int);
470 vtkBooleanMacro(InterpolateTexture,
int);
474 virtual void SetAndObserveColorNodeID(
const char *ColorNodeID);
478 void SetAndObserveColorNodeID(
const std::string& ColorNodeID);
481 vtkGetStringMacro(ColorNodeID);
490 vtkSetStringMacro(ActiveScalarName);
493 vtkGetStringMacro(ActiveScalarName);
498 vtkSetMacro(ActiveAttributeLocation,
int);
501 vtkGetMacro(ActiveAttributeLocation,
int);
504 const char* GetActiveAttributeLocationAsString();
507 void SetActiveAttributeLocationFromString(
const char* str);
512 virtual void SetActiveScalar(
const char *scalarName,
int location);
523 void AddViewNodeID(
const char* viewNodeID);
531 void RemoveViewNodeID(
char* viewNodeID);
534 void RemoveAllViewNodeIDs();
538 inline int GetNumberOfViewNodeIDs()
const;
542 const char* GetNthViewNodeID(
unsigned int index);
546 inline std::vector< std::string > GetViewNodeIDs()
const;
550 bool IsViewNodeIDPresent(
const char* viewNodeID)
const;
555 bool IsDisplayableInView(
const char* viewNodeID)
const;
560 void SetDisplayableOnlyInView(
const char *viewNodeID);
564 void SetViewNodeIDs(
const std::vector< std::string >& viewNodeIDs);
567 static const char* GetAttributeLocationAsString(
int id);
569 static int GetAttributeLocationFromString(
const char* name);
773 double ScalarRange[2];
790 double SelectedColor[3];
818 void SetColorNodeID(
const char*
id);
int GetNumberOfViewNodeIDs() const
virtual vtkDataArray * GetActiveScalarArray()
vtkAlgorithmOutput * TextureImageDataConnection
bool FolderDisplayOverrideAllowed
vtkMRMLColorNode * ColorNode
std::vector< std::string > ViewNodeIDs
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.
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 *)