Slicer
4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
MRML node to represent a complete subject hierarchy tree. More...
#include <Libs/MRML/Core/vtkMRMLSubjectHierarchyNode.h>
Public Types | |
enum | { SubjectHierarchyItemAddedEvent = 62000, SubjectHierarchyItemAboutToBeRemovedEvent, SubjectHierarchyItemRemovedEvent, SubjectHierarchyItemModifiedEvent, SubjectHierarchyItemUIDAddedEvent, SubjectHierarchyItemOwnerPluginSearchRequested, SubjectHierarchyStartResolveEvent, SubjectHierarchyEndResolveEvent } |
typedef vtkMRMLNode | Superclass |
Public Types inherited from vtkMRMLNode | |
enum | { HierarchyModifiedEvent = 16000, IDChangedEvent = 16001, ReferenceAddedEvent, ReferenceModifiedEvent, ReferenceRemovedEvent, ReferencedNodeModifiedEvent } |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual void | Copy (vtkMRMLNode *node) VTK_OVERRIDE |
Copy the node's attributes to this object. More... | |
vtkIdType | CreateFolderItem (vtkIdType parentItemID, std::string name) |
vtkIdType | CreateHierarchyItem (vtkIdType parentItemID, std::string name, std::string level) |
vtkIdType | CreateItem (vtkIdType parentItemID, vtkMRMLNode *dataNode) |
virtual vtkMRMLNode * | CreateNodeInstance () VTK_OVERRIDE |
Create instance of the default node. Like New only virtual. More... | |
vtkIdType | CreateStudyItem (vtkIdType parentItemID, std::string name) |
vtkIdType | CreateSubjectItem (vtkIdType parentItemID, std::string name) |
std::string | GenerateUniqueItemName (std::string name) |
Generate unique item name. More... | |
std::string | GetAttributeFromItemAncestor (vtkIdType itemID, std::string attributeName, std::string level="") |
virtual const char * | GetClassName () |
void | GetDataNodesInBranch (vtkIdType itemID, vtkCollection *dataNodeCollection, const char *childClass=NULL) |
int | GetDisplayVisibilityForBranch (vtkIdType itemID) |
vtkIdType | GetItemAncestorAtLevel (vtkIdType itemID, std::string level) |
std::string | GetItemAttribute (vtkIdType itemID, std::string attributeName) |
std::vector< std::string > | GetItemAttributeNames (vtkIdType itemID) |
vtkIdType | GetItemByDataNode (vtkMRMLNode *dataNode) |
vtkIdType | GetItemByPositionUnderParent (vtkIdType parentItemID, int position) |
vtkIdType | GetItemByUID (const char *uidName, const char *uidValue) |
vtkIdType | GetItemByUIDList (const char *uidName, const char *uidValue) |
void | GetItemChildren (vtkIdType itemID, std::vector< vtkIdType > &childIDs, bool recursive=false) |
void | GetItemChildren (vtkIdType itemID, vtkIdList *childIDs, bool recursive=false) |
Python accessibility function to get children of a subject hierarchy item. More... | |
vtkIdType | GetItemChildWithName (vtkIdType parentItemID, std::string name) |
vtkMRMLNode * | GetItemDataNode (vtkIdType itemID) |
bool | GetItemExpanded (vtkIdType itemID) |
Get expanded flag for a subject hierarchy item. More... | |
std::string | GetItemLevel (vtkIdType itemID) |
Convenience function to get level attribute for a subject hierarchy item. More... | |
std::string | GetItemName (vtkIdType itemID) |
std::string | GetItemOwnerPluginName (vtkIdType itemID) |
Get owner plugin name (role) for a subject hierarchy item. More... | |
vtkIdType | GetItemParent (vtkIdType itemID) |
int | GetItemPositionUnderParent (vtkIdType itemID) |
std::vector< vtkIdType > | GetItemsReferencedFromItemByDICOM (vtkIdType itemID) |
void | GetItemsReferencedFromItemByDICOM (vtkIdType itemID, vtkIdList *referencingIdList) |
std::vector< vtkIdType > | GetItemsReferencingItemByDICOM (vtkIdType itemID) |
void | GetItemsReferencingItemByDICOM (vtkIdType itemID, vtkIdList *referencingIdList) |
std::string | GetItemUID (vtkIdType itemID, std::string uidName) |
virtual const char * | GetNodeTagName () VTK_OVERRIDE |
Get node XML tag name (like Volume, Contour) More... | |
int | GetNumberOfItemChildren (vtkIdType itemID, bool recursive=false) |
int | GetNumberOfItems () |
Get number of items under the scene, excluding the scene. More... | |
vtkMRMLNode * | GetParentDataNode (vtkMRMLNode *dataNode, bool recursive=false) |
vtkIdType | GetSceneItemID () |
Get ID of root subject hierarchy item (which can be interpreted as the scene in terms of hierarchy) More... | |
bool | HasItemAttribute (vtkIdType itemID, std::string attributeName) |
virtual int | IsA (const char *type) |
bool | IsAnyNodeInBranchTransformed (vtkIdType itemID, vtkMRMLTransformNode *exceptionNode=NULL) |
bool | IsItemLevel (vtkIdType itemID, std::string level) |
bool | IsItemVirtualBranchParent (vtkIdType itemID) |
void | ItemModified (vtkIdType itemID) |
bool | MoveItem (vtkIdType itemID, vtkIdType beforeItemID) |
void | PrintItem (vtkIdType itemID, ostream &os, vtkIndent indent) |
Print subject hierarchy item info on stream. More... | |
void | PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE |
virtual void | ReadItemFromXML (const char **atts) |
Read item from XML. More... | |
void | RemoveAllItems (bool removeDataNode=false) |
bool | RemoveItem (vtkIdType itemID, bool removeDataNode=true, bool recursive=true) |
bool | RemoveItemAttribute (vtkIdType itemID, std::string attributeName) |
bool | RemoveItemChildren (vtkIdType itemID, bool removeDataNodes=true, bool recursive=true) |
bool | ReparentItemByDataNode (vtkIdType itemID, vtkMRMLNode *newParentNode) |
void | RequestOwnerPluginSearch (vtkIdType itemID) |
void | RequestOwnerPluginSearch (vtkMRMLNode *dataNode) |
void | SetDisplayVisibilityForBranch (vtkIdType itemID, int visible) |
Set subject hierarchy branch visibility. More... | |
void | SetItemAttribute (vtkIdType itemID, std::string attributeName, std::string attributeValue) |
Add attribute to the subject hierarchy item. More... | |
void | SetItemExpanded (vtkIdType itemID, bool expanded) |
Set expanded flag for a subject hierarchy item (only for internal use, do not set explicitly) More... | |
void | SetItemLevel (vtkIdType itemID, std::string level) |
Convenience function to set level attribute for a subject hierarchy item. More... | |
void | SetItemName (vtkIdType itemID, std::string name) |
Set name for a subject hierarchy item. More... | |
void | SetItemOwnerPluginName (vtkIdType itemID, std::string ownerPluginName) |
Set owner plugin name (role) for a subject hierarchy item. More... | |
void | SetItemParent (vtkIdType itemID, vtkIdType parentItemID) |
Set the parent of a subject hierarchy item. More... | |
void | SetItemUID (vtkIdType itemID, std::string uidName, std::string uidValue) |
Set UID to the subject hierarchy item. More... | |
virtual void | WriteNodeBodyXML (ostream &of, int indent) VTK_OVERRIDE |
Write this node's body to a MRML file in XML format. More... | |
virtual void | WriteXML (ostream &of, int indent) VTK_OVERRIDE |
Write this node's information to a MRML file in XML format. More... | |
Public Member Functions inherited from vtkMRMLNode | |
vtkMRMLNode * | AddAndObserveNodeReferenceID (const char *referenceRole, const char *referencedNodeID, vtkIntArray *events=0) |
Add and observe a reference node from this node for a specific referenceRole. More... | |
vtkMRMLNode * | AddNodeReferenceID (const char *referenceRole, const char *referencedNodeID) |
Convenience method that adds a referencedNodeID at the end of the list. More... | |
void | AddNodeReferenceRole (const char *referenceRole, const char *mrmlAttributeName=0, vtkIntArray *events=0) |
Add a referenceRole. More... | |
virtual void | AddToSceneOff () |
virtual void | AddToSceneOn () |
virtual void | CopyReferences (vtkMRMLNode *node) |
Copy the references of the node into this. More... | |
void | CopyWithoutModifiedEvent (vtkMRMLNode *node) |
void | CopyWithScene (vtkMRMLNode *node) |
Copy everything (including Scene and ID) from another node of the same type. More... | |
void | CopyWithSceneWithSingleModifiedEvent (vtkMRMLNode *node) |
Copy everything (including Scene and ID) from another node of the same type. More... | |
void | CopyWithSingleModifiedEvent (vtkMRMLNode *node) |
void | DisableModifiedEventOff () |
void | DisableModifiedEventOn () |
virtual int | EndModify (int previousDisableModifiedEventState) |
End modifying the node. More... | |
virtual int | GetAddToScene () |
node added to MRML scene. More... | |
const char * | GetAttribute (const char *name) |
Get value of a name value pair attribute. More... | |
std::vector< std::string > | GetAttributeNames () |
Get all attribute names. More... | |
void | GetAttributeNames (vtkStringArray *attributeNames) |
Get all attribute names. Python-wrappable version. More... | |
virtual char * | GetDescription () |
virtual int | GetDisableModifiedEvent () |
Turn on/off generating InvokeEvent for set macros. More... | |
virtual int | GetHideFromEditors () |
Describes if the node is hidden. More... | |
virtual char * | GetID () |
ID use by other nodes to reference this node in XML. More... | |
virtual int | GetInMRMLCallbackFlag () |
Flags to avoid event loops. More... | |
virtual int | GetModifiedEventPending () |
virtual char * | GetName () |
vtkMRMLNode * | GetNodeReference (const char *referenceRole) |
const char * | GetNodeReferenceID (const char *referenceRole) |
Utility function that returns the first node id for a specific referenceRole. More... | |
void | GetNodeReferenceIDs (const char *referenceRole, std::vector< const char *> &referencedNodeIDs) |
Return a list of the referenced node IDs. More... | |
void | GetNodeReferenceRoles (std::vector< std::string > &roles) |
void | GetNodeReferences (const char *referenceRole, std::vector< vtkMRMLNode *> &nodes) |
Return a list of the referenced nodes. More... | |
vtkMRMLNode * | GetNthNodeReference (const char *referenceRole, int n) |
Get referenced MRML node for a specific referenceRole. More... | |
const char * | GetNthNodeReferenceID (const char *referenceRole, int n) |
Return the string of the Nth node ID for a specific reference role. More... | |
const char * | GetNthNodeReferenceRole (int n) |
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). More... | |
virtual int | GetSaveWithScene () |
Save node with MRML scene. More... | |
virtual vtkMRMLScene * | GetScene () |
Only the scene can set itself to the node. More... | |
virtual int | GetSelectable () |
Describes if the node is selectable. More... | |
virtual int | GetSelected () |
Get/Set for Selected. More... | |
virtual char * | GetSingletonTag () |
bool | HasNodeReferenceID (const char *referenceRole, const char *referencedNodeID) |
Return true if referencedNodeID is in the node ID list for a specific referenceRole. More... | |
virtual void | HideFromEditorsOff () |
virtual void | HideFromEditorsOn () |
virtual void | InvokeCustomModifiedEvent (int eventId, void *callData=NULL) |
This method allows the node to compress events. More... | |
virtual int | InvokePendingModifiedEvent () |
Invokes any modified events that are pending . More... | |
bool | IsSingleton () |
virtual void | Modified () VTK_OVERRIDE |
Customized version of Modified() allowing to compress vtkCommand::ModifiedEvent. More... | |
virtual void | OnNodeAddedToScene () |
void | PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE |
virtual void | ProcessChildNode (vtkMRMLNode *) |
Set dependencies between this node and a child node when parsing XML file. More... | |
virtual void | ProcessMRMLEvents (vtkObject *caller, unsigned long event, void *callData) |
Propagate events generated in mrml. More... | |
virtual void | ReadXMLAttributes (const char **atts) |
void | RemoveAttribute (const char *name) |
Remove attribute with the specified name. More... | |
void | RemoveNodeReferenceIDs (const char *referenceRole) |
Remove all node IDs and associated nodes for a specific referenceRole. More... | |
void | RemoveNthNodeReferenceID (const char *referenceRole, int n) |
Convenience method that removes the Nth node ID from the list. More... | |
virtual void | Reset (vtkMRMLNode *defaultNode) |
Reset node attributes to the initial state as defined in the constructor or the passed default node. More... | |
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) |
vtkMRMLNode * | SetAndObserveNodeReferenceID (const char *referenceRole, const char *referencedNodeID, vtkIntArray *events=0) |
Set and observe a reference node from this node for a specific referenceRole. More... | |
vtkMRMLNode * | SetAndObserveNthNodeReferenceID (const char *referenceRole, int n, const char *referencedNodeID, vtkIntArray *events=0) |
Set and observe the Nth node ID for a specific reference role. More... | |
void | SetAttribute (const char *name, const char *value) |
Set a name value pair attribute. More... | |
virtual void | SetDescription (const char *) |
Text description of this node, to be set by the user. More... | |
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. More... | |
vtkMRMLNode * | SetNodeReferenceID (const char *referenceRole, const char *referencedNodeID) |
Set a reference to a node with specified nodeID from this node for a specific referenceRole. More... | |
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. More... | |
virtual void | SetSaveWithScene (int) |
virtual void | SetScene (vtkMRMLScene *scene) |
virtual void | SetSceneReferences () |
Update the references of the node to the scene. More... | |
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. More... | |
virtual int | StartModify () |
Start modifying the node. Disable Modify events. More... | |
virtual void | UpdateReferenceID (const char *oldID, const char *newID) |
Update the stored reference to another node in the scene. More... | |
virtual void | UpdateReferences () |
The method should remove all pointers and observations to all nodes that are not in the scene anymore. More... | |
virtual void | UpdateScene (vtkMRMLScene *) |
const char * | URLDecodeString (const char *inString) |
Decode a URL string. More... | |
const char * | URLEncodeString (const char *inString) |
Encode a URL string. More... | |
Static Public Member Functions | |
static void | DeserializeUIDList (std::string uidListString, std::vector< std::string > &deserializedUIDList) |
Deserialize a UID list string (stored in the UID map) into a vector of UID strings. More... | |
static vtkIdType | GetInvalidItemID () |
Python accessor for the invalid ID. More... | |
static vtkMRMLSubjectHierarchyNode * | GetSubjectHierarchyNode (vtkMRMLScene *scene) |
static int | IsTypeOf (const char *type) |
static vtkMRMLSubjectHierarchyNode * | New () |
static vtkMRMLSubjectHierarchyNode * | SafeDownCast (vtkObject *o) |
Static Public Member Functions inherited from vtkMRMLNode | |
static int | IsTypeOf (const char *type) |
static vtkMRMLNode * | SafeDownCast (vtkObject *o) |
Static Public Attributes | |
static const vtkIdType | INVALID_ITEM_ID |
static const std::string | SUBJECTHIERARCHY_NAME_VALUE_SEPARATOR |
static const std::string | SUBJECTHIERARCHY_SEPARATOR |
static const std::string | SUBJECTHIERARCHY_VERSION_ATTRIBUTE_NAME |
Protected Member Functions | |
void | operator= (const vtkMRMLSubjectHierarchyNode &) |
vtkMRMLSubjectHierarchyNode () | |
vtkMRMLSubjectHierarchyNode (const vtkMRMLSubjectHierarchyNode &) | |
~vtkMRMLSubjectHierarchyNode () | |
Protected Member Functions inherited from vtkMRMLNode | |
virtual const char * | GetMRMLAttributeNameFromReferenceRole (const char *refRole) |
Return the mrml attribute name (if found) associated with a reference role. Return 0 otherwise. More... | |
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. More... | |
virtual char * | GetTempURLString () |
void | GetUpdatedReferencedNodeEventList (int &oldReferencedNodeUseCount, int &newReferencedNodeUseCount, vtkIntArray *oldConsolidatedEventList, vtkIntArray *newConsolidatedEventList, vtkMRMLNode *oldReferencedNode, vtkMRMLNode *newReferencedNode, vtkMRMLNodeReference *referenceToIgnore, vtkIntArray *newEvents) |
virtual void | InvalidateNodeReferences () |
virtual bool | IsReferenceRoleGeneric (const char *refRole) |
Return true if the reference role is generic (ends with '/') or false otherwise. More... | |
virtual void | OnNodeReferenceAdded (vtkMRMLNodeReference *reference) |
virtual void | OnNodeReferenceModified (vtkMRMLNodeReference *reference) |
Called when a referenced node pointer is modified. More... | |
virtual void | OnNodeReferenceRemoved (vtkMRMLNodeReference *reference) |
Called when a referenced node pointer is removed (set to NULL). More... | |
void | operator= (const vtkMRMLNode &) |
void | ParseReferencesAttribute (const char *attValue, std::map< std::string, std::string > &references) |
virtual void | SetTempURLString (const char *) |
Get/Set the string used to manage encoding/decoding of strings/URLs with special characters. More... | |
vtkMRMLNode * | UpdateNodeReferenceEventObserver (vtkMRMLNode *oldReferencedNode, vtkMRMLNode *newReferencedNode, vtkIntArray *newEvents, vtkMRMLNodeReference *referenceToIgnore) |
virtual void | UpdateNodeReferences (const char *referenceRole=NULL) |
virtual void | UpdateNthNodeReference (const char *referenceRole, int n) |
vtkMRMLNode () | |
vtkMRMLNode (const vtkMRMLNode &) | |
virtual | ~vtkMRMLNode () |
critical to have a virtual destructor! More... | |
Static Protected Member Functions | |
static void | ItemEventCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
Callback function for all events from the subject hierarchy items. More... | |
Static Protected Member Functions inherited from vtkMRMLNode | |
static void | MRMLCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
Protected Attributes | |
vtkInternal * | Internal |
vtkSmartPointer< vtkCallbackCommand > | ItemEventCallbackCommand |
Command handling events from subject hierarchy items. More... | |
Protected Attributes inherited from vtkMRMLNode | |
int | AddToScene |
AttributesType | Attributes |
char * | Description |
int | HideFromEditors |
char * | ID |
int | InMRMLCallbackFlag |
Flag to avoid event loops. More... | |
vtkCallbackCommand * | MRMLCallbackCommand |
Holders for MRML callbacks. More... | |
vtkObserverManager * | MRMLObserverManager |
char * | Name |
NodeReferenceEventsType | NodeReferenceEvents |
std::map< std::string, std::string > | NodeReferenceMRMLAttributeNames |
NodeReferencesType | NodeReferences |
int | SaveWithScene |
vtkWeakPointer< vtkMRMLScene > | Scene |
int | Selectable |
int | Selected |
Friends | |
class | vtkInternal |
Additional Inherited Members | |
Protected Types inherited from vtkMRMLNode | |
typedef std::map< std::string, std::string > | AttributesType |
typedef std::map< std::string, vtkSmartPointer< vtkIntArray > > | NodeReferenceEventsType |
typedef std::vector< vtkSmartPointer< vtkMRMLNodeReference > > | NodeReferenceListType |
typedef std::map< std::string, NodeReferenceListType > | NodeReferencesType |
MRML node to represent a complete subject hierarchy tree.
There can be only one such node in the scene, as subject hierarchy is to contain all the supported data nodes in the scene, so that the user can navigate the data loaded throughout the session. It is not singleton in either the common or the MRML sense, instead, the subject hierarchy logic makes sure that any added subject hierarchy nodes are merged in the first one, and if the last one is removed, a new one is created. The used subject hierarchy node can be accessed using the static function
The node entries are encapsulated in SubjectHierarchyItem classes, which contain the hierarchy information for the contained nodes, and represent the non-leaf nodes of the tree. Accessor functions can be used to get/set the properties of the individual items.
Definition at line 52 of file vtkMRMLSubjectHierarchyNode.h.
Definition at line 85 of file vtkMRMLSubjectHierarchyNode.h.
anonymous enum |
Enumerator | |
---|---|
SubjectHierarchyItemAddedEvent | |
SubjectHierarchyItemAboutToBeRemovedEvent | |
SubjectHierarchyItemRemovedEvent | |
SubjectHierarchyItemModifiedEvent | |
SubjectHierarchyItemUIDAddedEvent | Event invoked when UID is added to subject hierarchy item. Useful when using UIDs to find related nodes, and the nodes are loaded sequentially in unspecified order. |
SubjectHierarchyItemOwnerPluginSearchRequested | Event invoked when a subject hierarchy item or its data node changed in a way that will influence the best owner plugin. Typically invoked by
|
SubjectHierarchyStartResolveEvent | Event invoked when item resolving starts (e.g. after scene import) |
SubjectHierarchyEndResolveEvent | Event invoked when item resolving finished (e.g. after scene import) |
Definition at line 64 of file vtkMRMLSubjectHierarchyNode.h.
|
protected |
|
protected |
|
protected |
|
virtual |
Copy the node's attributes to this object.
Reimplemented from vtkMRMLNode.
vtkIdType vtkMRMLSubjectHierarchyNode::CreateFolderItem | ( | vtkIdType | parentItemID, |
std::string | name | ||
) |
Convenience function to create folder item in the hierarchy under a specified parent.
parentItemID | Parent item folder which the created item is inserted. If top-level then use |
name | Name of the item. Only used if there is no data node associated |
vtkIdType vtkMRMLSubjectHierarchyNode::CreateHierarchyItem | ( | vtkIdType | parentItemID, |
std::string | name, | ||
std::string | level | ||
) |
Generic function to create hierarchy items of given level. Convenience functions are available for frequently used levels
parentItemID | Parent item under which the created item is inserted. If top-level then use |
name | Name of the item. Only used if there is no data node associated |
level | Level of the hierarchy item. It will be stored as attribute ( |
vtkIdType vtkMRMLSubjectHierarchyNode::CreateItem | ( | vtkIdType | parentItemID, |
vtkMRMLNode * | dataNode | ||
) |
Create subject hierarchy item for a data node. Can be used to add nodes that were not added automatically (e.g. private scene, HideFromEditors on, or exclude attribute set)
parentItemID | Parent item under which the created item is inserted. If top-level then use |
dataNode | Associated data MRML node |
|
virtual |
Create instance of the default node. Like New only virtual.
Implements vtkMRMLNode.
vtkIdType vtkMRMLSubjectHierarchyNode::CreateStudyItem | ( | vtkIdType | parentItemID, |
std::string | name | ||
) |
Convenience function to create study item in the hierarchy under a specified parent.
parentItemID | Parent item under which the created item is inserted |
name | Name of the item. Only used if there is no data node associated |
vtkIdType vtkMRMLSubjectHierarchyNode::CreateSubjectItem | ( | vtkIdType | parentItemID, |
std::string | name | ||
) |
Convenience function to create subject item in the hierarchy under a specified parent.
parentItemID | Parent item under which the created item is inserted. If top-level then use |
name | Name of the item. Only used if there is no data node associated |
|
static |
Deserialize a UID list string (stored in the UID map) into a vector of UID strings.
std::string vtkMRMLSubjectHierarchyNode::GenerateUniqueItemName | ( | std::string | name | ) |
Generate unique item name.
std::string vtkMRMLSubjectHierarchyNode::GetAttributeFromItemAncestor | ( | vtkIdType | itemID, |
std::string | attributeName, | ||
std::string | level = "" |
||
) |
Get attribute value for a item from an upper level in the subject hierarchy
attributeName | Name of the requested attribute |
level | Level of the ancestor item we look for the attribute in (e.g. value of vtkMRMLSubjectHierarchyConstants::GetSubjectHierarchyLevelStudy()). If empty, then look all the way up to the subject and return first attribute found with specified name |
|
virtual |
Reimplemented from vtkMRMLNode.
void vtkMRMLSubjectHierarchyNode::GetDataNodesInBranch | ( | vtkIdType | itemID, |
vtkCollection * | dataNodeCollection, | ||
const char * | childClass = NULL |
||
) |
Find all associated data nodes of a specified class in a branch of the hierarchy. Re-implemented to handle nested associations
itemID | Parent item of the branch |
dataNodeCollection | Collection updated with the list of data nodes |
childClass | Name of the class we are looking for. NULL returns associated data nodes of any kind |
int vtkMRMLSubjectHierarchyNode::GetDisplayVisibilityForBranch | ( | vtkIdType | itemID | ) |
Get subject hierarchy branch visibility
|
inlinestatic |
Python accessor for the invalid ID.
Definition at line 169 of file vtkMRMLSubjectHierarchyNode.h.
vtkIdType vtkMRMLSubjectHierarchyNode::GetItemAncestorAtLevel | ( | vtkIdType | itemID, |
std::string | level | ||
) |
Get ancestor subject hierarchy item at a certain level
level | Level of the ancestor item we start searching. |
std::string vtkMRMLSubjectHierarchyNode::GetItemAttribute | ( | vtkIdType | itemID, |
std::string | attributeName | ||
) |
Get an attribute with a given name for a subject hierarchy item
std::vector<std::string> vtkMRMLSubjectHierarchyNode::GetItemAttributeNames | ( | vtkIdType | itemID | ) |
Get attribute names for a subject hierarchy item
vtkIdType vtkMRMLSubjectHierarchyNode::GetItemByDataNode | ( | vtkMRMLNode * | dataNode | ) |
Get subject hierarchy item associated to a data MRML node
dataNode | The node for which we want the associated hierarchy node |
vtkIdType vtkMRMLSubjectHierarchyNode::GetItemByPositionUnderParent | ( | vtkIdType | parentItemID, |
int | position | ||
) |
Get item under parent by position
vtkIdType vtkMRMLSubjectHierarchyNode::GetItemByUID | ( | const char * | uidName, |
const char * | uidValue | ||
) |
Find subject hierarchy item according to a UID (by exact match)
uidName | UID string to lookup |
uidValue | UID string that needs to exactly match the UID string of the subject hierarchy item |
vtkIdType vtkMRMLSubjectHierarchyNode::GetItemByUIDList | ( | const char * | uidName, |
const char * | uidValue | ||
) |
Find subject hierarchy item according to a UID (by containing). For example find UID in instance UID list
uidName | UID string to lookup |
uidValue | UID string that needs to be contained in the UID string of the subject hierarchy item |
void vtkMRMLSubjectHierarchyNode::GetItemChildren | ( | vtkIdType | itemID, |
std::vector< vtkIdType > & | childIDs, | ||
bool | recursive = false |
||
) |
Get IDs of the children of a subject hierarchy item
childIDs | Output vector containing the children. It will not contain the given item itself. The order of the items is depth-first, in a way that the child of an item in the vector always comes after the item. |
recursive | If false then collect direct children, if true then the whole branch. False by default |
void vtkMRMLSubjectHierarchyNode::GetItemChildren | ( | vtkIdType | itemID, |
vtkIdList * | childIDs, | ||
bool | recursive = false |
||
) |
Python accessibility function to get children of a subject hierarchy item.
vtkIdType vtkMRMLSubjectHierarchyNode::GetItemChildWithName | ( | vtkIdType | parentItemID, |
std::string | name | ||
) |
Get direct child subject hierarchy item with specific name (not recursive)
parent | Parent subject hierarchy item to start from |
name | Name to find |
vtkMRMLNode* vtkMRMLSubjectHierarchyNode::GetItemDataNode | ( | vtkIdType | itemID | ) |
Get data node for a subject hierarchy item Note: There is no setter function because a subject hierarchy item can be associated to only one data node during its lifetime. This is due to simplicity reasons so that plugin search does not need to re-run when item is modified. It is very easy to create a new item for a new data node if needed using
bool vtkMRMLSubjectHierarchyNode::GetItemExpanded | ( | vtkIdType | itemID | ) |
Get expanded flag for a subject hierarchy item.
std::string vtkMRMLSubjectHierarchyNode::GetItemLevel | ( | vtkIdType | itemID | ) |
Convenience function to get level attribute for a subject hierarchy item.
std::string vtkMRMLSubjectHierarchyNode::GetItemName | ( | vtkIdType | itemID | ) |
Get name for a subject hierarchy item
std::string vtkMRMLSubjectHierarchyNode::GetItemOwnerPluginName | ( | vtkIdType | itemID | ) |
Get owner plugin name (role) for a subject hierarchy item.
vtkIdType vtkMRMLSubjectHierarchyNode::GetItemParent | ( | vtkIdType | itemID | ) |
Get ID of the parent of a subject hierarchy item
int vtkMRMLSubjectHierarchyNode::GetItemPositionUnderParent | ( | vtkIdType | itemID | ) |
Get position of item under its parent
std::vector<vtkIdType> vtkMRMLSubjectHierarchyNode::GetItemsReferencedFromItemByDICOM | ( | vtkIdType | itemID | ) |
Get subject hierarchy items that are referenced from a given item by DICOM. Finds the series items that contain the SOP instance UIDs that are listed in the attribute of this item containing the referenced SOP instance UIDs
void vtkMRMLSubjectHierarchyNode::GetItemsReferencedFromItemByDICOM | ( | vtkIdType | itemID, |
vtkIdList * | referencingIdList | ||
) |
Python compatibility method to get items that are referenced from a given item by DICOM.
std::vector<vtkIdType> vtkMRMLSubjectHierarchyNode::GetItemsReferencingItemByDICOM | ( | vtkIdType | itemID | ) |
Get subject hierarchy items that reference a given item by DICOM. Finds the series items that contain the SOP instance UID of the item among their referenced SOP instance UIDs.
void vtkMRMLSubjectHierarchyNode::GetItemsReferencingItemByDICOM | ( | vtkIdType | itemID, |
vtkIdList * | referencingIdList | ||
) |
Python compatibility method to get items that are referenced from a given item by DICOM.
std::string vtkMRMLSubjectHierarchyNode::GetItemUID | ( | vtkIdType | itemID, |
std::string | uidName | ||
) |
Get a UID with a given name
|
virtual |
Get node XML tag name (like Volume, Contour)
Implements vtkMRMLNode.
int vtkMRMLSubjectHierarchyNode::GetNumberOfItemChildren | ( | vtkIdType | itemID, |
bool | recursive = false |
||
) |
Get number of children for an item
recursive | If true, then get total number of items in the branch, only direct children otherwise. False by default |
int vtkMRMLSubjectHierarchyNode::GetNumberOfItems | ( | ) |
Get number of items under the scene, excluding the scene.
vtkMRMLNode* vtkMRMLSubjectHierarchyNode::GetParentDataNode | ( | vtkMRMLNode * | dataNode, |
bool | recursive = false |
||
) |
Get data node associated to the parent of the item associated to a data node.
recursive | Flag determining whether only the direct parent is considered (false), or also further up in the tree (true). Default is false |
vtkIdType vtkMRMLSubjectHierarchyNode::GetSceneItemID | ( | ) |
Get ID of root subject hierarchy item (which can be interpreted as the scene in terms of hierarchy)
|
static |
Get the (practically) singleton subject hierarchy node from MRML scene. Merges subject hierarchy nodes if multiple found, and returns the merged one.
bool vtkMRMLSubjectHierarchyNode::HasItemAttribute | ( | vtkIdType | itemID, |
std::string | attributeName | ||
) |
Determine if a given attribute is present in an item. Especially useful if need to determine whether an attribute value is empty string or the attribute is missing
|
virtual |
Reimplemented from vtkMRMLNode.
bool vtkMRMLSubjectHierarchyNode::IsAnyNodeInBranchTransformed | ( | vtkIdType | itemID, |
vtkMRMLTransformNode * | exceptionNode = NULL |
||
) |
Determine if any of the children of this item is transformed (has a parent transform applied), except for an optionally given node
exceptionNode | The function still returns true if the only applied transform found is this specified node |
bool vtkMRMLSubjectHierarchyNode::IsItemLevel | ( | vtkIdType | itemID, |
std::string | level | ||
) |
Determine if an item is of a certain level
level | Level to check |
bool vtkMRMLSubjectHierarchyNode::IsItemVirtualBranchParent | ( | vtkIdType | itemID | ) |
Determine whether a given item is the parent of a virtual branch (Items in virtual branches are invalid without the parent item, as they represent the item's data node's content, so they are removed automatically when the parent item of the virtual branch is removed)
|
static |
|
staticprotected |
Callback function for all events from the subject hierarchy items.
void vtkMRMLSubjectHierarchyNode::ItemModified | ( | vtkIdType | itemID | ) |
Invoke item modified event (that triggers per-item update in the views). Useful if a property of the item changes that does not originate in the subject hierarchy item (such as visibility or transform of data node)
bool vtkMRMLSubjectHierarchyNode::MoveItem | ( | vtkIdType | itemID, |
vtkIdType | beforeItemID | ||
) |
Move item within the same branch before given item
beforeItemID | Item to move given item before. If INVALID_ITEM_ID then insert to the end |
|
static |
|
protected |
void vtkMRMLSubjectHierarchyNode::PrintItem | ( | vtkIdType | itemID, |
ostream & | os, | ||
vtkIndent | indent | ||
) |
Print subject hierarchy item info on stream.
void vtkMRMLSubjectHierarchyNode::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
|
virtual |
Read item from XML.
void vtkMRMLSubjectHierarchyNode::RemoveAllItems | ( | bool | removeDataNode = false | ) |
Remove all items from hierarchy
removeDataNode | Flag determining whether to remove associated data node from the scene if any. False by default, because as opposed to the method |
bool vtkMRMLSubjectHierarchyNode::RemoveItem | ( | vtkIdType | itemID, |
bool | removeDataNode = true , |
||
bool | recursive = true |
||
) |
Remove subject hierarchy item or branch from the tree
itemID | Item to remove |
removeDataNode | Flag determining whether to remove associated data node from the scene if any. On by default |
recursive | Flag determining whether to remove children recursively (the whole branch). On by default |
bool vtkMRMLSubjectHierarchyNode::RemoveItemAttribute | ( | vtkIdType | itemID, |
std::string | attributeName | ||
) |
Remove attribute from subject hierarchy item
bool vtkMRMLSubjectHierarchyNode::RemoveItemChildren | ( | vtkIdType | itemID, |
bool | removeDataNodes = true , |
||
bool | recursive = true |
||
) |
Remove child items of a subject hierarchy item
itemID | Parent of items to remove |
removeDataNodes | Flag determining whether to remove associated data nodes from the scene if any. On by default |
recursive | Flag determining whether to remove children recursively, or just the direct children. On by default |
bool vtkMRMLSubjectHierarchyNode::ReparentItemByDataNode | ( | vtkIdType | itemID, |
vtkMRMLNode * | newParentNode | ||
) |
Set new parent to a subject hierarchy item under item associated to specified data node
void vtkMRMLSubjectHierarchyNode::RequestOwnerPluginSearch | ( | vtkIdType | itemID | ) |
Invoke SubjectHierarchyItemOwnerPluginSearchRequested event for the item, which results in a search for owner plugin. Typically called after setting an attribute indicating a desired role for the item.
void vtkMRMLSubjectHierarchyNode::RequestOwnerPluginSearch | ( | vtkMRMLNode * | dataNode | ) |
Invoke SubjectHierarchyItemOwnerPluginSearchRequested event for a node in the scene, which results in a search for owner plugin. If the data node is not in the subject hierarchy yet then it will be added. Typically called after setting an attribute indicating a desired role for the item.
|
static |
void vtkMRMLSubjectHierarchyNode::SetDisplayVisibilityForBranch | ( | vtkIdType | itemID, |
int | visible | ||
) |
Set subject hierarchy branch visibility.
void vtkMRMLSubjectHierarchyNode::SetItemAttribute | ( | vtkIdType | itemID, |
std::string | attributeName, | ||
std::string | attributeValue | ||
) |
Add attribute to the subject hierarchy item.
void vtkMRMLSubjectHierarchyNode::SetItemExpanded | ( | vtkIdType | itemID, |
bool | expanded | ||
) |
Set expanded flag for a subject hierarchy item (only for internal use, do not set explicitly)
void vtkMRMLSubjectHierarchyNode::SetItemLevel | ( | vtkIdType | itemID, |
std::string | level | ||
) |
Convenience function to set level attribute for a subject hierarchy item.
void vtkMRMLSubjectHierarchyNode::SetItemName | ( | vtkIdType | itemID, |
std::string | name | ||
) |
Set name for a subject hierarchy item.
void vtkMRMLSubjectHierarchyNode::SetItemOwnerPluginName | ( | vtkIdType | itemID, |
std::string | ownerPluginName | ||
) |
Set owner plugin name (role) for a subject hierarchy item.
void vtkMRMLSubjectHierarchyNode::SetItemParent | ( | vtkIdType | itemID, |
vtkIdType | parentItemID | ||
) |
Set the parent of a subject hierarchy item.
void vtkMRMLSubjectHierarchyNode::SetItemUID | ( | vtkIdType | itemID, |
std::string | uidName, | ||
std::string | uidValue | ||
) |
Set UID to the subject hierarchy item.
|
virtual |
Write this node's body to a MRML file in XML format.
Reimplemented from vtkMRMLNode.
|
virtual |
Write this node's information to a MRML file in XML format.
Reimplemented from vtkMRMLNode.
|
friend |
Definition at line 366 of file vtkMRMLSubjectHierarchyNode.h.
|
protected |
Definition at line 364 of file vtkMRMLSubjectHierarchyNode.h.
|
static |
Definition at line 55 of file vtkMRMLSubjectHierarchyNode.h.
|
protected |
Command handling events from subject hierarchy items.
Definition at line 369 of file vtkMRMLSubjectHierarchyNode.h.
|
static |
Definition at line 59 of file vtkMRMLSubjectHierarchyNode.h.
|
static |
Definition at line 58 of file vtkMRMLSubjectHierarchyNode.h.
|
static |
Definition at line 62 of file vtkMRMLSubjectHierarchyNode.h.