Authors belong to:
- University of LYON http://www.universite-lyon.fr/
- - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
+ - Léon Bérard cancer center http://www.centreleonberard.fr
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
This software is distributed WITHOUT ANY WARRANTY; without even
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- ======================================================================-====*/
+ ===========================================================================**/
//--------------------------------------------------------------------
else {
std::string s = m_MapOfTag[tag];
// Read the file
- image = readImage<ImageType>(s);
+ image = readImage<ImageType>(GetPath()+"/"+s);
// I add a reference count because the cache is not a smartpointer
image->SetReferenceCount(image->GetReferenceCount()+1);
// Insert into the cache
{
SetImageFilename(tag, f);
m_MapOfImage[tag] = &(*image);
+ // I add a reference count because the cache is not a smartpointer
+ image->SetReferenceCount(image->GetReferenceCount()+1);
if (write) {
writeImage<ImageType>(image, f);
}
}
else {
typename ImageType::Pointer image = GetImage<ImageType>(tag);
- DD(image->GetReferenceCount());
image->SetReferenceCount(image->GetReferenceCount()-1);
m_MapOfImage.erase(tag);
}