9 #ifndef __vtkMRMLAnnotationDisplayNode_h 10 #define __vtkMRMLAnnotationDisplayNode_h 16 #include "vtkSlicerAnnotationsModuleMRMLExport.h" 18 #define vtkSetAndPropagateVector3Macro(name,type) \ 19 virtual void SetAndPropagateSuper##name (type _arg1, type _arg2, type _arg3) \ 21 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting Super" << #name " to (" << _arg1 << "," << _arg2 << "," << _arg3 << ")"); \ 22 if ((this->Super##name[0] != _arg1)||(this->Super##name[1] != _arg2)||(this->Super##name[2] != _arg3)) \ 24 this->name[0] = _arg1; \ 25 this->name[1] = _arg2; \ 26 this->name[2] = _arg3; \ 27 this->Super##name[0] = _arg1; \ 28 this->Super##name[1] = _arg2; \ 29 this->Super##name[2] = _arg3; \ 30 vtkMRMLDisplayableNode *displayableNode = this->GetDisplayableNode(); \ 31 if (!displayableNode) \ 35 for (int i=0; i<displayableNode->GetNumberOfDisplayNodes(); i++) \ 37 vtkMRMLDisplayNode *displayNode = displayableNode->GetNthDisplayNode(i); \ 38 if (!displayNode || displayNode==this) \ 42 displayNode->Set##name(this->Super##name); \ 47 virtual void SetAndPropagateSuper##name (type _arg[3]) \ 49 this->SetAndPropagateSuper##name (_arg[0], _arg[1], _arg[2]);\ 52 #define vtkSetAndPropagateMacro(name,type) \ 53 virtual void SetAndPropagateSuper##name (type _arg) \ 55 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting Super" << #name " to (" << _arg << ")"); \ 56 if (this->Super##name != _arg) \ 59 this->Super##name = _arg; \ 60 vtkMRMLDisplayableNode *displayableNode = this->GetDisplayableNode(); \ 61 if (!displayableNode) \ 65 for (int i=0; i<displayableNode->GetNumberOfDisplayNodes(); i++) \ 67 vtkMRMLDisplayNode *displayNode = displayableNode->GetNthDisplayNode(i); \ 68 if (!displayNode || displayNode==this) \ 72 displayNode->Set##name(this->Super##name); \ 85 void PrintSelf ( ostream& os, vtkIndent indent )
override;
99 void WriteXML ( ostream& of,
int indent )
override;
133 vtkGetVector3Macro(SuperColor,
double);
136 vtkGetVector3Macro(SuperSelectedColor,
double);
139 vtkGetMacro(SuperOpacity,
double);
142 vtkGetMacro(SuperAmbient,
double);
145 vtkGetMacro(SuperDiffuse,
double);
148 vtkGetMacro(SuperSpecular,
double);
151 vtkGetMacro(SuperPower,
double);
154 vtkGetMacro(SuperSelectedAmbient,
double);
157 vtkGetMacro(SuperSelectedSpecular,
double);
164 vtkSetMacro(SliceProjection,
int);
165 vtkGetMacro(SliceProjection,
int);
170 ProjectionOff = 0x00,
175 inline void SliceProjectionOn();
178 inline void SliceProjectionOff();
182 vtkSetVector3Macro(ProjectedColor,
double);
183 vtkGetVector3Macro(ProjectedColor,
double);
187 vtkSetMacro(ProjectedOpacity,
double);
188 vtkGetMacro(ProjectedOpacity,
double);
198 double SuperColor[3];
199 double SuperSelectedColor[3];
211 double ProjectedColor[3];
219 this->SetSliceProjection( this->GetSliceProjection() |
227 this->SetSliceProjection( this->GetSliceProjection() &
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
static vtkMRMLModelDisplayNode * New()
MRML node to represent a display property of 3D surface model.
double SuperSelectedSpecular
void SliceProjectionOn()
Set SliceProjection to On.
void UpdateScene(vtkMRMLScene *scene) override
Finds the storage node and read the data.
virtual void CreateBackup()
Creates a backup of the current MRML state of this node and keeps a reference.
vtkMRMLAnnotationDisplayNode * m_Backup
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.
double SuperSelectedAmbient
A set of MRML Nodes that supports serialization and undo/redo.
virtual void RestoreBackup()
#define vtkSetAndPropagateVector3Macro(name, type)
void SliceProjectionOff()
Set SliceProjection to Off.
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
void operator=(const vtkMRMLModelDisplayNode &)
void PrintSelf(ostream &os, vtkIndent indent) override
Abstract Superclass for all specific types of MRML nodes.
void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData) override
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
#define vtkSetAndPropagateMacro(name, type)