00001 #ifndef __vtkMRMLEMSTemplateNode_h 00002 #define __vtkMRMLEMSTemplateNode_h 00003 00004 #include "vtkMRML.h" 00005 #include "vtkMRMLNode.h" 00006 #include "vtkEMSegment.h" 00007 #include "vtkMRMLScene.h" 00008 00009 class vtkMRMLEMSGlobalParametersNode; 00010 class vtkMRMLEMSTreeNode; 00011 class vtkMRMLEMSAtlasNode; 00012 class vtkMRMLEMSVolumeCollectionNode; 00013 class vtkMRMLEMSWorkingDataNode; 00014 00015 class VTK_EMSEGMENT_EXPORT vtkMRMLEMSTemplateNode : 00016 public vtkMRMLNode 00017 { 00018 public: 00019 static vtkMRMLEMSTemplateNode *New(); 00020 vtkTypeMacro(vtkMRMLEMSTemplateNode,vtkMRMLNode); 00021 void PrintSelf(ostream& os, vtkIndent indent); 00022 00023 virtual vtkMRMLNode* CreateNodeInstance(); 00024 00025 // Description: 00026 // Set node attributes 00027 virtual void ReadXMLAttributes(const char** atts); 00028 00029 // Description: 00030 // Write this node's information to a MRML file in XML format. 00031 virtual void WriteXML(ostream& of, int indent); 00032 00033 // Description: 00034 // Copy the node's attributes to this object 00035 virtual void Copy(vtkMRMLNode *node); 00036 00037 // Description: 00038 // Get node XML tag name (like Volume, Model) 00039 virtual const char* GetNodeTagName() {return "EMSTemplate";} 00040 00041 // Description: 00042 // Updates this node if it depends on other nodes 00043 // when the node is deleted in the scene 00044 virtual void UpdateReferences(); 00045 00046 // Description: 00047 // Update the stored reference to another node in the scene 00048 virtual void UpdateReferenceID(const char *oldID, const char *newID); 00049 00050 // associated parameters nodes 00051 vtkGetStringMacro(TreeNodeID); 00052 vtkSetReferenceStringMacro(TreeNodeID); 00053 vtkMRMLEMSTreeNode* GetTreeNode(); 00054 00055 vtkGetStringMacro(GlobalParametersNodeID); 00056 vtkSetReferenceStringMacro(GlobalParametersNodeID); 00057 vtkMRMLEMSGlobalParametersNode* GetGlobalParametersNode(); 00058 00059 vtkGetStringMacro(SpatialAtlasNodeID); 00060 //BTX 00061 vtkSetReferenceStringMacro(SpatialAtlasNodeID); 00062 //ETX 00063 void SetReferenceSpatialAtlasNodeID(const char* name) 00064 { 00065 this->SetSpatialAtlasNodeID(name); 00066 } 00067 vtkMRMLEMSAtlasNode* GetSpatialAtlasNode(); 00068 00069 vtkGetStringMacro(SubParcellationNodeID); 00070 //BTX 00071 vtkSetReferenceStringMacro(SubParcellationNodeID); 00072 //ETX 00073 void SetReferenceSubParcellationNodeID(const char* name) 00074 { 00075 this->SetSubParcellationNodeID(name); 00076 } 00077 vtkMRMLEMSVolumeCollectionNode* GetSubParcellationNode(); 00078 00079 vtkGetStringMacro (EMSWorkingDataNodeID); 00080 vtkSetReferenceStringMacro(EMSWorkingDataNodeID); 00081 vtkMRMLEMSWorkingDataNode* GetEMSWorkingDataNode(); 00082 00083 protected: 00084 vtkMRMLEMSTemplateNode(); 00085 ~vtkMRMLEMSTemplateNode(); 00086 vtkMRMLEMSTemplateNode(const vtkMRMLEMSTemplateNode&); 00087 void operator=(const vtkMRMLEMSTemplateNode&); 00088 00089 char* TreeNodeID; 00090 char* GlobalParametersNodeID; 00091 char* SpatialAtlasNodeID; 00092 char* SubParcellationNodeID; 00093 char* EMSWorkingDataNodeID; 00094 }; 00095 00096 #endif
1.6.1