Slicer 5.7
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends
vtkMRMLNode Class Referenceabstract

Abstract Superclass for all specific types of MRML nodes. More...

#include <Libs/MRML/Core/vtkMRMLNode.h>

Inheritance diagram for vtkMRMLNode:
Inheritance graph
[legend]
Collaboration diagram for vtkMRMLNode:
Collaboration graph
[legend]

Classes

struct  NodeReferenceEventList
 
class  vtkMRMLNodeReference
 Class to hold information about a node reference. More...
 

Public Types

enum  {
  HierarchyModifiedEvent = 16000 , IDChangedEvent = 16001 , ReferenceAddedEvent , ReferenceModifiedEvent ,
  ReferenceRemovedEvent , ReferencedNodeModifiedEvent
}
 
enum  ContentModifiedObserveType { ContentModifiedObserveUndefined = -1 , ContentModifiedObserveDisabled = 0 , ContentModifiedObserveEnabled = 1 }
 
typedef std::map< std::string, std::string > ReferencePropertiesType
 Get the node reference properties for a specific referenceRole.
 
typedef vtkObject Superclass
 

Public Member Functions

vtkMRMLNodeAddAndObserveNodeReferenceID (const char *referenceRole, const char *referencedNodeID, vtkIntArray *events=nullptr, ContentModifiedObserveType observeContentModifiedEvents=ContentModifiedObserveUndefined)
 Add and observe a reference node from this node for a specific referenceRole.
 
vtkMRMLNodeAddNodeReferenceID (const char *referenceRole, const char *referencedNodeID)
 Convenience method that adds a referencedNodeID at the end of the list.
 
void AddNodeReferenceRole (const char *referenceRole, const char *mrmlAttributeName=nullptr, vtkIntArray *events=nullptr, bool observeContentModifiedEvents=false)
 Add a referenceRole.
 
virtual void AddToSceneOff ()
 
virtual void AddToSceneOn ()
 
void ClearNodeReferenceProperties (const std::string &referenceRole)
 Remove all node reference properties for a specific referenceRole.
 
void ClearNthNodeReferenceProperties (const std::string &referenceRole, int n)
 
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.
 
virtual void CopyContent (vtkMRMLNode *node, bool deepCopy=true)
 Copy node contents from another node of the same type. Does not copy node ID, Scene, Name, SingletonTag, HideFromEditors, AddToScene, UndoEnabled, and node references. If deepCopy is set to false then a shallow copy of bulk data (such as image or mesh data) could be made; copying may be faster but the node may share some data with the source node instead of creating an independent copy.
 
virtual void CopyReferences (vtkMRMLNode *node)
 Copy the references of the node into this.
 
void CopyWithScene (vtkMRMLNode *node)
 Copy everything (including Scene and ID) from another node of the same type.
 
virtual vtkMRMLNodeCreateNodeInstance ()=0
 Create instance of the default node. Like New only virtual.
 
void DisableModifiedEventOff ()
 
void DisableModifiedEventOn ()
 
virtual int EndModify (int previousDisableModifiedEventState)
 End modifying the node.
 
virtual int GetAddToScene ()
 node added to MRML scene.
 
const char * GetAttribute (const char *name)
 Get value of a name value pair attribute.
 
std::vector< std::string > GetAttributeNames ()
 Get all attribute names.
 
void GetAttributeNames (vtkStringArray *attributeNames)
 Get all attribute names. Python-wrappable version.
 
virtual const char * GetClassName ()
 
virtual vtkIntArray * GetContentModifiedEvents ()
 
int GetCustomModifiedEventPending (int eventId)
 
virtual char * GetDescription ()
 
virtual int GetDisableModifiedEvent ()
 Turn on/off generating InvokeEvent for set macros.
 
virtual int GetHideFromEditors ()
 Describes if the node is hidden.
 
virtual char * GetID ()
 ID use by other nodes to reference this node in XML.
 
virtual int GetInMRMLCallbackFlag ()
 Flags to avoid event loops.
 
virtual int GetModifiedEventPending ()
 
virtual char * GetName ()
 
vtkMRMLNodeGetNodeReference (const char *referenceRole)
 
const char * GetNodeReferenceID (const char *referenceRole)
 Utility function that returns the first node id for a specific referenceRole.
 
void GetNodeReferenceIDs (const char *referenceRole, std::vector< const char * > &referencedNodeIDs)
 Return a list of the referenced node IDs.
 
const ReferencePropertiesTypeGetNodeReferenceProperties (const char *referenceRole)
 
std::string GetNodeReferenceProperty (const std::string &referenceRole, const std::string &propertyName)
 Get the node reference property for a specific referenceRole.
 
std::string GetNodeReferencePropertyName (const std::string &referenceRole, int propertyIndex)
 Get the name of the Nth node reference property for a specific referenceRole.
 
std::vector< std::string > GetNodeReferencePropertyNames (const std::string &referenceRole)
 Get the names of all node reference properties for a specific referenceRole.
 
void GetNodeReferenceRoles (std::vector< std::string > &roles)
 
void GetNodeReferences (const char *referenceRole, std::vector< vtkMRMLNode * > &nodes)
 Return a list of the referenced nodes.
 
virtual const char * GetNodeTagName ()=0
 
vtkMRMLNodeGetNthNodeReference (const char *referenceRole, int n)
 Get referenced MRML node for a specific referenceRole.
 
const char * GetNthNodeReferenceID (const char *referenceRole, int n)
 Return the string of the Nth node ID for a specific reference role.
 
const ReferencePropertiesTypeGetNthNodeReferenceProperties (const char *referenceRole, int n)
 
std::string GetNthNodeReferenceProperty (const std::string &referenceRole, int n, const std::string &propertyName)
 
std::string GetNthNodeReferencePropertyName (const std::string &referenceRole, int referenceIndex, int propertyIndex)
 
std::vector< std::string > GetNthNodeReferencePropertyNames (const std::string &referenceRole, int n)
 
const char * GetNthNodeReferenceRole (int n)
 
int GetNumberOfNodeReferenceProperties (const std::string &referenceRole)
 Get the number of node reference properties for a specific referenceRole.
 
int GetNumberOfNodeReferenceRoles ()
 
int GetNumberOfNodeReferences (const char *referenceRole)
 Return the number of node IDs for a specific reference role (and nodes as they always have the same size).
 
int GetNumberOfNthNodeReferenceProperties (const std::string &referenceRole, int n)
 
virtual int GetSaveWithScene ()
 Save node with MRML scene.
 
virtual vtkMRMLSceneGetScene ()
 Get the scene this node has been added to.
 
virtual int GetSelectable ()
 Describes if the node is selectable.
 
virtual int GetSelected ()
 Get/Set for Selected.
 
virtual char * GetSingletonTag ()
 
virtual const char * GetTypeDisplayName ()
 
virtual bool GetUndoEnabled ()
 
virtual bool HasCopyContent () const
 Returns true if the class supports deep and shallow copying node content.
 
bool HasNodeReferenceID (const char *referenceRole, const char *referencedNodeID)
 Return true if referencedNodeID is in the node ID list for a specific referenceRole.
 
virtual void HideFromEditorsOff ()
 
virtual void HideFromEditorsOn ()
 
virtual void InvokeCustomModifiedEvent (int eventId, void *callData=nullptr)
 This method allows the node to compress events.
 
virtual int InvokePendingModifiedEvent ()
 Invokes any modified events that are pending.
 
virtual int IsA (const char *type)
 
bool IsSingleton ()
 
void Modified () override
 Customized version of Modified() allowing to compress vtkCommand::ModifiedEvent.
 
virtual void OnNodeAddedToScene ()
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void ProcessChildNode (vtkMRMLNode *)
 Set dependencies between this node and a child node when parsing XML file.
 
virtual void ProcessMRMLEvents (vtkObject *caller, unsigned long event, void *callData)
 Propagate events generated in mrml.
 
virtual void ReadXMLAttributes (const char **atts)
 
void RemoveAttribute (const char *name)
 Remove attribute with the specified name.
 
void RemoveNodeReferenceIDs (const char *referenceRole)
 Remove all node IDs and associated nodes for a specific referenceRole.
 
void RemoveNodeReferenceProperty (const std::string &referenceRole, const std::string &propertyName)
 Remove a node reference property for a specific referenceRole.
 
void RemoveNthNodeReferenceID (const char *referenceRole, int n)
 Convenience method that removes the Nth node ID from the list.
 
void RemoveNthNodeReferenceProperty (const std::string &referenceRole, int n, const std::string &propertyName)
 
virtual void Reset (vtkMRMLNode *defaultNode)
 Reset node attributes to the initial state as defined in the constructor or the passed default node.
 
virtual void SaveWithSceneOff ()
 
virtual void SaveWithSceneOn ()
 
virtual void SelectableOff ()
 
virtual void SelectableOn ()
 
virtual void SelectedOff ()
 
virtual void SelectedOn ()
 
virtual void SetAddToScene (int)
 
void SetAddToSceneNoModify (int value)
 
vtkMRMLNodeSetAndObserveNodeReferenceID (const char *referenceRole, const char *referencedNodeID, vtkIntArray *events=nullptr, ContentModifiedObserveType observeContentModifiedEvents=ContentModifiedObserveUndefined)
 Set and observe a reference node from this node for a specific referenceRole.
 
vtkMRMLNodeSetAndObserveNthNodeReferenceID (const char *referenceRole, int n, const char *referencedNodeID, vtkIntArray *events=nullptr, ContentModifiedObserveType observeContentModifiedEvents=ContentModifiedObserveUndefined)
 Set and observe the Nth node ID for a specific reference role.
 
void SetAttribute (const char *name, const char *value)
 Set a name value pair attribute.
 
virtual void SetDescription (const char *)
 Text description of this node, to be set by the user.
 
void SetDisableModifiedEvent (int onOff)
 
virtual void SetHideFromEditors (int)
 
void SetInMRMLCallbackFlag (int flag)
 
virtual void SetName (const char *)
 Name of this node, to be set by the user.
 
vtkMRMLNodeSetNodeReferenceID (const char *referenceRole, const char *referencedNodeID)
 Set a reference to a node with specified nodeID from this node for a specific referenceRole.
 
void SetNodeReferenceProperty (const std::string &referenceRole, const std::string &propertyName, const std::string &value)
 Set the node reference property for a specific referenceRole.
 
vtkMRMLNodeSetNthNodeReferenceID (const char *referenceRole, int n, const char *referencedNodeID)
 Set a N-th reference from this node with specified referencedNodeID for a specific referenceRole.
 
void SetNthNodeReferenceProperty (const std::string &referenceRole, int n, const std::string &propertyName, const std::string &value)
 
virtual void SetSaveWithScene (int)
 
virtual void SetScene (vtkMRMLScene *scene)
 This method is for internal use only. Use AddNode method of vtkMRMLScene to add a node to the scene.
 
virtual void SetSceneReferences ()
 Update the references of the node to the scene.
 
virtual void SetSelectable (int)
 
virtual void SetSelected (int)
 
void SetSingletonOff ()
 
void SetSingletonOn ()
 
virtual void SetSingletonTag (const char *)
 Tag that make this node a singleton in the scene.
 
virtual void SetUndoEnabled (bool)
 
virtual int StartModify ()
 Start modifying the node. Disable Modify events.
 
virtual void UndoEnabledOff ()
 
virtual void UndoEnabledOn ()
 
virtual void UpdateReferenceID (const char *oldID, const char *newID)
 Update the stored reference to another node in the scene.
 
virtual void UpdateReferences ()
 The method should remove all pointers and observations to all nodes that are not in the scene anymore.
 
virtual void UpdateScene (vtkMRMLScene *)
 
const char * URLDecodeString (const char *inString)
 Decode a URL string.
 
const char * URLEncodeString (const char *inString)
 Encode a URL string.
 
virtual void WriteNodeBodyXML (ostream &of, int indent)
 Write this node's body to a MRML file in XML format.
 
virtual void WriteXML (ostream &of, int indent)
 
std::string XMLAttributeDecodeString (const std::string &inString)
 Decode an XML attribute string.
 
std::string XMLAttributeEncodeString (const std::string &inString)
 Encode an XML attribute string (replaces special characters by code sequences)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkMRMLNodeSafeDownCast (vtkObject *o)
 

Protected Types

typedef std::map< std::string, std::string > AttributesType
 
