Slicer  4.11
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 <set>
#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  MRMLNodeModifyBlocker
 Safe replacement of MRML node start/end modify. More...
 
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 vtkMRMLCopyContentDefaultMacro(thisClassName)
 
#define vtkMRMLCopyContentMacro(thisClassName)
 
#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), nullptr /* 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 117 of file vtkMRMLNode.h.

◆ vtkMRMLCopyContentDefaultMacro

#define vtkMRMLCopyContentDefaultMacro (   thisClassName)
Value:
bool HasCopyContent() const override \
{ \
return strcmp(#thisClassName, this->GetClassNameInternal()) == 0; \
}

Definition at line 155 of file vtkMRMLNode.h.

◆ vtkMRMLCopyContentMacro

#define vtkMRMLCopyContentMacro (   thisClassName)
Value:
void CopyContent(vtkMRMLNode* node, bool deepCopy=true) override; \
bool HasCopyContent() const override \
{ \
return strcmp(#thisClassName, this->GetClassNameInternal()) == 0; \
}
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167

Definition at line 142 of file vtkMRMLNode.h.

◆ vtkMRMLNodeNewMacro

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

Definition at line 125 of file vtkMRMLNode.h.

◆ vtkObserveMRMLObjectEventsMacro

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

Definition at line 71 of file vtkMRMLNode.h.

◆ vtkObserveMRMLObjectMacro

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

Definition at line 67 of file vtkMRMLNode.h.

◆ vtkSetAndObserveMRMLObjectEventsMacro

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

Definition at line 59 of file vtkMRMLNode.h.

◆ vtkSetAndObserveMRMLObjectEventsMacroNoWarning

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

Definition at line 63 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 51 of file vtkMRMLNode.h.

◆ vtkSetAndObserveMRMLObjectMacroNoWarning

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

Definition at line 55 of file vtkMRMLNode.h.

◆ vtkSetMRMLObjectMacro

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

Definition at line 46 of file vtkMRMLNode.h.

◆ vtkSetReferenceStringBodyMacro

#define vtkSetReferenceStringBodyMacro (   name)
Value:
vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting " << #name " to " << (_arg?_arg:"(null)") ); \
if ( this->name == nullptr && _arg == nullptr) { 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 = nullptr; \
} \
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 79 of file vtkMRMLNode.h.

◆ vtkSetReferenceStringMacro

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

Definition at line 109 of file vtkMRMLNode.h.

◆ vtkUnObserveMRMLObjectMacro

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

Definition at line 75 of file vtkMRMLNode.h.