vtkMRMLEMSVolumeCollectionNode.h

Go to the documentation of this file.
00001 #ifndef __vtkMRMLEMSVolumeCollectionNode_h
00002 #define __vtkMRMLEMSVolumeCollectionNode_h
00003 
00004 #include "vtkMRML.h"
00005 #include "vtkMRMLEMSCollectionNode.h"
00006 #include "vtkEMSegment.h"
00007 #include "vtkMRMLVolumeNode.h"
00008 #include <list>
00009 #include <map>
00010 
00011 // Most things are kept for legacy 
00012 class VTK_EMSEGMENT_EXPORT vtkMRMLEMSVolumeCollectionNode : 
00013   public vtkMRMLEMSCollectionNode
00014 {
00015 public:
00016   static vtkMRMLEMSVolumeCollectionNode *New();
00017   vtkTypeMacro(vtkMRMLEMSVolumeCollectionNode,vtkMRMLNode);
00018   virtual vtkMRMLNode* CreateNodeInstance();
00019 
00020   // Description:
00021   // Set node attributes - for legacy purposes 
00022   virtual void ReadXMLAttributes(const char** atts);
00023 
00024   // Description:
00025   // clone the volumes of rhs
00026   virtual void CloneVolumes(const vtkMRMLNode *node, const char* addPostFix);
00027 
00028   // Description:
00029   // Get node XML tag name (like Volume, Model)
00030   virtual const char* GetNodeTagName() {return "EMSVolumeCollection";}
00031 
00032   // Returns 1 if volume was added or 0 if the mapping between key and volumeNodeID existed 
00033   virtual int   AddVolume(const char* key, const char* volumeNodeID)
00034   {
00035     return this->AddNode(key,volumeNodeID);
00036   }
00037   virtual int    GetNumberOfVolumes() const  
00038   {
00039     return this->GetNumberOfNodes();
00040   }
00041 
00042   virtual void   RemoveAllVolumes()
00043   {
00044     this->RemoveAllNodes();
00045   }
00046   virtual void   RemoveVolumeByKey(const char* key) 
00047   {
00048     this->RemoveNodeByKey(key);
00049   }
00050   virtual void   RemoveVolumeByNodeID(const char* key)
00051   {
00052     this->RemoveNodeByNodeID(key);
00053   }
00054   virtual void   RemoveNthVolume(int n)
00055   {
00056     this->RemoveNthNode(n);
00057   }
00058 
00059   virtual const char*        GetVolumeNodeIDByKey(const char* key) const
00060   {
00061     return this->GetNodeIDByKey(key);
00062   }
00063   virtual const char*        GetKeyByVolumeNodeID(const char* nodeID) const
00064   {
00065     return this->GetKeyByVolumeNodeID(nodeID);
00066   }
00067 
00068   virtual int                GetIndexByVolumeNodeID(const char* nodeID) const
00069   {
00070     return this->GetIndexByNodeID(nodeID);
00071   }
00072 
00073   virtual const char*        GetNthVolumeNodeID(int n) const
00074   {
00075     return this->GetNthNodeID(n);
00076   }
00077 
00078   virtual void               SetNthVolumeNodeID(int n, const char* nodeID)
00079   {
00080     this->SetNthNodeID(n, nodeID);
00081   }
00082 
00083   virtual vtkMRMLVolumeNode* GetNthVolumeNode(int n) const;
00084 
00085   virtual void  MoveNthVolume(int n, int toIndex)
00086   {
00087     this->MoveNthNode(n, toIndex);
00088   }
00089 
00090 protected:
00091   vtkMRMLEMSVolumeCollectionNode();
00092   ~vtkMRMLEMSVolumeCollectionNode();
00093   vtkMRMLEMSVolumeCollectionNode(const vtkMRMLEMSVolumeCollectionNode&);
00094   void operator=(const vtkMRMLEMSVolumeCollectionNode&);
00095 
00096 };
00097 
00098 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1