|
Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Registered MRML node classes of a scene. More...
#include <Libs/MRML/Core/vtkMRMLNodeFactory.h>


Public Types | |
| enum | { NodeClassRegisteredEvent = vtkCommand::UserEvent + 1 } |
| typedef vtkObject | Superclass |
Public Member Functions | |
| void | CopyRegisteredNodeClasses (vtkMRMLNodeFactory *sourceFactory) |
| vtkMRMLNode * | CreateNodeByClass (const char *className) |
| virtual const char * | GetClassName () |
| const char * | GetClassNameByTag (const char *tagName) |
| std::string | GetNthRegisteredAbstractNodeClassName (int n) |
| Get the class name of the nth registered abstract node class. | |
| std::string | GetNthRegisteredAbstractNodeTypeDisplayName (int n) |
| Get the type display name of the nth registered abstract node class. | |
| vtkMRMLNode * | GetNthRegisteredNodeClass (int n) |
| Get the prototype of the nth registered node class. Returns nullptr if n is out of range. | |
| int | GetNumberOfRegisteredAbstractNodeClasses () |
| Get the number of registered abstract node classes. | |
| int | GetNumberOfRegisteredNodeClasses () |
| Get the number of registered node classes. | |
| const char * | GetTagByClassName (const char *className) |
| std::string | GetTypeDisplayNameByClassName (const std::string &className) |
| Get the type name shown in the GUI. Returns empty string if the class is not registered. | |
| virtual int | IsA (const char *type) |
| bool | IsNodeClassRegistered (const std::string &className) |
| Return true if className is a registered node class. | |
| void | PrintSelf (ostream &os, vtkIndent indent) override |
| void | RegisterAbstractNodeClass (const std::string &className, const std::string &typeDisplayName) |
| Register type display name of an abstract node class (e.g., "Volume"), for node selectors. | |
| void | RegisterCoreNodeClasses () |
| Register the built-in node classes of the MRML core library. | |
| void | RegisterNodeClass (vtkMRMLNode *node) |
| Register a node class with the node's GetNodeTagName() as tag. | |
| void | RegisterNodeClass (vtkMRMLNode *node, const char *tagName) |
Static Public Member Functions | |
| static int | IsTypeOf (const char *type) |
| static vtkMRMLNodeFactory * | New () |
| static vtkMRMLNodeFactory * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
| void | operator= (const vtkMRMLNodeFactory &)=delete |
| vtkMRMLNodeFactory () | |
| vtkMRMLNodeFactory (const vtkMRMLNodeFactory &)=delete | |
| ~vtkMRMLNodeFactory () override | |
Protected Attributes | |
| std::map< std::string, std::string > | RegisteredAbstractNodeClassTypeDisplayNames |
| std::vector< vtkMRMLNode * > | RegisteredNodeClasses |
| std::vector< std::string > | RegisteredNodeTags |
Registered MRML node classes of a scene.
Stores a prototype instance of each registered node class, used for creating nodes by class name or XML tag.
It can be shared between scenes (see vtkMRMLScene::SetNodeFactory()), to allow creating scenes without instantiating a prototype of all the node classes. This is useful when a large number of scene nodes need to be created, for example for storing scene views.
Definition at line 44 of file vtkMRMLNodeFactory.h.
| typedef vtkObject vtkMRMLNodeFactory::Superclass |
Definition at line 48 of file vtkMRMLNodeFactory.h.
| anonymous enum |
| Enumerator | |
|---|---|
| NodeClassRegisteredEvent | Invoked when a node class or an abstract node class is registered. |
Definition at line 51 of file vtkMRMLNodeFactory.h.
|
protected |
|
overrideprotected |
|
protecteddelete |
| void vtkMRMLNodeFactory::CopyRegisteredNodeClasses | ( | vtkMRMLNodeFactory * | sourceFactory | ) |
Register node classes of sourceFactory whose tag is not registered in this factory yet. Prototypes are shared, not copied.
| vtkMRMLNode * vtkMRMLNodeFactory::CreateNodeByClass | ( | const char * | className | ) |
Create a new node of the specified class (falls back to vtkObjectFactory for unregistered classes). The caller must delete the returned node. Returns nullptr on failure.
|
virtual |
| const char * vtkMRMLNodeFactory::GetClassNameByTag | ( | const char * | tagName | ) |
Get class name of the node class registered with the specified XML tag. Returns nullptr if no node class is registered with this tag.
| std::string vtkMRMLNodeFactory::GetNthRegisteredAbstractNodeClassName | ( | int | n | ) |
Get the class name of the nth registered abstract node class.
| std::string vtkMRMLNodeFactory::GetNthRegisteredAbstractNodeTypeDisplayName | ( | int | n | ) |
Get the type display name of the nth registered abstract node class.
| vtkMRMLNode * vtkMRMLNodeFactory::GetNthRegisteredNodeClass | ( | int | n | ) |
Get the prototype of the nth registered node class. Returns nullptr if n is out of range.
| int vtkMRMLNodeFactory::GetNumberOfRegisteredAbstractNodeClasses | ( | ) |
Get the number of registered abstract node classes.
| int vtkMRMLNodeFactory::GetNumberOfRegisteredNodeClasses | ( | ) |
Get the number of registered node classes.
| const char * vtkMRMLNodeFactory::GetTagByClassName | ( | const char * | className | ) |
Get XML tag of the specified node class. Returns nullptr if the node class is not registered.
| std::string vtkMRMLNodeFactory::GetTypeDisplayNameByClassName | ( | const std::string & | className | ) |
Get the type name shown in the GUI. Returns empty string if the class is not registered.
|
virtual |
| bool vtkMRMLNodeFactory::IsNodeClassRegistered | ( | const std::string & | className | ) |
Return true if className is a registered node class.
|
static |
|
static |
|
protecteddelete |
|
override |
| void vtkMRMLNodeFactory::RegisterAbstractNodeClass | ( | const std::string & | className, |
| const std::string & | typeDisplayName ) |
Register type display name of an abstract node class (e.g., "Volume"), for node selectors.
| void vtkMRMLNodeFactory::RegisterCoreNodeClasses | ( | ) |
Register the built-in node classes of the MRML core library.
| void vtkMRMLNodeFactory::RegisterNodeClass | ( | vtkMRMLNode * | node | ) |
Register a node class with the node's GetNodeTagName() as tag.
| void vtkMRMLNodeFactory::RegisterNodeClass | ( | vtkMRMLNode * | node, |
| const char * | tagName ) |
Register a node class, using node as prototype. If tagName is nullptr then the node's GetNodeTagName() is used. A class already registered with the same tag is replaced.
|
static |
|
protected |
Definition at line 112 of file vtkMRMLNodeFactory.h.
|
protected |
Definition at line 110 of file vtkMRMLNodeFactory.h.
|
protected |
Definition at line 111 of file vtkMRMLNodeFactory.h.