typedef std::map< std::string, NodeReferenceEventListNodeReferenceEventsType
 
typedef std::vector< vtkSmartPointer< vtkMRMLNodeReference > > NodeReferenceListType
 
typedef std::map< std::string, NodeReferenceListTypeNodeReferencesType
 

Protected Member Functions

virtual const char * GetMRMLAttributeNameFromReferenceRole (const char *refRole)
 Return the mrml attribute name (if found) associated with a reference role. Return 0 otherwise.
 
virtual const char * GetReferenceRoleFromMRMLAttributeName (const char *attName)
 Return the reference role (if found) associated with the attribute name found in a MRML scene file. Return 0 otherwise.
 
virtual char * GetTempURLString ()
 
void GetUpdatedReferencedNodeEventList (int &oldReferencedNodeUseCount, int &newReferencedNodeUseCount, vtkIntArray *oldConsolidatedEventList, vtkIntArray *newConsolidatedEventList, vtkMRMLNode *oldReferencedNode, vtkMRMLNode *newReferencedNode, vtkMRMLNodeReference *referenceToIgnore, vtkIntArray *newEvents, bool newObserveContentModifiedEvents)
 
virtual void InvalidateNodeReferences ()
 
virtual bool IsReferenceRoleGeneric (const char *refRole)
 Return true if the reference role is generic (ends with '/') or false otherwise.
 
std::string NodeReferencePropertyDecodeString (const std::string &inString)
 Decode a node reference property string.
 
std::string NodeReferencePropertyEncodeString (const std::string &inString)
 Encode a node reference property string (replaces special characters by code sequences)
 
virtual void OnNodeReferenceAdded (vtkMRMLNodeReference *reference)
 
virtual void OnNodeReferenceModified (vtkMRMLNodeReference *reference)
 Called when a referenced node pointer is modified.
 
virtual void OnNodeReferenceRemoved (vtkMRMLNodeReference *reference)
 Called when a referenced node pointer is removed (set to nullptr).
 
void operator= (const vtkMRMLNode &)
 
void ParseReferencesAttribute (const char *attValue, std::set< std::string > &references)
 
void RemoveInvalidReferences (const std::set< std::string > &validNodeIDs)
 
virtual void SetTempURLString (const char *)
 Get/Set the string used to manage encoding/decoding of strings/URLs with special characters.
 
vtkMRMLNodeUpdateNodeReferenceEventObserver (vtkMRMLNode *oldReferencedNode, vtkMRMLNode *newReferencedNode, vtkIntArray *newEvents, bool newObserveContentModifiedEvents, vtkMRMLNodeReference *referenceToIgnore)
 
virtual void UpdateNodeReferences (const char *referenceRole=nullptr)
 
virtual void UpdateNthNodeReference (const char *referenceRole, int n)
 
 vtkMRMLNode ()
 
 vtkMRMLNode (const vtkMRMLNode &)
 
 ~vtkMRMLNode () override
 critical to have a virtual destructor!
 

Static Protected Member Functions

static void MRMLCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 

Protected Attributes

int AddToScene {1}
 
AttributesType Attributes
 
vtkIntArray * ContentModifiedEvents
 
char * Description {nullptr}
 
int HideFromEditors {0}
 
char * ID {nullptr}
 
int InMRMLCallbackFlag {0}
 Flag to avoid event loops.
 
vtkCallbackCommand * MRMLCallbackCommand
 Holders for MRML callbacks.
 
vtkObserverManagerMRMLObserverManager
 
char * Name {nullptr}
 
NodeReferenceEventsType NodeReferenceEvents
 
std::map< std::string, std::string > NodeReferenceMRMLAttributeNames
 
NodeReferencesType NodeReferences
 
int SaveWithScene {true}
 
vtkWeakPointer< vtkMRMLSceneScene
 
int Selectable {1}
 
int Selected {0}
 
bool UndoEnabled {false}
 

Friends

class vtkMRMLScene
 
class vtkMRMLSceneViewNode
 

Detailed Description

Abstract Superclass for all specific types of MRML nodes.

This node encapsulates the functionality common to all types of MRML nodes. This includes member variables for ID, Description, and Options, as well as member functions to Copy() and Write().

Definition at line 167 of file vtkMRMLNode.h.

Member Typedef Documentation

◆ AttributesType

typedef std::map< std::string, std::string > vtkMRMLNode::AttributesType
protected

Definition at line 1106 of file vtkMRMLNode.h.

◆ NodeReferenceEventsType

typedef std::map< std::string, NodeReferenceEventList> vtkMRMLNode::NodeReferenceEventsType
protected

Definition at line 1126 of file vtkMRMLNode.h.

◆ NodeReferenceListType

typedef std::vector< vtkSmartPointer<vtkMRMLNodeReference> > vtkMRMLNode::NodeReferenceListType
protected

NodeReferences is a map that stores vector of references for each referenceRole, the referenceRole can be any unique string, for example "display", "transform" etc.

Definition at line 1115 of file vtkMRMLNode.h.

◆ NodeReferencesType

typedef std::map< std::string, NodeReferenceListType > vtkMRMLNode::NodeReferencesType
protected

Definition at line 1116 of file vtkMRMLNode.h.

◆ ReferencePropertiesType

typedef std::map<std::string, std::string> vtkMRMLNode::ReferencePropertiesType

Get the node reference properties for a specific referenceRole.

The properties are stored in a map where the key is the property name and the value is the property value. Each node reference has the ability to store additional information about the reference.

For example vtkMRMLClipNode can store the state of a clipping node reference (Off/Positive/Negative).

See also
SetNodeReferenceProperty, SetNthNodeReferenceProperty
GetNodeReferenceProperty, GetNthNodeReferenceProperty
RemoveNodeReferenceProperty, RemoveNthNodeReferenceProperty
GetNumberOfNodeReferenceProperties, GetNumberOfNthNodeReferenceProperties
GetNodeReferencePropertyName, GetNthNodeReferencePropertyName
GetNodeReferencePropertyNames, GetNthNodeReferencePropertyNames
ClearNodeReferenceProperties, ClearNthNodeReferenceProperties

Definition at line 846 of file vtkMRMLNode.h.

◆ Superclass

typedef vtkObject vtkMRMLNode::Superclass

Definition at line 175 of file vtkMRMLNode.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

HierarchyModifiedEvent is generated when the hierarchy node with which this node is associated changes

Enumerator
HierarchyModifiedEvent 
IDChangedEvent 
ReferenceAddedEvent 
ReferenceModifiedEvent 
ReferenceRemovedEvent 
ReferencedNodeModifiedEvent 

Definition at line 821 of file vtkMRMLNode.h.

◆ ContentModifiedObserveType

These values are used in methods that specify node references.

See also
AddNodeReferenceRole, SetAndObserveNodeReferenceID, AddAndObserveNodeReferenceID, SetAndObserveNthNodeReferenceID
Enumerator
ContentModifiedObserveUndefined 

Observe content modified events if it is enabled in the node reference role.

ContentModifiedObserveDisabled 

Do not observe content modified events (default)

ContentModifiedObserveEnabled 

Observe content modified events.

Definition at line 180 of file vtkMRMLNode.h.

Constructor & Destructor Documentation

◆ vtkMRMLNode() [1/2]

vtkMRMLNode::vtkMRMLNode ( )
protected

◆ ~vtkMRMLNode()

vtkMRMLNode::~vtkMRMLNode ( )
overrideprotected

critical to have a virtual destructor!

◆ vtkMRMLNode() [2/2]

vtkMRMLNode::vtkMRMLNode ( const vtkMRMLNode & )
protected

Member Function Documentation

◆ AddAndObserveNodeReferenceID()

vtkMRMLNode * vtkMRMLNode::AddAndObserveNodeReferenceID ( const char * referenceRole,
const char * referencedNodeID,
vtkIntArray * events = nullptr,
ContentModifiedObserveType observeContentModifiedEvents = ContentModifiedObserveUndefined )

Add and observe a reference node from this node for a specific referenceRole.

Observe Modified event by default, optionally takes array of events.

If observeContentModifiedEvents is set to ContentModifiedObserveEnabled then this node will get notifications when any of the event in the ContentModifiedEvents list of the observed node is invoked. If observeContentModifiedEvents is set to ContentModifiedObserveUndefined then the behavior defined in the node reference role will be used.

◆ AddNodeReferenceID()

vtkMRMLNode * vtkMRMLNode::AddNodeReferenceID ( const char * referenceRole,
const char * referencedNodeID )

Convenience method that adds a referencedNodeID at the end of the list.

◆ AddNodeReferenceRole()

void vtkMRMLNode::AddNodeReferenceRole ( const char * referenceRole,
const char * mrmlAttributeName = nullptr,
vtkIntArray * events = nullptr,
bool observeContentModifiedEvents = false )

Add a referenceRole.

The referenceRole can be any unique string, for example "display", "transform" etc. Optionally a MRML attribute name for storing the reference in the mrml scene file can be specified. For example "displayNodeRef". If omitted the MRML attribute name will be the same as the role. If referenceRole ends with '/', it is considered as a "template" reference role that can be used to generate attribute names dynamically by concatenation: If referenceRole is "unit/" and mrmlAttributeName is "UnitRef", then the generated MRML attribute names for a node reference role of "unit/length" will be "lengthUnitRef". Use this method to add new reference types to a node. This method is typically called in the constructors of each subclass.

The optional events argument specifies what events should be observed by default (e.g., when loading the scene from file). If referenceRole ends with '/' character then events are used for all roles names begins with this role name (for example, events specified for referenceRole='unit/' will be used for referenceRole='unit/length', referenceRole='unit/area', etc).

If observeContentModifiedEvents is enabled then this node will get notifications when any of the event in the ContentModifiedEvents list of the observed node is invoked.

See also
GetReferenceNodeFromMRMLAttributeName()

◆ AddToSceneOff()

virtual void vtkMRMLNode::AddToSceneOff ( )
virtual

◆ AddToSceneOn()

virtual void vtkMRMLNode::AddToSceneOn ( )
virtual

◆ ClearNodeReferenceProperties()

void vtkMRMLNode::ClearNodeReferenceProperties ( const std::string & referenceRole)

Remove all node reference properties for a specific referenceRole.

See also
GetNthNodeReferenceProperties GetNodeReferenceProperties

◆ ClearNthNodeReferenceProperties()

void vtkMRMLNode::ClearNthNodeReferenceProperties ( const std::string & referenceRole,
int n )

◆ Copy()

virtual void vtkMRMLNode::Copy ( vtkMRMLNode * node)
virtual

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.

Note
Subclasses should implement this method. Call this method in the subclass implementation.

Reimplemented in vtkMRMLAbstractLayoutNode, vtkMRMLCameraNode, vtkMRMLColorNode, vtkMRMLColorTableNode, vtkMRMLdGEMRICProceduralColorNode, vtkMRMLDiffusionTensorDisplayPropertiesNode, vtkMRMLDiffusionTensorVolumeDisplayNode, vtkMRMLDiffusionTensorVolumeSliceDisplayNode, vtkMRMLDiffusionWeightedVolumeDisplayNode, vtkMRMLDiffusionWeightedVolumeNode, vtkMRMLDisplayableHierarchyNode, vtkMRMLDisplayableNode, vtkMRMLGlyphableVolumeDisplayNode, vtkMRMLGlyphableVolumeSliceDisplayNode, vtkMRMLHierarchyNode, vtkMRMLInteractionNode, vtkMRMLLayoutNode, vtkMRMLMarkupsStorageNode, vtkMRMLModelHierarchyNode, vtkMRMLNRRDStorageNode, vtkMRMLPETProceduralColorNode, vtkMRMLProceduralColorNode, vtkMRMLROIListNode, vtkMRMLROINode, vtkMRMLSceneViewNode, vtkMRMLSegmentationStorageNode, vtkMRMLSelectionNode, vtkMRMLSequenceNode, vtkMRMLSnapshotClipNode, vtkMRMLStorableNode, vtkMRMLStorageNode, vtkMRMLSubjectHierarchyLegacyNode, vtkMRMLSubjectHierarchyNode, vtkMRMLTableViewNode, vtkMRMLTransformStorageNode, vtkMRMLUnitNode, vtkMRMLVectorVolumeNode, vtkMRMLVolumeArchetypeStorageNode, vtkMRMLVolumeHeaderlessStorageNode, vtkMRMLAnnotationDisplayNode, vtkMRMLAnnotationLineDisplayNode, vtkMRMLAnnotationLinesStorageNode, vtkMRMLAnnotationPointDisplayNode, vtkMRMLAnnotationRulerNode, vtkMRMLAnnotationRulerStorageNode, vtkMRMLAnnotationTextDisplayNode, vtkMRMLMarkupsFiducialStorageNode, vtkMRMLMarkupsJsonStorageNode, vtkMRMLSegmentEditorNode, vtkMRMLSequenceBrowserNode, and vtkMRMLVolumeRenderingDisplayNode.

