X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkAnatomicalFeatureDatabase.h;h=e3591925216d5fe8b6309fb7c2e30996bf3e934f;hb=87996e8f4484321544564ca443374bd1a519926d;hp=78f04e32a91dbb512f65e680539d39b744f77113;hpb=7afed19d109924974c9467e17be57d04b3d95f91;p=clitk.git diff --git a/segmentation/clitkAnatomicalFeatureDatabase.h b/segmentation/clitkAnatomicalFeatureDatabase.h index 78f04e3..e359192 100644 --- a/segmentation/clitkAnatomicalFeatureDatabase.h +++ b/segmentation/clitkAnatomicalFeatureDatabase.h @@ -21,9 +21,11 @@ // 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 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 + typename ImageType::Pointer GetImage(TagType tag, bool reload=false); + template + void SetImage(TagType tag, + std::string f, + typename ImageType::Pointer image, + bool write=false); + template + void ReleaseImage(TagType tag); + // Set Get Double + void SetDouble(TagType tag, double d); + double GetDouble(TagType tag); + protected: std::string m_Filename; - typedef std::map MapTagType; + typedef itk::ImageBase<3> ImageBaseType; + typedef std::map MapTagType; + typedef std::map MapTagImageType; MapTagType m_MapOfTag; + MapTagImageType m_MapOfImage; }; // end class //-------------------------------------------------------------------- + #include "clitkAnatomicalFeatureDatabase.txx" + } // end namespace clitk //--------------------------------------------------------------------