14 #include "Poco/Zip/Decompress.h" 15 #include "Poco/Path.h" 16 #include "Poco/File.h" 24 #include <Poco/Exception.h> 27 #include "mitkIGTException.h" 28 #include "mitkIGTIOException.h" 44 if (myFile.exists()) myFile.remove();
61 for (i=0; cont==
true; i++)
65 mitk::NavigationTool::Pointer readTool = myReader->DoRead(fileName);
66 if (readTool.IsNull()) cont =
false;
67 else returnValue->AddTool(readTool);
69 std::remove(fileName.c_str());
74 m_ErrorMessage =
"Error: did not find any tool. \n Is this a tool storage file?";
83 std::stringstream out;
91 std::ifstream file( filename.c_str(), std::ios::binary );
100 Poco::Zip::Decompress unzipper( file, Poco::Path( path ) );
101 unzipper.decompressAllFiles();
105 catch(
const Poco::IllegalStateException&)
107 m_ErrorMessage =
"Error: wrong file format! \n (please only load tool storage files)";
static std::string GetTempPath()
An object of this class represents an exception of the MITK-IGT module.
static std::string CreateTemporaryDirectory(const std::string &templateName="XXXXXX", std::string path=std::string())
#define mitkThrowException(classname)