◆ CopyContent()

virtual void vtkMRMLNode::CopyContent ( vtkMRMLNode * node,
bool deepCopy = true )
virtual

Copy node contents from another node of the same type. Does not copy node ID, Scene, Name, SingletonTag, HideFromEditors, AddToScene, UndoEnabled, and node references. If deepCopy is set to false then a shallow copy of bulk data (such as image or mesh data) could be made; copying may be faster but the node may share some data with the source node instead of creating an independent copy.

Note
If a class implements this then make sure CopyContent and HasCopyContent methods are implemented in all parent classes by adding vtkMRMLCopyContentMacro(ClassName) to the class headers.

◆ CopyReferences()

virtual void vtkMRMLNode::CopyReferences ( vtkMRMLNode * node)
virtual

Copy the references of the node into this.

Existing references will be replaced if found in node, or removed if not in node.

Reimplemented in vtkMRMLClipNode.

◆ CopyWithScene()

void vtkMRMLNode::CopyWithScene ( vtkMRMLNode * node)

Copy everything (including Scene and ID) from another node of the same type.

Note
The node is not added into the scene of node. You must do it manually after calling CopyWithScene(vtkMRMLNode*) using vtkMRMLScene::AddNode(vtkMRMLNode*). Only one vtkCommand::ModifiedEvent is invoked, after the copy is fully completed.
Bug
Calling vtkMRMLScene::AddNode(vtkMRMLNode*) before CopyWithScene(vtkMRMLNode*) is NOT supported, it will unsynchronize the node internal caches. See #4078
See also
vtkMRMLScene::AddNode(vtkMRMLNode*)

◆ CreateNodeInstance()

virtual vtkMRMLNode * vtkMRMLNode::CreateNodeInstance ( )
pure virtual

Create instance of the default node. Like New only virtual.

Note
Subclasses should implement this method

Implemented in vtkMRMLCommandLineModuleNode, vtkMRMLBSplineTransformNode, vtkMRMLCameraNode, vtkMRMLClipModelsNode, vtkMRMLClipNode, vtkMRMLColorNode, vtkMRMLColorTableNode, vtkMRMLColorTableStorageNode, vtkMRMLCrosshairNode, vtkMRMLdGEMRICProceduralColorNode, vtkMRMLDiffusionImageVolumeNode, vtkMRMLDiffusionTensorDisplayPropertiesNode, vtkMRMLDiffusionTensorVolumeDisplayNode, vtkMRMLDiffusionTensorVolumeNode, vtkMRMLDiffusionTensorVolumeSliceDisplayNode, vtkMRMLDiffusionWeightedVolumeDisplayNode, vtkMRMLDiffusionWeightedVolumeNode, vtkMRMLDisplayableHierarchyNode, vtkMRMLFolderDisplayNode, vtkMRMLGlyphableVolumeDisplayNode, vtkMRMLGlyphableVolumeSliceDisplayNode, vtkMRMLGridTransformNode, vtkMRMLHierarchyNode, vtkMRMLHierarchyStorageNode, vtkMRMLInteractionNode, vtkMRMLLabelMapVolumeDisplayNode, vtkMRMLLabelMapVolumeNode, vtkMRMLLayoutNode, vtkMRMLLinearTransformNode, vtkMRMLLinearTransformSequenceStorageNode, vtkMRMLModelDisplayNode, vtkMRMLModelHierarchyNode, vtkMRMLModelNode, vtkMRMLModelStorageNode, vtkMRMLNRRDStorageNode, vtkMRMLPETProceduralColorNode, vtkMRMLPlotChartNode, vtkMRMLPlotSeriesNode, vtkMRMLPlotViewNode, vtkMRMLProceduralColorNode, vtkMRMLProceduralColorStorageNode, vtkMRMLROIListNode, vtkMRMLROINode, vtkMRMLScalarVolumeDisplayNode, vtkMRMLScalarVolumeNode, vtkMRMLSceneViewNode, vtkMRMLSceneViewStorageNode, vtkMRMLScriptedModuleNode, vtkMRMLSegmentationDisplayNode, vtkMRMLSegmentationNode, vtkMRMLSegmentationStorageNode, vtkMRMLSelectionNode, vtkMRMLSequenceNode, vtkMRMLSequenceStorageNode, vtkMRMLSliceCompositeNode, vtkMRMLSliceDisplayNode, vtkMRMLSliceNode, vtkMRMLSnapshotClipNode, vtkMRMLStreamingVolumeNode, vtkMRMLSubjectHierarchyLegacyNode, vtkMRMLSubjectHierarchyNode, vtkMRMLTableNode, vtkMRMLTableSQLiteStorageNode, vtkMRMLTableStorageNode, vtkMRMLTableViewNode, vtkMRMLTensorVolumeNode, vtkMRMLTextNode, vtkMRMLTextStorageNode, vtkMRMLTransformDisplayNode, vtkMRMLTransformNode, vtkMRMLTransformStorageNode, vtkMRMLUnitNode, vtkMRMLVectorVolumeDisplayNode, vtkMRMLVectorVolumeNode, vtkMRMLViewNode, vtkMRMLVolumeArchetypeStorageNode, vtkMRMLVolumeHeaderlessStorageNode, vtkMRMLVolumeSequenceStorageNode, vtkMRMLAnnotationControlPointsNode, vtkMRMLAnnotationControlPointsStorageNode, vtkMRMLAnnotationDisplayNode, vtkMRMLAnnotationFiducialNode, vtkMRMLAnnotationFiducialsStorageNode, vtkMRMLAnnotationHierarchyNode, vtkMRMLAnnotationLineDisplayNode, vtkMRMLAnnotationLinesNode, vtkMRMLAnnotationLinesStorageNode, vtkMRMLAnnotationNode, vtkMRMLAnnotationPointDisplayNode, vtkMRMLAnnotationROINode, vtkMRMLAnnotationRulerNode, vtkMRMLAnnotationRulerStorageNode, vtkMRMLAnnotationSnapshotNode, vtkMRMLAnnotationSnapshotStorageNode, vtkMRMLAnnotationStorageNode, vtkMRMLAnnotationTextDisplayNode, vtkMRMLColorLegendDisplayNode, vtkMRMLCropVolumeParametersNode, vtkMRMLMarkupsAngleNode, vtkMRMLMarkupsClosedCurveNode, vtkMRMLMarkupsCurveNode, vtkMRMLMarkupsDisplayNode, vtkMRMLMarkupsFiducialDisplayNode, vtkMRMLMarkupsFiducialNode, vtkMRMLMarkupsFiducialStorageNode, vtkMRMLMarkupsJsonStorageNode, vtkMRMLMarkupsLineNode, vtkMRMLMarkupsPlaneDisplayNode, vtkMRMLMarkupsPlaneJsonStorageNode, vtkMRMLMarkupsPlaneNode, vtkMRMLMarkupsROIDisplayNode, vtkMRMLMarkupsROIJsonStorageNode, vtkMRMLMarkupsROINode, vtkMRMLSegmentEditorNode, vtkMRMLSequenceBrowserNode, vtkMRMLCPURayCastVolumeRenderingDisplayNode, vtkMRMLGPURayCastVolumeRenderingDisplayNode, vtkMRMLMultiVolumeRenderingDisplayNode, vtkMRMLShaderPropertyNode, vtkMRMLShaderPropertyStorageNode, vtkMRMLVolumePropertyNode, vtkMRMLVolumePropertyStorageNode, vtkMRMLDisplayableNode, vtkMRMLStorableNode, vtkMRMLStorageNode, vtkMRMLTransformableNode, and vtkMRMLVolumeNode.

◆ DisableModifiedEventOff()

void vtkMRMLNode::DisableModifiedEventOff ( )
inline

Definition at line 481 of file vtkMRMLNode.h.

◆ DisableModifiedEventOn()

void vtkMRMLNode::DisableModifiedEventOn ( )
inline

Definition at line 477 of file vtkMRMLNode.h.

◆ EndModify()

virtual int vtkMRMLNode::EndModify ( int previousDisableModifiedEventState)
inlinevirtual

End modifying the node.

Enable Modify events if the previous state of DisableModifiedEvent flag is 0.

Return the number of pending events (even if InvokePendingModifiedEvent() is not called).

Reimplemented in vtkMRMLMarkupsNode.

Definition at line 321 of file vtkMRMLNode.h.

◆ GetAddToScene()

virtual int vtkMRMLNode::GetAddToScene ( )
virtual

node added to MRML scene.

◆ GetAttribute()

const char * vtkMRMLNode::GetAttribute ( const char * name)

Get value of a name value pair attribute.

Return nullptr if the name does not exist.

◆ GetAttributeNames() [1/2]

std::vector< std::string > vtkMRMLNode::GetAttributeNames ( )

Get all attribute names.

◆ GetAttributeNames() [2/2]

void vtkMRMLNode::GetAttributeNames ( vtkStringArray * attributeNames)

Get all attribute names. Python-wrappable version.

◆ GetClassName()

virtual const char * vtkMRMLNode::GetClassName ( )
virtual

