X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkAnatomicalFeatureDatabase.txx;h=dc7c39a6652d9672e44543e317ec22860e1afd3d;hb=56ae68bbe5b50ad1ea8b6846f43f322d4aa36b70;hp=72e9dcdd06b9293742aa70dac935eb9d58ff4421;hpb=fb01ed73088a1440263acba4cad589b15e180eef;p=clitk.git diff --git a/segmentation/clitkAnatomicalFeatureDatabase.txx b/segmentation/clitkAnatomicalFeatureDatabase.txx index 72e9dcd..dc7c39a 100644 --- a/segmentation/clitkAnatomicalFeatureDatabase.txx +++ b/segmentation/clitkAnatomicalFeatureDatabase.txx @@ -34,7 +34,10 @@ GetImage(std::string tag, bool reload) else { std::string s = m_MapOfTag[tag]; // Read the file - image = readImage(GetPath()+"/"+s); + if (s[0] != '/') + image = readImage(GetPath() + "/" + s); + else + image = readImage(s); // I add a reference count because the cache is not a smartpointer image->SetReferenceCount(image->GetReferenceCount()+1); // Insert into the cache