Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Classes | Macros
vtkMRMLNode.h File Reference
#include "vtkMRML.h"
#include "vtkObserverManager.h"
#include "vtkIdTypeArray.h"
#include "vtkIntArray.h"
#include <vtkObject.h>
#include <vtkSmartPointer.h>
#include <vtkWeakPointer.h>
#include <vtkLoggingMacros.h>
#include "vtkMRMLNodePropertyMacros.h"
#include <map>
#include <string>
#include <vector>
Include dependency graph for vtkMRMLNode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  vtkMRMLNode
 Abstract Superclass for all specific types of MRML nodes. More...
 
class  vtkMRMLNode::vtkMRMLNodeReference
 Class to hold information about a node reference. More...
 

Macros

#define vtkCxxSetReferenceStringMacro(class, name)
 
#define vtkMRMLNodeNewMacro(newClass)
 
#define vtkObserveMRMLObjectEventsMacro(node, events)   {this->MRMLObserverManager->AddObjectEvents ( (node), (events) );};
 
#define vtkObserveMRMLObjectMacro(node)   {this->MRMLObserverManager->ObserveObject ( (node) );};
 
#define vtkSetAndObserveMRMLObjectEventsMacro(node, value, events)   {this->MRMLObserverManager->SetAndObserveObjectEvents ( vtkObjectPointer( &(node)), (value), (events));};
 
#define vtkSetAndObserveMRMLObjectEventsMacroNoWarning(node, value, events)   {this->MRMLObserverManager->SetAndObserveObjectEvents ( vtkObjectPointer( &(node)), (value), (events), NULL /* priorities */, false /* no warning */);};
 
#define vtkSetAndObserveMRMLObjectMacro(node, value)   {this->MRMLObserverManager->SetAndObserveObject ( vtkObjectPointer( &(node)), (value) );};
 Can be used to set any vtkObject, not only vtkMRMLNodes. More...
 
#define vtkSetAndObserveMRMLObjectMacroNoWarning(node, value)   {this->MRMLObserverManager->SetAndObserveObject ( vtkObjectPointer( &(node)), (value), 0.0, false /* no warning */ );};
 
#define vtkSetMRMLObjectMacro(node, value)   {this->MRMLObserverManager->SetObject ( vtkObjectPointer( &(node)), (value) );};
 
#define vtkSetReferenceStringBodyMacro(name)
 
#define vtkSetReferenceStringMacro(name)
 
#define vtkUnObserveMRMLObjectMacro(node)   {this->MRMLObserverManager->RemoveObjectEvents ( (node) );};
 

Macro Definition Documentation

◆ vtkCxxSetReferenceStringMacro

#define vtkCxxSetReferenceStringMacro (   class,
  name 
)
Value:
void class::Set##name (const char* _arg) \
{ \
vtkSetReferenceStringBodyMacro(name); \
}

Definition at line 116 of file vtkMRMLNode.h.

◆ vtkMRMLNodeNewMacro

#define vtkMRMLNodeNewMacro (   newClass)
Value:
vtkStandardNewMacro(newClass); \
vtkMRMLNode* newClass::CreateNodeInstance() \
{ \
return newClass::New(); \
}

Definition at line 124 of file vtkMRMLNode.h.

◆ vtkObserveMRMLObjectEventsMacro

#define vtkObserveMRMLObjectEventsMacro (   node,
  events 
)    {this->MRMLObserverManager->AddObjectEvents ( (node), (events) );};

Definition at line 70 of file vtkMRMLNode.h.

◆ vtkObserveMRMLObjectMacro

#define vtkObserveMRMLObjectMacro (   node)    {this->MRMLObserverManager->ObserveObject ( (node) );};

Definition at line 66 of file vtkMRMLNode.h.

◆ vtkSetAndObserveMRMLObjectEventsMacro

#define vtkSetAndObserveMRMLObjectEventsMacro (   node,
  value,
  events 
)    {this->MRMLObserverManager->SetAndObserveObjectEvents ( vtkObjectPointer( &(node)), (value), (events));};

Definition at line 58 of file vtkMRMLNode.h.

◆ vtkSetAndObserveMRMLObjectEventsMacroNoWarning

#define vtkSetAndObserveMRMLObjectEventsMacroNoWarning (   node,
  value,
  events 
)    {this->MRMLObserverManager->SetAndObserveObjectEvents ( vtkObjectPointer( &(node)), (value), (events), NULL /* priorities */, false /* no warning */);};

Definition at line 62 of file vtkMRMLNode.h.

◆ vtkSetAndObserveMRMLObjectMacro

#define vtkSetAndObserveMRMLObjectMacro (   node,
  value 
)    {this->MRMLObserverManager->SetAndObserveObject ( vtkObjectPointer( &(node)), (value) );};

Can be used to set any vtkObject, not only vtkMRMLNodes.

Definition at line 50 of file vtkMRMLNode.h.

◆ vtkSetAndObserveMRMLObjectMacroNoWarning

#define vtkSetAndObserveMRMLObjectMacroNoWarning (   node,
  value 
)    {this->MRMLObserverManager->SetAndObserveObject ( vtkObjectPointer( &(node)), (value), 0.0, false /* no warning */ );};

Definition at line 54 of file vtkMRMLNode.h.

◆ vtkSetMRMLObjectMacro

#define vtkSetMRMLObjectMacro (   node,
  value 
)    {this->MRMLObserverManager->SetObject ( vtkObjectPointer( &(node)), (value) );};

Definition at line 45 of file vtkMRMLNode.h.

◆ vtkSetReferenceStringBodyMacro

#define vtkSetReferenceStringBodyMacro (   name)
Value:
vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting " << #name " to " << (_arg?_arg:"(null)") ); \
if ( this->name == NULL && _arg == NULL) { return;} \
if ( this->name && _arg && (!strcmp(this->name,_arg))) { return;} \
std::string oldValue; \
if (this->name) { oldValue = this->name; delete [] this->name; } \
if (_arg) \
{ \
size_t n = strlen(_arg) + 1; \
char *cp1 = new char[n]; \
const char *cp2 = (_arg); \
this->name = cp1; \
do { *cp1++ = *cp2++; } while ( --n ); \
} \
else \
{ \
this->name = NULL; \
} \
this->Modified(); \
if (this->Scene && this->name) \
{ \
if (oldValue.size() > 0) \
{ \
this->Scene->RemoveReferencedNodeID(oldValue.c_str(), this); \
} \
this->Scene->AddReferencedNodeID(this->name, this); \
}

Definition at line 78 of file vtkMRMLNode.h.

◆ vtkSetReferenceStringMacro

#define vtkSetReferenceStringMacro (   name)
Value:
virtual void Set##name (const char* _arg) \
{ \
vtkSetReferenceStringBodyMacro(name)\
}

Definition at line 108 of file vtkMRMLNode.h.

◆ vtkUnObserveMRMLObjectMacro

#define vtkUnObserveMRMLObjectMacro (   node)    {this->MRMLObserverManager->RemoveObjectEvents ( (node) );};

Definition at line 74 of file vtkMRMLNode.h.