X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkAnatomicalFeatureDatabase.txx;h=02907716c64c198674b95699cc15b481a657a201;hb=a595d0ae02a42e1fc87d8cf044243da08e39414c;hp=0a15c6b5631d852323deab7f307318dd1d0ac610;hpb=a339bdc482ea9752ec53195bc9a47e8b05dba582;p=clitk.git diff --git a/segmentation/clitkAnatomicalFeatureDatabase.txx b/segmentation/clitkAnatomicalFeatureDatabase.txx index 0a15c6b..0290771 100644 --- a/segmentation/clitkAnatomicalFeatureDatabase.txx +++ b/segmentation/clitkAnatomicalFeatureDatabase.txx @@ -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 @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html - ======================================================================-====*/ + ===========================================================================**/ //-------------------------------------------------------------------- @@ -54,6 +54,8 @@ SetImage(TagType tag, std::string f, typename ImageType::Pointer image, bool wri { SetImageFilename(tag, f); m_MapOfImage[tag] = &(*image); + // I add a reference count because the cache is not a smartpointer + image->SetReferenceCount(image->GetReferenceCount()+1); if (write) { writeImage(image, f); }