From 90f915c4478e0abc5611692c011223ee99620ac8 Mon Sep 17 00:00:00 2001 From: Vivien Delmon Date: Mon, 22 Oct 2012 16:26:37 +0200 Subject: [PATCH] BUG: Problem with absolute paths --- segmentation/clitkAnatomicalFeatureDatabase.txx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.47.1