X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkAnatomicalFeatureDatabase.txx;h=dc7c39a6652d9672e44543e317ec22860e1afd3d;hb=2d9ef51e893a0b5b93d44a88594c9c76e4b61239;hp=72e9dcdd06b9293742aa70dac935eb9d58ff4421;hpb=0a19d346a86d286a63b37146e1c985f552243a5e;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