Reimplemented in vtkMRMLCommandLineModuleNode, vtkMRMLAbstractLayoutNode, vtkMRMLAbstractViewNode, vtkMRMLBSplineTransformNode, vtkMRMLCameraNode, vtkMRMLClipModelsNode, vtkMRMLClipNode, vtkMRMLColorNode, vtkMRMLColorTableNode, vtkMRMLColorTableStorageNode, vtkMRMLCrosshairNode, vtkMRMLdGEMRICProceduralColorNode, vtkMRMLDiffusionImageVolumeNode, vtkMRMLDiffusionTensorDisplayPropertiesNode, vtkMRMLDiffusionTensorVolumeDisplayNode, vtkMRMLDiffusionTensorVolumeNode, vtkMRMLDiffusionTensorVolumeSliceDisplayNode, vtkMRMLDiffusionWeightedVolumeDisplayNode, vtkMRMLDiffusionWeightedVolumeNode, vtkMRMLDisplayableHierarchyNode, vtkMRMLDisplayableNode, vtkMRMLDisplayNode, vtkMRMLFolderDisplayNode, vtkMRMLGlyphableVolumeDisplayNode, vtkMRMLGlyphableVolumeSliceDisplayNode, vtkMRMLGridTransformNode, vtkMRMLHierarchyNode, vtkMRMLHierarchyStorageNode, vtkMRMLInteractionNode, vtkMRMLLabelMapVolumeDisplayNode, vtkMRMLLabelMapVolumeNode, vtkMRMLLayoutNode, vtkMRMLLinearTransformNode, vtkMRMLLinearTransformSequenceStorageNode, vtkMRMLMarkupsStorageNode, vtkMRMLModelDisplayNode, vtkMRMLModelHierarchyNode, vtkMRMLModelNode, vtkMRMLModelStorageNode, vtkMRMLNRRDStorageNode, vtkMRMLPETProceduralColorNode, vtkMRMLPlotChartNode, vtkMRMLPlotSeriesNode, vtkMRMLPlotViewNode, vtkMRMLProceduralColorNode, vtkMRMLProceduralColorStorageNode, vtkMRMLROIListNode, vtkMRMLROINode, vtkMRMLScalarVolumeDisplayNode, vtkMRMLScalarVolumeNode, vtkMRMLSceneViewNode, vtkMRMLSceneViewStorageNode, vtkMRMLScriptedModuleNode, vtkMRMLSegmentationDisplayNode, vtkMRMLSegmentationNode, vtkMRMLSegmentationStorageNode, vtkMRMLSelectionNode, vtkMRMLSequenceNode, vtkMRMLSequenceStorageNode, vtkMRMLSliceCompositeNode, vtkMRMLSliceDisplayNode, vtkMRMLSliceNode, vtkMRMLSnapshotClipNode, vtkMRMLStorableNode, vtkMRMLStorageNode, vtkMRMLStreamingVolumeNode, vtkMRMLSubjectHierarchyLegacyNode, vtkMRMLSubjectHierarchyNode, vtkMRMLTableNode, vtkMRMLTableSQLiteStorageNode, vtkMRMLTableStorageNode, vtkMRMLTableViewNode, vtkMRMLTensorVolumeNode, vtkMRMLTextNode, vtkMRMLTextStorageNode, vtkMRMLTransformableNode, vtkMRMLTransformDisplayNode, vtkMRMLTransformNode, vtkMRMLTransformStorageNode, vtkMRMLUnitNode, vtkMRMLVectorVolumeDisplayNode, vtkMRMLVectorVolumeNode, vtkMRMLViewNode, vtkMRMLVolumeArchetypeStorageNode, vtkMRMLVolumeDisplayNode, vtkMRMLVolumeHeaderlessStorageNode, vtkMRMLVolumeNode, vtkMRMLVolumeSequenceStorageNode, vtkMRMLAnnotationControlPointsNode, vtkMRMLAnnotationControlPointsStorageNode, vtkMRMLAnnotationDisplayNode, vtkMRMLAnnotationFiducialNode, vtkMRMLAnnotationFiducialsStorageNode, vtkMRMLAnnotationHierarchyNode, vtkMRMLAnnotationLineDisplayNode, vtkMRMLAnnotationLinesNode, vtkMRMLAnnotationLinesStorageNode, vtkMRMLAnnotationNode, vtkMRMLAnnotationPointDisplayNode, vtkMRMLAnnotationROINode, vtkMRMLAnnotationRulerNode, vtkMRMLAnnotationRulerStorageNode, vtkMRMLAnnotationSnapshotNode, vtkMRMLAnnotationSnapshotStorageNode, vtkMRMLAnnotationStorageNode, vtkMRMLAnnotationTextDisplayNode, vtkMRMLColorLegendDisplayNode, vtkMRMLCropVolumeParametersNode, vtkMRMLMarkupsAngleNode, vtkMRMLMarkupsClosedCurveNode, vtkMRMLMarkupsCurveNode, vtkMRMLMarkupsDisplayNode, vtkMRMLMarkupsFiducialDisplayNode, vtkMRMLMarkupsFiducialNode, vtkMRMLMarkupsFiducialStorageNode, vtkMRMLMarkupsJsonStorageNode, vtkMRMLMarkupsLineNode, vtkMRMLMarkupsNode, vtkMRMLMarkupsPlaneDisplayNode, vtkMRMLMarkupsPlaneJsonStorageNode, vtkMRMLMarkupsPlaneNode, vtkMRMLMarkupsROIDisplayNode, vtkMRMLMarkupsROIJsonStorageNode, vtkMRMLMarkupsROINode, vtkMRMLSegmentEditorNode, vtkMRMLSequenceBrowserNode, vtkMRMLCPURayCastVolumeRenderingDisplayNode, vtkMRMLGPURayCastVolumeRenderingDisplayNode, vtkMRMLMultiVolumeRenderingDisplayNode, vtkMRMLShaderPropertyNode, vtkMRMLShaderPropertyStorageNode, vtkMRMLVolumePropertyNode, vtkMRMLVolumePropertyStorageNode, and vtkMRMLVolumeRenderingDisplayNode.

◆ GetContentModifiedEvents()

virtual vtkIntArray * vtkMRMLNode::GetContentModifiedEvents ( )
virtual

Return list of events that indicate that content of the node is modified. For example, it is not enough to observe vtkCommand::ModifiedEvent to get notified when a transform stored in a transform node is modified, but vtkMRMLTransformableNode::TransformModifiedEvent must be observed as well.

◆ GetCustomModifiedEventPending()

int vtkMRMLNode::GetCustomModifiedEventPending ( int eventId)
inline

Returns the number of times a custom modified event is requested but not yet invoked on the node. A modified even is pending (not yet invoked) if it was requested after a StartModify() call and EndModify() is not called yet.

See also
GetModifiedEventPending()

Definition at line 498 of file vtkMRMLNode.h.

◆ GetDescription()

virtual char * vtkMRMLNode::GetDescription ( )
virtual

◆ GetDisableModifiedEvent()

virtual int vtkMRMLNode::GetDisableModifiedEvent ( )
virtual

Turn on/off generating InvokeEvent for set macros.

◆ GetHideFromEditors()

virtual int vtkMRMLNode::GetHideFromEditors ( )
virtual

Describes if the node is hidden.

◆ GetID()

virtual char * vtkMRMLNode::GetID ( )
virtual

ID use by other nodes to reference this node in XML.

◆ GetInMRMLCallbackFlag()

virtual int vtkMRMLNode::GetInMRMLCallbackFlag ( )
virtual

Flags to avoid event loops.

Warning
Do NOT use the SetMacro or it call modified on itself and generate even more events!

◆ GetModifiedEventPending()

virtual int vtkMRMLNode::GetModifiedEventPending ( )
virtual

Number of pending modified events.

See also
InvokePendingModifiedEvent()
Modified()
GetDisableModifiedEvent()

◆ GetMRMLAttributeNameFromReferenceRole()

virtual const char * vtkMRMLNode::GetMRMLAttributeNameFromReferenceRole ( const char * refRole)
protectedvirtual

Return the mrml attribute name (if found) associated with a reference role. Return 0 otherwise.

Note
AddNodeReference() must be called prior.
See also
GetReferenceRoleFromMRMLAttributeName(), AddNodeReference(), ReadXMLAttributes(), WriteXML()

◆ GetName()

virtual char * vtkMRMLNode::GetName ( )
virtual

◆ GetNodeReference()

vtkMRMLNode * vtkMRMLNode::GetNodeReference ( const char * referenceRole)

Utility function that returns the first referenced node.

See also
GetNthNodeReference(int), GetNodeReferenceID()

◆ GetNodeReferenceID()

const char * vtkMRMLNode::GetNodeReferenceID ( const char * referenceRole)

Utility function that returns the first node id for a specific referenceRole.

See also
GetNthNodeReferenceID(int), GetNodeReference()

◆ GetNodeReferenceIDs()

void vtkMRMLNode::GetNodeReferenceIDs ( const char * referenceRole,
std::vector< const char * > & referencedNodeIDs )

Return a list of the referenced node IDs.

Some IDs may be null and nodes for valid IDs may not yet be in the scene.

See also
GetNodeReferences(), GetNodeReferenceID()

◆ GetNodeReferenceProperties()

const ReferencePropertiesType * vtkMRMLNode::GetNodeReferenceProperties ( const char * referenceRole)

◆ GetNodeReferenceProperty()

std::string vtkMRMLNode::GetNodeReferenceProperty ( const std::string & referenceRole,
const std::string & propertyName )

Get the node reference property for a specific referenceRole.

See also
GetNthNodeReferenceProperties GetNodeReferenceProperties

◆ GetNodeReferencePropertyName()

std::string vtkMRMLNode::GetNodeReferencePropertyName ( const std::string & referenceRole,
int propertyIndex )

Get the name of the Nth node reference property for a specific referenceRole.

See also
GetNthNodeReferenceProperties GetNodeReferenceProperties

◆ GetNodeReferencePropertyNames()

std::vector< std::string > vtkMRMLNode::GetNodeReferencePropertyNames ( const std::string & referenceRole)

Get the names of all node reference properties for a specific referenceRole.

See also
GetNthNodeReferenceProperties GetNodeReferenceProperties

◆ GetNodeReferenceRoles()

void vtkMRMLNode::GetNodeReferenceRoles ( std::vector< std::string > & roles)

Get reference roles of the present node references.

See also
GetNodeReferenceRoles(), GetNodeReferenceRoles(), GetNthNodeReferenceRole()

◆ GetNodeReferences()

void vtkMRMLNode::GetNodeReferences ( const char * referenceRole,
std::vector< vtkMRMLNode * > & nodes )

Return a list of the referenced nodes.

Warning
Some nodes can be 0 when the scene is in a temporary state.
Note
The list of nodes is browsed (slow) to make sure the pointers are up-to-date.
See also
GetNthNodeReference

◆ GetNodeTagName()

virtual const char * vtkMRMLNode::GetNodeTagName ( )
pure virtual

Get node XML tag name (like Volume, Model).

Note
Subclasses should implement this method.

Implemented in vtkMRMLCommandLineModuleNode, vtkMRMLBSplineTransformNode, vtkMRMLCameraNode, vtkMRMLClipModelsNode, vtkMRMLClipNode, vtkMRMLColorNode, vtkMRMLColorTableNode, vtkMRMLColorTableStorageNode, vtkMRMLCrosshairNode, vtkMRMLdGEMRICProceduralColorNode, vtkMRMLDiffusionImageVolumeNode, vtkMRMLDiffusionTensorDisplayPropertiesNode, vtkMRMLDiffusionTensorVolumeDisplayNode, vtkMRMLDiffusionTensorVolumeNode, vtkMRMLDiffusionTensorVolumeSliceDisplayNode, vtkMRMLDiffusionWeightedVolumeDisplayNode, vtkMRMLDiffusionWeightedVolumeNode, vtkMRMLDisplayableHierarchyNode, vtkMRMLFolderDisplayNode, vtkMRMLGlyphableVolumeDisplayNode, vtkMRMLGlyphableVolumeSliceDisplayNode, vtkMRMLGridTransformNode, vtkMRMLHierarchyNode, vtkMRMLHierarchyStorageNode, vtkMRMLInteractionNode, vtkMRMLLabelMapVolumeDisplayNode, vtkMRMLLabelMapVolumeNode, vtkMRMLLayoutNode, vtkMRMLLinearTransformNode, vtkMRMLLinearTransformSequenceStorageNode, vtkMRMLModelDisplayNode, vtkMRMLModelHierarchyNode, vtkMRMLModelNode, vtkMRMLModelStorageNode, vtkMRMLNRRDStorageNode, vtkMRMLPETProceduralColorNode, vtkMRMLPlotChartNode, vtkMRMLPlotSeriesNode, vtkMRMLPlotViewNode, vtkMRMLProceduralColorNode, vtkMRMLProceduralColorStorageNode, vtkMRMLROIListNode, vtkMRMLROINode, vtkMRMLScalarVolumeDisplayNode, vtkMRMLScalarVolumeNode, vtkMRMLSceneViewNode, vtkMRMLSceneViewStorageNode, vtkMRMLScriptedModuleNode, vtkMRMLSegmentationDisplayNode, vtkMRMLSegmentationNode, vtkMRMLSegmentationStorageNode, vtkMRMLSelectionNode, vtkMRMLSequenceNode, vtkMRMLSequenceStorageNode, vtkMRMLSliceCompositeNode, vtkMRMLSliceDisplayNode, vtkMRMLSliceNode, vtkMRMLSnapshotClipNode, vtkMRMLStreamingVolumeNode, vtkMRMLSubjectHierarchyLegacyNode, vtkMRMLSubjectHierarchyNode, vtkMRMLTableNode, vtkMRMLTableSQLiteStorageNode, vtkMRMLTableStorageNode, vtkMRMLTableViewNode, vtkMRMLTensorVolumeNode, vtkMRMLTextNode, vtkMRMLTextStorageNode, vtkMRMLTransformDisplayNode, vtkMRMLTransformNode, vtkMRMLTransformStorageNode, vtkMRMLUnitNode, vtkMRMLVectorVolumeDisplayNode, vtkMRMLVectorVolumeNode, vtkMRMLViewNode, vtkMRMLVolumeArchetypeStorageNode, vtkMRMLVolumeHeaderlessStorageNode, vtkMRMLVolumeSequenceStorageNode, vtkMRMLAnnotationControlPointsNode, vtkMRMLAnnotationControlPointsStorageNode, vtkMRMLAnnotationDisplayNode, vtkMRMLAnnotationFiducialNode, vtkMRMLAnnotationFiducialsStorageNode, vtkMRMLAnnotationHierarchyNode, vtkMRMLAnnotationLineDisplayNode, vtkMRMLAnnotationLinesNode, vtkMRMLAnnotationLinesStorageNode, vtkMRMLAnnotationNode, vtkMRMLAnnotationPointDisplayNode, vtkMRMLAnnotationROINode, vtkMRMLAnnotationRulerNode, vtkMRMLAnnotationRulerStorageNode, vtkMRMLAnnotationSnapshotNode, vtkMRMLAnnotationSnapshotStorageNode, vtkMRMLAnnotationStorageNode, vtkMRMLAnnotationTextDisplayNode, vtkMRMLColorLegendDisplayNode, vtkMRMLCropVolumeParametersNode, vtkMRMLMarkupsAngleNode, vtkMRMLMarkupsClosedCurveNode, vtkMRMLMarkupsCurveNode, vtkMRMLMarkupsDisplayNode, vtkMRMLMarkupsFiducialDisplayNode, vtkMRMLMarkupsFiducialNode, vtkMRMLMarkupsFiducialStorageNode, vtkMRMLMarkupsJsonStorageNode, vtkMRMLMarkupsLineNode, vtkMRMLMarkupsPlaneDisplayNode, vtkMRMLMarkupsPlaneJsonStorageNode, vtkMRMLMarkupsPlaneNode, vtkMRMLMarkupsROIDisplayNode, vtkMRMLMarkupsROIJsonStorageNode, vtkMRMLMarkupsROINode, vtkMRMLSegmentEditorNode, vtkMRMLSequenceBrowserNode, vtkMRMLCPURayCastVolumeRenderingDisplayNode, vtkMRMLGPURayCastVolumeRenderingDisplayNode, vtkMRMLMultiVolumeRenderingDisplayNode, vtkMRMLShaderPropertyNode, vtkMRMLShaderPropertyStorageNode, vtkMRMLVolumePropertyNode, vtkMRMLVolumePropertyStorageNode, vtkMRMLDisplayableNode, vtkMRMLStorableNode, vtkMRMLStorageNode, vtkMRMLTransformableNode, vtkMRMLVolumeDisplayNode, and vtkMRMLVolumeNode.

