]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.cxx
DFCH
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / imageUndoRedo / imageInfoUR.cxx
index d788dbc06ebc9d5aea9963ba9b8b546a9be2dea8..263bce86e31e90fed1592bef4f245f485f92bedb 100755 (executable)
@@ -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());
 }