]> Creatis software - clitk.git/commitdiff
BUG: Problem with absolute paths
authorVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Mon, 22 Oct 2012 14:26:37 +0000 (16:26 +0200)
committerVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Mon, 22 Oct 2012 14:26:37 +0000 (16:26 +0200)
segmentation/clitkAnatomicalFeatureDatabase.txx

index 72e9dcdd06b9293742aa70dac935eb9d58ff4421..dc7c39a6652d9672e44543e317ec22860e1afd3d 100644 (file)
@@ -34,7 +34,10 @@ GetImage(std::string tag, bool reload)
     else {
       std::string s = m_MapOfTag[tag];
       // Read the file
-      image = readImage<ImageType>(GetPath()+"/"+s);
+      if (s[0] != '/')
+        image = readImage<ImageType>(GetPath() + "/" + s);
+      else
+        image = readImage<ImageType>(s);
       // I add a reference count because the cache is not a smartpointer
       image->SetReferenceCount(image->GetReferenceCount()+1);
       // Insert into the cache