◆ GetNthNodeReference()

vtkMRMLNode * vtkMRMLNode::GetNthNodeReference ( const char * referenceRole,
int n )

Get referenced MRML node for a specific referenceRole.

Can be 0 in temporary states; e.g. if the referenced node has no scene, or if the referenced is not yet into the scene. If not cached, it internally scans (slow) the scene to search for the associated referenced node ID. If the referencing node is no longer in the scene (GetScene() == 0), it happens after the node is removed from the scene (scene->RemoveNode(dn), the returned referenced node is 0.

◆ GetNthNodeReferenceID()

const char * vtkMRMLNode::GetNthNodeReferenceID ( const char * referenceRole,
int n )

Return the string of the Nth node ID for a specific reference role.

Return 0 if no such node exist.

Warning
A temporary char generated from a std::string::c_str() is returned.

◆ GetNthNodeReferenceProperties()

const ReferencePropertiesType * vtkMRMLNode::GetNthNodeReferenceProperties ( const char * referenceRole,
int n )

◆ GetNthNodeReferenceProperty()

std::string vtkMRMLNode::GetNthNodeReferenceProperty ( const std::string & referenceRole,
int n,
const std::string & propertyName )

◆ GetNthNodeReferencePropertyName()

std::string vtkMRMLNode::GetNthNodeReferencePropertyName ( const std::string & referenceRole,
int referenceIndex,
int propertyIndex )

◆ GetNthNodeReferencePropertyNames()

std::vector< std::string > vtkMRMLNode::GetNthNodeReferencePropertyNames ( const std::string & referenceRole,
int n )

◆ GetNthNodeReferenceRole()

const char * vtkMRMLNode::GetNthNodeReferenceRole ( int n)

Get a specific node reference role name.

See also
GetNodeReferenceRoles(), GetNodeReferenceRoles(), GetNthNodeReferenceRole()

◆ GetNumberOfNodeReferenceProperties()

int vtkMRMLNode::GetNumberOfNodeReferenceProperties ( const std::string & referenceRole)

Get the number of node reference properties for a specific referenceRole.

See also
GetNthNodeReferenceProperties GetNodeReferenceProperties

◆ GetNumberOfNodeReferenceRoles()

int vtkMRMLNode::GetNumberOfNodeReferenceRoles ( )

Get number of node reference role names.

See also
GetNodeReferenceRoles(), GetNodeReferenceRoles(), GetNthNodeReferenceRole()

◆ GetNumberOfNodeReferences()

int vtkMRMLNode::GetNumberOfNodeReferences ( const char * referenceRole)

Return the number of node IDs for a specific reference role (and nodes as they always have the same size).

◆ GetNumberOfNthNodeReferenceProperties()

int vtkMRMLNode::GetNumberOfNthNodeReferenceProperties ( const std::string & referenceRole,
int n )

◆ GetReferenceRoleFromMRMLAttributeName()

virtual const char * vtkMRMLNode::GetReferenceRoleFromMRMLAttributeName ( const char * attName)
protectedvirtual

Return the reference role (if found) associated with the attribute name found in a MRML scene file. Return 0 otherwise.

Note
AddNodeReference() must be called prior.
See also
GetMRMLAttributeNameFromReferenceRole(), AddNodeReference(), ReadXMLAttributes(), WriteXML()

◆ GetSaveWithScene()

virtual int vtkMRMLNode::GetSaveWithScene ( )
virtual

Save node with MRML scene.

◆ GetScene()

virtual vtkMRMLScene * vtkMRMLNode::GetScene ( )
virtual

Get the scene this node has been added to.

◆ GetSelectable()

virtual int vtkMRMLNode::GetSelectable ( )
virtual

Describes if the node is selectable.

◆ GetSelected()

virtual int vtkMRMLNode::GetSelected ( )
virtual

Get/Set for Selected.

◆ GetSingletonTag()

virtual char * vtkMRMLNode::GetSingletonTag ( )
virtual

◆ GetTempURLString()

virtual char * vtkMRMLNode::GetTempURLString ( )
protectedvirtual

◆ GetTypeDisplayName()

virtual const char * vtkMRMLNode::GetTypeDisplayName ( )
inlinevirtual

Get node type display name (like "Closed Curve", "Markup", etc).

Note
Subclasses should override this method to provide a more appropriate and translatable name.

Reimplemented in vtkMRMLMarkupsNode.

Definition at line 340 of file vtkMRMLNode.h.

◆ GetUndoEnabled()

virtual bool vtkMRMLNode::GetUndoEnabled ( )
virtual

Specifies if the state of this node is stored in the scene's undo buffer. False by default to make sure that undo can be enabled selectively, only for nodes that are prepared to work correctly when saved/restored. Nodes with different UndoEnabled value must not reference to each other, because restoring states could lead to unresolved node references. Therefore, when undo is enabled for a certain node, it must be enabled for nodes that it references (for example, if undo is enabled for vtkMRMLModelNode then it must be enabled for vtkMRMLModelDisplayNode and vtkMRMLModelStorageNode as well).

◆ GetUpdatedReferencedNodeEventList()

void vtkMRMLNode::GetUpdatedReferencedNodeEventList ( int & oldReferencedNodeUseCount,
int & newReferencedNodeUseCount,
vtkIntArray * oldConsolidatedEventList,
vtkIntArray * newConsolidatedEventList,
vtkMRMLNode * oldReferencedNode,
vtkMRMLNode * newReferencedNode,
vtkMRMLNodeReference * referenceToIgnore,
vtkIntArray * newEvents,
bool newObserveContentModifiedEvents )
protected

Helper function for SetAndObserveNthNodeReferenceID (through UpdateNodeReferenceEventObserver). Counts how many times the old and new node is used and what events are observed. referenceToIgnore specifies a reference (the reference that is currently being processed) that is ignored. oldReferencedNodeUseCount and oldConsolidatedEventList are only computed if oldReferencedNode!=newReferencedNode.

◆ HasCopyContent()

virtual bool vtkMRMLNode::HasCopyContent ( ) const
virtual

Returns true if the class supports deep and shallow copying node content.

◆ HasNodeReferenceID()

bool vtkMRMLNode::HasNodeReferenceID ( const char * referenceRole,
const char * referencedNodeID )

Return true if referencedNodeID is in the node ID list for a specific referenceRole.

If nullptr is specified as role then all roles are checked.

◆ HideFromEditorsOff()

virtual void vtkMRMLNode::HideFromEditorsOff ( )
virtual

◆ HideFromEditorsOn()

virtual void vtkMRMLNode::HideFromEditorsOn ( )
virtual

◆ InvalidateNodeReferences()

virtual void vtkMRMLNode::InvalidateNodeReferences ( )
protectedvirtual

Remove all references and event observers to referenced nodes but leave ID's and events. References and event observers can be re-added by calling UpdateNodeReferences().

◆ InvokeCustomModifiedEvent()

virtual void vtkMRMLNode::InvokeCustomModifiedEvent ( int eventId,
void * callData = nullptr )
inlinevirtual

This method allows the node to compress events.

Instead of invoking a certain event several times, the event is called only once, for all the invocations that are made between StartModify() and EndModify().

Typical usage is to group several ...Added, ...Removed, ...Modified events into one, to improve performance.

callData is passed to InvokeEvent() if the event is invoked immediately.

If the event is not invoked immediately then it will be sent with callData=nullptr.

Definition at line 586 of file vtkMRMLNode.h.

◆ InvokePendingModifiedEvent()

virtual int vtkMRMLNode::InvokePendingModifiedEvent ( )
inlinevirtual

Invokes any modified events that are pending.

Pending modified events were generated while the DisableModifiedEvent flag was nonzero.

Returns the total number of pending modified events that have been replaced by the just invoked modified event(s).

Reimplemented in vtkMRMLAnnotationControlPointsNode.

Definition at line 543 of file vtkMRMLNode.h.

◆ IsA()

virtual int vtkMRMLNode::IsA ( const char * type)
virtual

Reimplemented in vtkMRMLCommandLineModuleNode, vtkMRMLAbstractLayoutNode, vtkMRMLAbstractViewNode, vtkMRMLBSplineTransformNode, vtkMRMLCameraNode, vtkMRMLClipModelsNode, vtkMRMLClipNode, vtkMRMLColorNode, vtkMRMLColorTableNode, vtkMRMLColorTableStorageNode, vtkMRMLCrosshairNode, vtkMRMLdGEMRICProceduralColorNode, vtkMRMLDiffusionImageVolumeNode, vtkMRMLDiffusionTensorDisplayPropertiesNode, vtkMRMLDiffusionTensorVolumeDisplayNode, vtkMRMLDiffusionTensorVolumeNode, vtkMRMLDiffusionTensorVolumeSliceDisplayNode, vtkMRMLDiffusionWeightedVolumeDisplayNode, vtkMRMLDiffusionWeightedVolumeNode, vtkMRMLDisplayableHierarchyNode, vtkMRMLDisplayableNode, vtkMRMLDisplayNode, vtkMRMLFolderDisplayNode, vtkMRMLGlyphableVolumeDisplayNode, vtkMRMLGlyphableVolumeSliceDisplayNode, vtkMRMLGridTransformNode, vtkMRMLHierarchyNode, vtkMRMLHierarchyStorageNode, vtkMRMLInteractionNode, vtkMRMLLabelMapVolumeDisplayNode, vtkMRMLLabelMapVolumeNode, vtkMRMLLayoutNode, vtkMRMLLinearTransformNode, vtkMRMLLinearTransformSequenceStorageNode, vtkMRMLMarkupsStorageNode, vtkMRMLModelDisplayNode, vtkMRMLModelHierarchyNode, vtkMRMLModelNode, vtkMRMLModelStorageNode, vtkMRMLNRRDStorageNode, vtkMRMLPETProceduralColorNode, vtkMRMLPlotChartNode, vtkMRMLPlotSeriesNode, vtkMRMLPlotViewNode, vtkMRMLProceduralColorNode, vtkMRMLProceduralColorStorageNode, vtkMRMLROIListNode, vtkMRMLROINode, vtkMRMLScalarVolumeDisplayNode, vtkMRMLScalarVolumeNode, vtkMRMLSceneViewNode, vtkMRMLSceneViewStorageNode, vtkMRMLScriptedModuleNode, vtkMRMLSegmentationDisplayNode, vtkMRMLSegmentationNode, vtkMRMLSegmentationStorageNode, vtkMRMLSelectionNode, vtkMRMLSequenceNode, vtkMRMLSequenceStorageNode, vtkMRMLSliceCompositeNode, vtkMRMLSliceDisplayNode, vtkMRMLSliceNode, vtkMRMLSnapshotClipNode, vtkMRMLStorableNode, vtkMRMLStorageNode, vtkMRMLStreamingVolumeNode, vtkMRMLSubjectHierarchyLegacyNode, vtkMRMLSubjectHierarchyNode, vtkMRMLTableNode, vtkMRMLTableSQLiteStorageNode, vtkMRMLTableStorageNode, vtkMRMLTableViewNode, vtkMRMLTensorVolumeNode, vtkMRMLTextNode, vtkMRMLTextStorageNode, vtkMRMLTransformableNode, vtkMRMLTransformDisplayNode, vtkMRMLTransformNode, vtkMRMLTransformStorageNode, vtkMRMLUnitNode, vtkMRMLVectorVolumeDisplayNode, vtkMRMLVectorVolumeNode, vtkMRMLViewNode, vtkMRMLVolumeArchetypeStorageNode, vtkMRMLVolumeDisplayNode, vtkMRMLVolumeHeaderlessStorageNode, vtkMRMLVolumeNode, vtkMRMLVolumeSequenceStorageNode, vtkMRMLAnnotationControlPointsNode, vtkMRMLAnnotationControlPointsStorageNode, vtkMRMLAnnotationDisplayNode, vtkMRMLAnnotationFiducialNode, vtkMRMLAnnotationFiducialsStorageNode, vtkMRMLAnnotationHierarchyNode, vtkMRMLAnnotationLineDisplayNode, vtkMRMLAnnotationLinesNode, vtkMRMLAnnotationLinesStorageNode, vtkMRMLAnnotationNode, vtkMRMLAnnotationPointDisplayNode, vtkMRMLAnnotationROINode, vtkMRMLAnnotationRulerNode, vtkMRMLAnnotationRulerStorageNode, vtkMRMLAnnotationSnapshotNode, vtkMRMLAnnotationSnapshotStorageNode, vtkMRMLAnnotationStorageNode, vtkMRMLAnnotationTextDisplayNode, vtkMRMLColorLegendDisplayNode, vtkMRMLCropVolumeParametersNode, vtkMRMLMarkupsAngleNode, vtkMRMLMarkupsClosedCurveNode, vtkMRMLMarkupsCurveNode, vtkMRMLMarkupsDisplayNode, vtkMRMLMarkupsFiducialDisplayNode, vtkMRMLMarkupsFiducialNode, vtkMRMLMarkupsFiducialStorageNode, vtkMRMLMarkupsJsonStorageNode, vtkMRMLMarkupsLineNode, vtkMRMLMarkupsNode, vtkMRMLMarkupsPlaneDisplayNode, vtkMRMLMarkupsPlaneJsonStorageNode, vtkMRMLMarkupsPlaneNode, vtkMRMLMarkupsROIDisplayNode, vtkMRMLMarkupsROIJsonStorageNode, vtkMRMLMarkupsROINode, vtkMRMLSegmentEditorNode, vtkMRMLSequenceBrowserNode, vtkMRMLCPURayCastVolumeRenderingDisplayNode, vtkMRMLGPURayCastVolumeRenderingDisplayNode, vtkMRMLMultiVolumeRenderingDisplayNode, vtkMRMLShaderPropertyNode, vtkMRMLShaderPropertyStorageNode, vtkMRMLVolumePropertyNode, vtkMRMLVolumePropertyStorageNode, and vtkMRMLVolumeRenderingDisplayNode.

◆ IsReferenceRoleGeneric()

virtual bool vtkMRMLNode::IsReferenceRoleGeneric ( const char * refRole)
protectedvirtual

Return true if the reference role is generic (ends with '/') or false otherwise.

See also
AddNodeReference()

◆ IsSingleton()

bool vtkMRMLNode::IsSingleton ( )
inline

Definition at line 455 of file vtkMRMLNode.h.

◆ IsTypeOf()

static int vtkMRMLNode::IsTypeOf ( const char * type)
static

◆ Modified()

void vtkMRMLNode::Modified ( )
inlineoverride

Customized version of Modified() allowing to compress vtkCommand::ModifiedEvent.

It overrides the vtkObject method so that all changes to the node which would normally generate a vtkCommand::ModifiedEvent can be grouped into an atomic operation.

Typical usage would be to disable modified events, call a series of Set* operations, and then re-enable modified events and call InvokePendingModifiedEvent() to invoke the event (if any of the Set* calls actually changed the values of the instance variables).

See also
GetDisableModifiedEvent()

Definition at line 524 of file vtkMRMLNode.h.

◆ MRMLCallback()

static void vtkMRMLNode::MRMLCallback ( vtkObject * caller,
unsigned long eid,
void * clientData,
void * callData )
staticprotected

a shared set of functions that call the virtual ProcessMRMLEvents

◆ NodeReferencePropertyDecodeString()

std::string vtkMRMLNode::NodeReferencePropertyDecodeString ( const std::string & inString)
protected

Decode a node reference property string.

◆ NodeReferencePropertyEncodeString()

std::string vtkMRMLNode::NodeReferencePropertyEncodeString ( const std::string & inString)
protected

Encode a node reference property string (replaces special characters by code sequences)

◆ OnNodeAddedToScene()

virtual void vtkMRMLNode::OnNodeAddedToScene ( )
inlinevirtual

Updates this node if it depends on other nodes when the scene is read in This method is called by scene when a node added to a scene.

Definition at line 222 of file vtkMRMLNode.h.

◆ OnNodeReferenceAdded()

virtual void vtkMRMLNode::OnNodeReferenceAdded ( vtkMRMLNodeReference * reference)
inlineprotectedvirtual

Called when a valid node reference is added. The event is not invoked when the referenced node ID is specified, but only when a valid node pointer is obtained.

Reimplemented in vtkMRMLSequenceBrowserNode, vtkMRMLClipNode, vtkMRMLDisplayableNode, vtkMRMLModelNode, vtkMRMLPlotChartNode, vtkMRMLPlotSeriesNode, vtkMRMLPlotViewNode, vtkMRMLSegmentationNode, vtkMRMLTransformableNode, vtkMRMLVolumeNode, and vtkMRMLMarkupsCurveNode.

Definition at line 1056 of file vtkMRMLNode.h.

◆ OnNodeReferenceModified()

virtual void vtkMRMLNode::OnNodeReferenceModified ( vtkMRMLNodeReference * reference)
inlineprotectedvirtual

◆ OnNodeReferenceRemoved()

virtual void vtkMRMLNode::OnNodeReferenceRemoved ( vtkMRMLNodeReference * reference)
inlineprotectedvirtual

◆ operator=()

void vtkMRMLNode::operator= ( const vtkMRMLNode & )
protected

◆ ParseReferencesAttribute()

void vtkMRMLNode::ParseReferencesAttribute ( const char * attValue,
std::set< std::string > & references )
protected

Parse references in the form "role1:id1 id2;role2:id3;" map contains existing role-id pairs, so we don't repeat them

◆ PrintSelf()

void vtkMRMLNode::PrintSelf ( ostream & os,
vtkIndent indent )
override

◆ ProcessChildNode()

virtual void vtkMRMLNode::ProcessChildNode ( vtkMRMLNode * )
inlinevirtual

Set dependencies between this node and a child node when parsing XML file.

Reimplemented in vtkMRMLSceneViewNode.

Definition at line 210 of file vtkMRMLNode.h.

◆ ProcessMRMLEvents()

virtual void vtkMRMLNode::ProcessMRMLEvents ( vtkObject * caller,
unsigned long event,
void * callData )
virtual

Propagate events generated in mrml.

Reimplemented in vtkMRMLCameraNode, vtkMRMLDiffusionImageVolumeNode, vtkMRMLDiffusionTensorVolumeDisplayNode, vtkMRMLDiffusionTensorVolumeSliceDisplayNode, vtkMRMLDisplayableHierarchyNode, vtkMRMLDisplayableNode, vtkMRMLGlyphableVolumeDisplayNode, vtkMRMLGlyphableVolumeSliceDisplayNode, vtkMRMLLabelMapVolumeDisplayNode, vtkMRMLModelHierarchyNode, vtkMRMLModelNode, vtkMRMLScalarVolumeDisplayNode, vtkMRMLStorableNode, vtkMRMLTransformableNode, vtkMRMLTransformDisplayNode, vtkMRMLTransformNode, vtkMRMLVectorVolumeDisplayNode, vtkMRMLVolumeDisplayNode, vtkMRMLVolumeNode, vtkMRMLAnnotationControlPointsNode, vtkMRMLAnnotationDisplayNode, vtkMRMLAnnotationLineDisplayNode, vtkMRMLAnnotationLinesNode, vtkMRMLAnnotationNode, vtkMRMLAnnotationPointDisplayNode, vtkMRMLAnnotationROINode, vtkMRMLAnnotationRulerNode, vtkMRMLAnnotationTextDisplayNode, vtkMRMLMarkupsDisplayNode, vtkMRMLMarkupsNode, vtkMRMLCommandLineModuleNode, vtkMRMLClipNode, vtkMRMLColorNode, vtkMRMLColorTableNode, vtkMRMLdGEMRICProceduralColorNode, vtkMRMLDisplayNode, vtkMRMLFolderDisplayNode, vtkMRMLModelDisplayNode, vtkMRMLPETProceduralColorNode, vtkMRMLPlotChartNode, vtkMRMLPlotSeriesNode, vtkMRMLPlotViewNode, vtkMRMLProceduralColorNode, vtkMRMLROIListNode, vtkMRMLROINode, vtkMRMLSelectionNode, vtkMRMLStorageNode, vtkMRMLStreamingVolumeNode, vtkMRMLTableNode, vtkMRMLMarkupsCurveNode, vtkMRMLMarkupsPlaneNode, vtkMRMLMarkupsROINode, vtkMRMLSequenceBrowserNode, vtkMRMLShaderPropertyNode, vtkMRMLVolumePropertyNode, vtkMRMLVolumeRenderingDisplayNode, and vtkMRMLColorLegendDisplayNode.

◆ ReadXMLAttributes()

virtual void vtkMRMLNode::ReadXMLAttributes ( const char ** atts)
virtual

Set node attributes

Note
Subclasses should implement this method. Call this method in the subclass implementation.

Reimplemented in vtkMRMLCommandLineModuleNode, vtkMRMLAbstractLayoutNode, vtkMRMLAbstractViewNode, vtkMRMLBSplineTransformNode, vtkMRMLCameraNode, vtkMRMLClipModelsNode, vtkMRMLClipNode, vtkMRMLColorNode, vtkMRMLColorTableNode, vtkMRMLCrosshairNode, vtkMRMLdGEMRICProceduralColorNode, vtkMRMLDiffusionImageVolumeNode, vtkMRMLDiffusionTensorDisplayPropertiesNode, vtkMRMLDiffusionTensorVolumeDisplayNode, vtkMRMLDiffusionTensorVolumeSliceDisplayNode, vtkMRMLDiffusionWeightedVolumeDisplayNode, vtkMRMLDiffusionWeightedVolumeNode, vtkMRMLDisplayableHierarchyNode, vtkMRMLDisplayableNode, vtkMRMLDisplayNode, vtkMRMLFolderDisplayNode, vtkMRMLGlyphableVolumeDisplayNode, vtkMRMLGlyphableVolumeSliceDisplayNode, vtkMRMLGridTransformNode, vtkMRMLHierarchyNode, vtkMRMLInteractionNode, vtkMRMLLayoutNode, vtkMRMLLinearTransformNode, vtkMRMLMarkupsStorageNode, vtkMRMLModelDisplayNode, vtkMRMLModelHierarchyNode, vtkMRMLModelStorageNode, vtkMRMLNRRDStorageNode, vtkMRMLPETProceduralColorNode, vtkMRMLPlotChartNode, vtkMRMLPlotSeriesNode, vtkMRMLPlotViewNode, vtkMRMLProceduralColorNode, vtkMRMLROIListNode, vtkMRMLROINode, vtkMRMLScalarVolumeDisplayNode, vtkMRMLScalarVolumeNode, vtkMRMLSceneViewNode, vtkMRMLScriptedModuleNode, vtkMRMLSegmentationDisplayNode, vtkMRMLSegmentationNode, vtkMRMLSegmentationStorageNode, vtkMRMLSelectionNode, vtkMRMLSequenceNode, vtkMRMLSliceCompositeNode, vtkMRMLSliceDisplayNode, vtkMRMLSliceNode, vtkMRMLSnapshotClipNode, vtkMRMLStorableNode, vtkMRMLStorageNode, vtkMRMLStreamingVolumeNode, vtkMRMLSubjectHierarchyLegacyNode, vtkMRMLTableNode, vtkMRMLTableViewNode, vtkMRMLTensorVolumeNode, vtkMRMLTextNode, vtkMRMLTextStorageNode, vtkMRMLTransformableNode, vtkMRMLTransformDisplayNode, vtkMRMLTransformNode, vtkMRMLTransformStorageNode, vtkMRMLUnitNode, vtkMRMLVectorVolumeDisplayNode, vtkMRMLVectorVolumeNode, vtkMRMLViewNode, vtkMRMLVolumeArchetypeStorageNode, vtkMRMLVolumeDisplayNode, vtkMRMLVolumeHeaderlessStorageNode, vtkMRMLVolumeNode, vtkMRMLAnnotationControlPointsNode, vtkMRMLAnnotationDisplayNode, vtkMRMLAnnotationHierarchyNode, vtkMRMLAnnotationLineDisplayNode, vtkMRMLAnnotationLinesNode, vtkMRMLAnnotationLinesStorageNode, vtkMRMLAnnotationNode, vtkMRMLAnnotationPointDisplayNode, vtkMRMLAnnotationROINode, vtkMRMLAnnotationRulerNode, vtkMRMLAnnotationRulerStorageNode, vtkMRMLAnnotationSnapshotNode, vtkMRMLAnnotationTextDisplayNode, vtkMRMLColorLegendDisplayNode, vtkMRMLCropVolumeParametersNode, vtkMRMLMarkupsAngleNode, vtkMRMLMarkupsCurveNode, vtkMRMLMarkupsDisplayNode, vtkMRMLMarkupsFiducialNode, vtkMRMLMarkupsFiducialStorageNode, vtkMRMLMarkupsJsonStorageNode, vtkMRMLMarkupsLineNode, vtkMRMLMarkupsNode, vtkMRMLMarkupsPlaneNode, vtkMRMLSegmentEditorNode, vtkMRMLSequenceBrowserNode, vtkMRMLCPURayCastVolumeRenderingDisplayNode, vtkMRMLGPURayCastVolumeRenderingDisplayNode, vtkMRMLMultiVolumeRenderingDisplayNode, vtkMRMLShaderPropertyNode, vtkMRMLVolumePropertyNode, and vtkMRMLVolumeRenderingDisplayNode.

◆ RemoveAttribute()

void vtkMRMLNode::RemoveAttribute ( const char * name)

Remove attribute with the specified name.

◆ RemoveInvalidReferences()

void vtkMRMLNode::RemoveInvalidReferences ( const std::set< std::string > & validNodeIDs)
protected

Remove node references that refer to nodes that are not in the list of valid node IDs. This is useful for removing invalid references when importing a scene.

◆ RemoveNodeReferenceIDs()

void vtkMRMLNode::RemoveNodeReferenceIDs ( const char * referenceRole)

Remove all node IDs and associated nodes for a specific referenceRole.

If referenceRole is 0 remove references for all roles

◆ RemoveNodeReferenceProperty()

void vtkMRMLNode::RemoveNodeReferenceProperty ( const std::string & referenceRole,
const std::string & propertyName )

Remove a node reference property for a specific referenceRole.

See also
GetNthNodeReferenceProperties GetNodeReferenceProperties

◆ RemoveNthNodeReferenceID()

void vtkMRMLNode::RemoveNthNodeReferenceID ( const char * referenceRole,
int n )

Convenience method that removes the Nth node ID from the list.

◆ RemoveNthNodeReferenceProperty()

void vtkMRMLNode::RemoveNthNodeReferenceProperty ( const std::string & referenceRole,
int n,
const std::string & propertyName )

◆ Reset()

virtual void vtkMRMLNode::Reset ( vtkMRMLNode * defaultNode)
virtual

Reset node attributes to the initial state as defined in the constructor or the passed default node.

It preserves values of the following dynamic attributes that may be set by an application:

  • SaveWithScene
  • HideFromEditors
  • Selectable
  • SingletonTag.

If a defaultNode pointer is passed then the values stored in that node will be used to set the node contents. If defaultNode is nullptr then the values set in the constructor of the class will be used to set the node contents.

Note
Other attributes that needs to be preserved should be handled in the subclass.
See also
SetSaveWithScene()
SetHideFromEditors()
SetSelectable()
SetSingletonTag()

Reimplemented in vtkMRMLCameraNode, vtkMRMLAbstractViewNode, vtkMRMLColorNode, vtkMRMLColorTableNode, vtkMRMLLayoutNode, vtkMRMLSliceNode, and vtkMRMLUnitNode.

◆ SafeDownCast()

static vtkMRMLNode * vtkMRMLNode::SafeDownCast ( vtkObject * o)
static

◆ SaveWithSceneOff()

virtual void vtkMRMLNode::SaveWithSceneOff ( )
virtual

◆ SaveWithSceneOn()

virtual void vtkMRMLNode::SaveWithSceneOn ( )
virtual

◆ SelectableOff()

virtual void vtkMRMLNode::SelectableOff ( )
virtual

◆ SelectableOn()

virtual void vtkMRMLNode::SelectableOn ( )
virtual

◆ SelectedOff()

virtual void vtkMRMLNode::SelectedOff ( )
virtual

◆ SelectedOn()

virtual void vtkMRMLNode::SelectedOn ( )
virtual

◆ SetAddToScene()

virtual void vtkMRMLNode::SetAddToScene ( int )
virtual

◆ SetAddToSceneNoModify()

void vtkMRMLNode::SetAddToSceneNoModify ( int value)

◆ SetAndObserveNodeReferenceID()

vtkMRMLNode * vtkMRMLNode::SetAndObserveNodeReferenceID ( const char * referenceRole,
const char * referencedNodeID,
vtkIntArray * events = nullptr,
ContentModifiedObserveType observeContentModifiedEvents = ContentModifiedObserveUndefined )

Set and observe a reference node from this node for a specific referenceRole.

Observe Modified event by default, optionally takes array of events

If observeContentModifiedEvents is set to ContentModifiedObserveEnabled then this node will get notifications when any of the event in the ContentModifiedEvents list of the observed node is invoked. If observeContentModifiedEvents is set to ContentModifiedObserveUndefined then the behavior defined in the node reference role will be used.

◆ SetAndObserveNthNodeReferenceID()

vtkMRMLNode * vtkMRMLNode::SetAndObserveNthNodeReferenceID ( const char * referenceRole,
int n,
const char * referencedNodeID,
vtkIntArray * events = nullptr,
ContentModifiedObserveType observeContentModifiedEvents = ContentModifiedObserveUndefined )

Set and observe the Nth node ID for a specific reference role.

If n is larger than the number of reference nodes, the node ID is added at the end of the list. If nodeReferenceID is 0, the node ID is removed from the list. When a node ID is set (added or changed), its corresponding node is searched (slow) into the scene and cached for fast future access. It is possible however that the node is not yet into the scene (due to some temporary state (at loading time for example). UpdateScene() can later be called to retrieve the nodes from the scene (automatically done when loading a scene). Get(Nth)NodeReference() also scan the scene if the node was not yet cached.

If observeContentModifiedEvents is set to ContentModifiedObserveEnabled then this node will get notifications when any of the event in the ContentModifiedEvents list of the observed node is invoked. If observeContentModifiedEvents is set to ContentModifiedObserveUndefined then the behavior defined in the node reference role will be used.

See also
SetAndObserveNodeReferenceID(const char*)
AddAndObserveNodeReferenceID(const char*)
RemoveNthNodeReferenceID(int)

◆ SetAttribute()

void vtkMRMLNode::SetAttribute ( const char * name,
const char * value )

Set a name value pair attribute.

Fires a vtkCommand::ModifiedEvent.

Attributes are written in the XML. If value is 0, the attribute name is removed from the pair list.

This function is a no-op if name is null or empty.

See also
WriteXML()

◆ SetDescription()

virtual void vtkMRMLNode::SetDescription ( const char * )
virtual

Text description of this node, to be set by the user.

◆ SetDisableModifiedEvent()

void vtkMRMLNode::SetDisableModifiedEvent ( int onOff)
inline

Definition at line 473 of file vtkMRMLNode.h.

◆ SetHideFromEditors()

virtual void vtkMRMLNode::SetHideFromEditors ( int )
virtual

◆ SetInMRMLCallbackFlag()

void vtkMRMLNode::SetInMRMLCallbackFlag ( int flag)
inline

Definition at line 403 of file vtkMRMLNode.h.

◆ SetName()

virtual void vtkMRMLNode::SetName ( const char * )
virtual

Name of this node, to be set by the user.

Reimplemented in vtkMRMLUnitNode.

◆ SetNodeReferenceID()

vtkMRMLNode * vtkMRMLNode::SetNodeReferenceID ( const char * referenceRole,
const char * referencedNodeID )

Set a reference to a node with specified nodeID from this node for a specific referenceRole.

◆ SetNodeReferenceProperty()

void vtkMRMLNode::SetNodeReferenceProperty ( const std::string & referenceRole,
const std::string & propertyName,
const std::string & value )

Set the node reference property for a specific referenceRole.

See also
GetNthNodeReferenceProperties GetNodeReferenceProperties

◆ SetNthNodeReferenceID()

vtkMRMLNode * vtkMRMLNode::SetNthNodeReferenceID ( const char * referenceRole,
int n,
const char * referencedNodeID )

Set a N-th reference from this node with specified referencedNodeID for a specific referenceRole.

◆ SetNthNodeReferenceProperty()

void vtkMRMLNode::SetNthNodeReferenceProperty ( const std::string & referenceRole,
int n,
const std::string & propertyName,
const std::string & value )

◆ SetSaveWithScene()

virtual void vtkMRMLNode::SetSaveWithScene ( int )
virtual

◆ SetScene()

virtual void vtkMRMLNode::SetScene ( vtkMRMLScene * scene)
virtual

This method is for internal use only. Use AddNode method of vtkMRMLScene to add a node to the scene.

Internally calls SetSceneReferences()

See also
SetSceneReferences()

Reimplemented in vtkMRMLFolderDisplayNode, and vtkMRMLSceneViewNode.

◆ SetSceneReferences()

virtual void vtkMRMLNode::SetSceneReferences ( )
virtual

Update the references of the node to the scene.

Note
You must unsure that a valid scene is set before calling SetSceneReferences().

Reimplemented in vtkMRMLDisplayableHierarchyNode, vtkMRMLDisplayNode, vtkMRMLGlyphableVolumeDisplayNode, and vtkMRMLHierarchyNode.

◆ SetSelectable()

virtual void vtkMRMLNode::SetSelectable ( int )
virtual

Reimplemented in vtkMRMLDisplayableNode.

◆ SetSelected()

virtual void vtkMRMLNode::SetSelected ( int )
virtual

◆ SetSingletonOff()

void vtkMRMLNode::SetSingletonOff ( )
inline

Definition at line 451 of file vtkMRMLNode.h.

◆ SetSingletonOn()

void vtkMRMLNode::SetSingletonOn ( )
inline

Definition at line 447 of file vtkMRMLNode.h.

◆ SetSingletonTag()

virtual void vtkMRMLNode::SetSingletonTag ( const char * )
virtual

Tag that make this node a singleton in the scene.

If set to nullptr, multiple instances of this node class are allowed.

If set to a non-nullptr string, the node will be a singleton and the scene will replace this node instead of adding new instances.

The SingletonTag is used by the scene to build a unique ID.

If the there can only be one instance of a given node class in the scene, then the singleton tag should be Singleton. For example, the interaction and selection nodes are named Selection and Interaction, with Singleton tags set to Singleton, and with IDs set to vtkMRMLSelectionNodeSingleton and vtkMRMLInteractionNodeSingleton. If the singleton node is associated with a specific module it should use the module name, which already needs to be unique, as the tag. The Editor module uses this naming convention, with a parameter node that has a singleton tag of Editor and a node ID of vtkMRMLScriptedModuleNodeEditor. If the there is more than one instance of the node class then the singleton tag should be Singleton post-pended with a unique identifier for that specific node (e.g. the name). Any new color nodes should use this convention, with a name of NewName, a Singleton tag of SingletonNewName, leading to an ID of vtkMRMLColorTableNodeSingletonNewName. The existing MRML nodes don't always use these conventions but are kept unchanged for backward compatibility.

See also
vtkMRMLScene::BuildID

◆ SetTempURLString()

virtual void vtkMRMLNode::SetTempURLString ( const char * )
protectedvirtual

Get/Set the string used to manage encoding/decoding of strings/URLs with special characters.

◆ SetUndoEnabled()

virtual void vtkMRMLNode::SetUndoEnabled ( bool )
virtual

◆ StartModify()

virtual int vtkMRMLNode::StartModify ( )
inlinevirtual

Start modifying the node. Disable Modify events.

Returns the previous state of DisableModifiedEvent flag that should be passed to EndModify() method.

See also
EndModify()

Definition at line 307 of file vtkMRMLNode.h.

◆ UndoEnabledOff()

virtual void vtkMRMLNode::UndoEnabledOff ( )
virtual

◆ UndoEnabledOn()

virtual void vtkMRMLNode::UndoEnabledOn ( )
virtual

◆ UpdateNodeReferenceEventObserver()

vtkMRMLNode * vtkMRMLNode::UpdateNodeReferenceEventObserver ( vtkMRMLNode * oldReferencedNode,
vtkMRMLNode * newReferencedNode,
vtkIntArray * newEvents,
bool newObserveContentModifiedEvents,
vtkMRMLNodeReference * referenceToIgnore )
protected

Helper function for SetAndObserveNthNodeReferenceID. Updates the event observers on the old and new referenced node. referenceToIgnore should contain the current reference that is being updated.

◆ UpdateNodeReferences()

virtual void vtkMRMLNode::UpdateNodeReferences ( const char * referenceRole = nullptr)
protectedvirtual

Updates references and event observations on the selected referenced nodes. If referenceRole is nullptr then all the roles will be updated.

See also
UpdateNthNodeReference

◆ UpdateNthNodeReference()

virtual void vtkMRMLNode::UpdateNthNodeReference ( const char * referenceRole,
int n )
protectedvirtual

Updates references and event observations on the selected referenced node. Update is necessary because at the time the reference was added the referenced node might not have been available in the scene yet. Prerequisites: scene is valid, n >= 0 and n < referenced node IDs list size.

◆ UpdateReferenceID()

virtual void vtkMRMLNode::UpdateReferenceID ( const char * oldID,
const char * newID )
virtual

◆ UpdateReferences()

virtual void vtkMRMLNode::UpdateReferences ( )
virtual

◆ UpdateScene()

virtual void vtkMRMLNode::UpdateScene ( vtkMRMLScene * )
inlinevirtual

◆ URLDecodeString()

const char * vtkMRMLNode::URLDecodeString ( const char * inString)

Decode a URL string.

Returns the string (null) if the input is null.

Note
Currently only works on %, space, ', ", <, >
See also
URLEncodeString()

◆ URLEncodeString()

const char * vtkMRMLNode::URLEncodeString ( const char * inString)

Encode a URL string.

Returns the string (null) if the input is null.

Note
Currently only works on %, space, ', ", <, >
See also
URLDecodeString()

◆ WriteNodeBodyXML()

virtual void vtkMRMLNode::WriteNodeBodyXML ( ostream & of,
int indent )
virtual

Write this node's body to a MRML file in XML format.

Reimplemented in vtkMRMLSceneViewNode, and vtkMRMLSubjectHierarchyNode.

◆ WriteXML()

virtual void vtkMRMLNode::WriteXML ( ostream & of,
int indent )
virtual

Write this node's information to a MRML file in XML format.

Note
Subclasses should implement this method. Call this method in the subclass implementation.
Parameters
indentDeprecated argument that is kept for API backward-compatibility

Reimplemented in vtkMRMLCommandLineModuleNode, vtkMRMLAbstractLayoutNode, vtkMRMLAbstractViewNode, vtkMRMLBSplineTransformNode, vtkMRMLCameraNode, vtkMRMLClipNode, vtkMRMLColorNode, vtkMRMLColorTableNode, vtkMRMLCrosshairNode, vtkMRMLdGEMRICProceduralColorNode, vtkMRMLDiffusionImageVolumeNode, vtkMRMLDiffusionTensorDisplayPropertiesNode, vtkMRMLDiffusionTensorVolumeDisplayNode, vtkMRMLDiffusionTensorVolumeSliceDisplayNode, vtkMRMLDiffusionWeightedVolumeDisplayNode, vtkMRMLDiffusionWeightedVolumeNode, vtkMRMLDisplayableHierarchyNode, vtkMRMLDisplayableNode, vtkMRMLDisplayNode, vtkMRMLFolderDisplayNode, vtkMRMLGlyphableVolumeDisplayNode, vtkMRMLGlyphableVolumeSliceDisplayNode, vtkMRMLGridTransformNode, vtkMRMLHierarchyNode, vtkMRMLInteractionNode, vtkMRMLLayoutNode, vtkMRMLLinearTransformNode, vtkMRMLMarkupsStorageNode, vtkMRMLModelDisplayNode, vtkMRMLModelHierarchyNode, vtkMRMLModelStorageNode, vtkMRMLNRRDStorageNode, vtkMRMLPETProceduralColorNode, vtkMRMLPlotChartNode, vtkMRMLPlotSeriesNode, vtkMRMLPlotViewNode, vtkMRMLProceduralColorNode, vtkMRMLROIListNode, vtkMRMLROINode, vtkMRMLScalarVolumeDisplayNode, vtkMRMLScalarVolumeNode, vtkMRMLSceneViewNode, vtkMRMLScriptedModuleNode, vtkMRMLSegmentationDisplayNode, vtkMRMLSegmentationNode, vtkMRMLSegmentationStorageNode, vtkMRMLSelectionNode, vtkMRMLSequenceNode, vtkMRMLSliceCompositeNode, vtkMRMLSliceDisplayNode, vtkMRMLSliceNode, vtkMRMLSnapshotClipNode, vtkMRMLStorableNode, vtkMRMLStorageNode, vtkMRMLStreamingVolumeNode, vtkMRMLSubjectHierarchyLegacyNode, vtkMRMLSubjectHierarchyNode, vtkMRMLTableNode, vtkMRMLTableViewNode, vtkMRMLTensorVolumeNode, vtkMRMLTextNode, vtkMRMLTextStorageNode, vtkMRMLTransformableNode, vtkMRMLTransformDisplayNode, vtkMRMLTransformNode, vtkMRMLTransformStorageNode, vtkMRMLUnitNode, vtkMRMLVectorVolumeDisplayNode, vtkMRMLVectorVolumeNode, vtkMRMLViewNode, vtkMRMLVolumeArchetypeStorageNode, vtkMRMLVolumeDisplayNode, vtkMRMLVolumeHeaderlessStorageNode, vtkMRMLVolumeNode, vtkMRMLAnnotationControlPointsNode, vtkMRMLAnnotationDisplayNode, vtkMRMLAnnotationHierarchyNode, vtkMRMLAnnotationLineDisplayNode, vtkMRMLAnnotationLinesNode, vtkMRMLAnnotationLinesStorageNode, vtkMRMLAnnotationNode, vtkMRMLAnnotationPointDisplayNode, vtkMRMLAnnotationROINode, vtkMRMLAnnotationRulerNode, vtkMRMLAnnotationRulerStorageNode, vtkMRMLAnnotationTextDisplayNode, vtkMRMLColorLegendDisplayNode, vtkMRMLCropVolumeParametersNode, vtkMRMLMarkupsAngleNode, vtkMRMLMarkupsCurveNode, vtkMRMLMarkupsDisplayNode, vtkMRMLMarkupsFiducialNode, vtkMRMLMarkupsFiducialStorageNode, vtkMRMLMarkupsJsonStorageNode, vtkMRMLMarkupsLineNode, vtkMRMLMarkupsNode, vtkMRMLMarkupsPlaneNode, vtkMRMLSegmentEditorNode, vtkMRMLSequenceBrowserNode, vtkMRMLCPURayCastVolumeRenderingDisplayNode, vtkMRMLGPURayCastVolumeRenderingDisplayNode, vtkMRMLMultiVolumeRenderingDisplayNode, vtkMRMLShaderPropertyNode, vtkMRMLVolumePropertyNode, vtkMRMLVolumeRenderingDisplayNode, and vtkMRMLAnnotationSnapshotNode.

◆ XMLAttributeDecodeString()

std::string vtkMRMLNode::XMLAttributeDecodeString ( const std::string & inString)

Decode an XML attribute string.

Important: attributes that vtkMRMLNode::ReadXMLAttributes method receives are already decoded, therefore no XML attribute decoding must not be applied to those strings.

See also
XMLAttributeEncodeString()

◆ XMLAttributeEncodeString()

std::string vtkMRMLNode::XMLAttributeEncodeString ( const std::string & inString)

Encode an XML attribute string (replaces special characters by code sequences)

See also
XMLAttributeDecodeString()

Friends And Related Symbol Documentation

◆ vtkMRMLScene

friend class vtkMRMLScene
friend

make the vtkMRMLScene a friend so that AddNodeNoNotify can call SetID, but that's the only class that is allowed to do so

Definition at line 171 of file vtkMRMLNode.h.

◆ vtkMRMLSceneViewNode

friend class vtkMRMLSceneViewNode
friend

Definition at line 172 of file vtkMRMLNode.h.

Member Data Documentation

◆ AddToScene

int vtkMRMLNode::AddToScene {1}
protected

Definition at line 1092 of file vtkMRMLNode.h.

◆ Attributes

AttributesType vtkMRMLNode::Attributes
protected

Definition at line 1107 of file vtkMRMLNode.h.

◆ ContentModifiedEvents

vtkIntArray* vtkMRMLNode::ContentModifiedEvents
protected

Definition at line 1109 of file vtkMRMLNode.h.

◆ Description

char* vtkMRMLNode::Description {nullptr}
protected

Definition at line 1088 of file vtkMRMLNode.h.

◆ HideFromEditors

int vtkMRMLNode::HideFromEditors {0}
protected

Definition at line 1089 of file vtkMRMLNode.h.

◆ ID

char* vtkMRMLNode::ID {nullptr}
protected

Definition at line 1086 of file vtkMRMLNode.h.

◆ InMRMLCallbackFlag

int vtkMRMLNode::InMRMLCallbackFlag {0}
protected

Flag to avoid event loops.

Definition at line 1099 of file vtkMRMLNode.h.

◆ MRMLCallbackCommand

vtkCallbackCommand* vtkMRMLNode::MRMLCallbackCommand
protected

Holders for MRML callbacks.

Definition at line 1084 of file vtkMRMLNode.h.

◆ MRMLObserverManager

vtkObserverManager* vtkMRMLNode::MRMLObserverManager
protected

Definition at line 1111 of file vtkMRMLNode.h.

◆ Name

char* vtkMRMLNode::Name {nullptr}
protected

Definition at line 1087 of file vtkMRMLNode.h.

◆ NodeReferenceEvents

NodeReferenceEventsType vtkMRMLNode::NodeReferenceEvents
protected

Definition at line 1127 of file vtkMRMLNode.h.

◆ NodeReferenceMRMLAttributeNames

std::map< std::string, std::string> vtkMRMLNode::NodeReferenceMRMLAttributeNames
protected

Definition at line 1119 of file vtkMRMLNode.h.

◆ NodeReferences

NodeReferencesType vtkMRMLNode::NodeReferences
protected

Definition at line 1117 of file vtkMRMLNode.h.

◆ SaveWithScene

int vtkMRMLNode::SaveWithScene {true}
protected

Definition at line 1095 of file vtkMRMLNode.h.

◆ Scene

vtkWeakPointer<vtkMRMLScene> vtkMRMLNode::Scene
protected

Definition at line 1104 of file vtkMRMLNode.h.

◆ Selectable

int vtkMRMLNode::Selectable {1}
protected

Definition at line 1090 of file vtkMRMLNode.h.

◆ Selected

int vtkMRMLNode::Selected {0}
protected

Definition at line 1091 of file vtkMRMLNode.h.

◆ UndoEnabled

bool vtkMRMLNode::UndoEnabled {false}
protected

Definition at line 1093 of file vtkMRMLNode.h.


The documentation for this class was generated from the following file: