]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.cxx
DFCH: ManualPaint- imageUNDOREDO (Undo now working but still some big changes to...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / imageUndoRedo / imageInfoUR.cxx
index 263bce86e31e90fed1592bef4f245f485f92bedb..c00e9725c8838d6ff4ecf72f2b58350f59a5de8b 100755 (executable)
@@ -50,6 +50,7 @@ void ImageInfoUR::RemoveImageFromMemory(const StringType& gPath) {
 }
 void ImageInfoUR::LoadImageMHDToMemory(const StringType& gPath) {
        StringType filename = gPath + this->m_ImageName;
+       filename.append(".mhd");
        VTKMetaImageReaderPointerType reader = VTKMetaImageReaderPointerType::New();
        reader->SetFileName(filename.c_str());
        this->m_Image = reader->GetOutput();
@@ -59,6 +60,7 @@ void ImageInfoUR::LoadImageMHDToMemory(const StringType& gPath) {
 void ImageInfoUR::SaveImageAsMHD(const StringType& gPath) {
        this->m_OnDisk = true;
        StringType filename = gPath + this->m_ImageName;
+       filename.append(".mhd");
        //managing temporary files
        mkstemp((char*) filename.c_str());
        VTKMetaImageWriterPointerType w = VTKMetaImageWriterPointerType::New();
@@ -70,8 +72,11 @@ 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;
+       filename.append(".mhd");
+       StringType filenameRaw = gPath + this->m_ImageName;
+       filenameRaw.append(".raw");
+       mkstemp((char*) filenameRaw.c_str());
        unlink((char*) filename.c_str());
+       unlink((char*) filenameRaw.c_str());
 }