]> Creatis software - clitk.git/blobdiff - segmentation/clitkAnatomicalFeatureDatabase.h
Extraction of S1RL
[clitk.git] / segmentation / clitkAnatomicalFeatureDatabase.h
index 78f04e32a91dbb512f65e680539d39b744f77113..bd574d384fa3107f7bc5aea8628c65bc893574fd 100644 (file)
@@ -3,7 +3,7 @@
 
   Authors belong to: 
   - University of LYON              http://www.universite-lyon.fr/
-  - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
+  - Léon Bérard cancer center       http://www.centreleonberard.fr
   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
 
   This software is distributed WITHOUT ANY WARRANTY; without even
 
   - BSD        See included LICENSE.txt file
   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-  ======================================================================-====*/
+  ===========================================================================**/
 
 #ifndef CLITKANATOMICALFEATUREDATABASE_H
 #define CLITKANATOMICALFEATUREDATABASE_H
 
 // clitk
 #include "clitkCommon.h"
+#include "clitkImageCommon.h"
 
 namespace clitk {
   
+
   //--------------------------------------------------------------------
   /*
     Class to store and retreive anatomical feature such as 3D
@@ -34,6 +36,8 @@ namespace clitk {
   public:
     AnatomicalFeatureDatabase();
 
+    typedef std::string TagType;
+
     // Set/Get filename 
     itkSetMacro(Filename, std::string);
     itkGetConstMacro(Filename, std::string);
@@ -42,19 +46,42 @@ namespace clitk {
     void Write();
     void Load();
     
-    // Get landmarks
+    // Set Get landmarks
     typedef itk::Point<double,3> PointType3D;
-    void SetPoint3D(std::string tag, PointType3D & p);
-    void GetPoint3D(std::string tag, PointType3D & p);
+    void SetPoint3D(TagType tag, PointType3D & p);
+    void GetPoint3D(TagType tag, PointType3D & p);
+    double GetPoint3D(std::string tag, int dim);
+    bool TagExist(std::string tag);
+    
+    // Set Get image
+    void SetImageFilename(TagType tag, std::string f);
+    template<class ImageType>
+    typename ImageType::Pointer GetImage(TagType tag, bool reload=false);
+    template<class ImageType>
+    void  SetImage(TagType tag, std::string f, typename ImageType::Pointer image, bool write=false);
+    template<class ImageType>
+    void ReleaseImage(TagType tag);
     
+    // Set Get Double
+    void SetDouble(TagType tag, double d);
+    double GetDouble(TagType tag);
+    
+    // Remove Tag
+    void RemoveTag(TagType tag);
+
   protected:
     std::string m_Filename;
-    typedef std::map<std::string, std::string> MapTagType;
+    typedef itk::ImageBase<3> ImageBaseType;
+    typedef std::map<TagType, std::string> MapTagType;
+        typedef std::map<TagType, ImageBaseType*> MapTagImageType; 
     MapTagType m_MapOfTag;
+    MapTagImageType m_MapOfImage;
 
   }; // end class
   //--------------------------------------------------------------------
 
+  #include "clitkAnatomicalFeatureDatabase.txx" 
+
 } // end namespace clitk
 //--------------------------------------------------------------------