55 decompressFiles(filename,m_tempDirectory);
58 mitk::NavigationToolStorage::Pointer returnValue = mitk::NavigationToolStorage::New(m_DataStorage);
61 for (i=0; cont==
true; i++)
63 std::string fileName = m_tempDirectory + Poco::Path::separator() +
"NavigationTool" + convertIntToString(i) +
".tool";
64 mitk::NavigationToolReader::Pointer myReader = mitk::NavigationToolReader::New();
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?";
75 mitkThrowException(
mitk::IGTException)<<
"Error: did not find any tool. \n Is this a tool storage file?";
91 std::ifstream file( filename.c_str(), std::ios::binary );
94 m_ErrorMessage =
"Cannot open '" + filename +
"' for reading";
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)";