From: Vivien Delmon Date: Mon, 22 Oct 2012 14:26:37 +0000 (+0200) Subject: BUG: Problem with absolute paths X-Git-Tag: v1.4.0~239^2~17 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=90f915c4478e0abc5611692c011223ee99620ac8;p=clitk.git BUG: Problem with absolute paths --- 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