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 ) VTK_OVERRIDE;
95 virtual
void ReadXMLAttributes ( const
char** atts ) VTK_OVERRIDE;
99 virtual
void WriteXML ( ostream& of,
int indent ) VTK_OVERRIDE;
104 virtual
void Copy (
vtkMRMLNode *node ) VTK_OVERRIDE;
108 virtual const
char* GetNodeTagName() VTK_OVERRIDE {
return "AnnotationDisplay";}
118 void * ) VTK_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() &
static vtkMRMLModelDisplayNode * New()
MRML node to represent a display property of 3D surface model.
double SuperSelectedSpecular
void SliceProjectionOn()
Set SliceProjection to On.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual void CreateBackup()
Creates a backup of the current MRML state of this node and keeps a reference.
vtkMRMLAnnotationDisplayNode * m_Backup
double SuperSelectedAmbient
A set of MRML Nodes that supports serialization and undo/redo.
virtual void RestoreBackup()
virtual void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData) VTK_OVERRIDE
#define vtkSetAndPropagateVector3Macro(name, type)
void SliceProjectionOff()
Set SliceProjection to Off.
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE
Create instance of the default node. Like New only virtual.
void operator=(const vtkMRMLModelDisplayNode &)
Abstract Superclass for all specific types of MRML nodes.
virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE
Finds the storage node and read the data.
#define vtkSetAndPropagateMacro(name, type)