X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FimageUndoRedo%2FimageInfoUR.cxx;fp=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FimageUndoRedo%2FimageInfoUR.cxx;h=263bce86e31e90fed1592bef4f245f485f92bedb;hb=825f47d7d281a359e9fec03de88e7db58e9e49ff;hp=d788dbc06ebc9d5aea9963ba9b8b546a9be2dea8;hpb=ada3e60bcd998550327dac4f95b65f0c113f063b;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.cxx index d788dbc..263bce8 100755 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.cxx @@ -59,6 +59,8 @@ void ImageInfoUR::LoadImageMHDToMemory(const StringType& gPath) { void ImageInfoUR::SaveImageAsMHD(const StringType& gPath) { this->m_OnDisk = true; StringType filename = gPath + this->m_ImageName; + //managing temporary files + mkstemp((char*) filename.c_str()); VTKMetaImageWriterPointerType w = VTKMetaImageWriterPointerType::New(); w->SetInput(this->m_Image); w->SetCompression(false); @@ -68,5 +70,8 @@ void ImageInfoUR::SaveImageAsMHD(const StringType& gPath) { } void ImageInfoUR::RemoveImageFromDisk(const StringType& gPath) { - + std::cout << "Borrando archivo" << endl; + StringType filename = gPath + this->m_ImageName; + std::cout << filename << std::endl; + unlink((char*) filename.c_str()); }