29 #if !defined(MITK_WINDOWS_NO_UNDEF) && defined(GetTempPath)
75 virtual bool operator()(
LoadInfo &loadInfo)
const = 0;
103 virtual bool operator()(
SaveInfo &saveInfo)
const = 0;
111 static std::string GetProgramPath();
118 static std::string GetTempPath();
125 static char GetDirectorySeparator();
147 static std::string CreateTemporaryFile(std::ofstream &tmpStream,
148 const std::string &templateName =
"XXXXXX",
149 std::string path = std::string());
173 static std::string CreateTemporaryFile(std::ofstream &tmpStream,
174 std::ios_base::openmode mode,
175 const std::string &templateName =
"XXXXXX",
176 std::string path = std::string());
198 static std::string CreateTemporaryFile(
const std::string &templateName =
"XXXXXX",
199 std::string path = std::string());
217 static std::string CreateTemporaryDirectory(
const std::string &templateName =
"XXXXXX",
218 std::string path = std::string());
236 static DataStorage::SetOfObjects::Pointer Load(
const std::string &path,
DataStorage &storage,
254 static DataStorage::SetOfObjects::Pointer Load(
const std::string &path,
273 static std::vector<BaseData::Pointer> Load(
const std::string &path,
276 template <
typename T>
279 return dynamic_cast<T*
>(Load(path, optionsCallback).at(0).GetPointer());
296 static std::vector<BaseData::Pointer> Load(
const std::string &path,
const IFileReader::Options &options);
298 template <
typename T>
301 return dynamic_cast<T*
>(Load(path, options).at(0).GetPointer());
318 static DataStorage::SetOfObjects::Pointer Load(
const std::vector<std::string> &paths,
DataStorage &storage,
319 const ReaderOptionsFunctorBase *optionsCallback =
nullptr);
321 static std::vector<BaseData::Pointer> Load(
const std::vector<std::string> &paths,
322 const ReaderOptionsFunctorBase *optionsCallback =
nullptr);
334 std::ios_base::openmode mode = std::ios_base::in);
336 template <
typename T>
339 return dynamic_cast<T*
>(Load(usResource, mode).at(0).GetPointer());
354 static void Save(
const mitk::BaseData *data,
const std::string &path,
bool setPathProperty =
false);
383 const std::string &mimeType,
384 const std::string &path,
385 bool addExtension =
true,
386 bool setPathProperty =
false);
403 const std::string &mimeType,
404 const std::string &path,
406 bool addExtension =
true,
407 bool setPathProperty =
false);
420 static void Save(std::vector<SaveInfo> &saveInfos,
bool setPathProperty =
false);
423 static std::string Load(std::vector<LoadInfo> &loadInfos,
426 const ReaderOptionsFunctorBase *optionsCallback);
428 static std::string Save(
const BaseData *data,
429 const std::string &mimeType,
430 const std::string &path,
431 WriterOptionsFunctorBase *optionsCallback,
433 bool setPathProperty);
435 static std::string Save(std::vector<SaveInfo> &saveInfos,
436 WriterOptionsFunctorBase *optionsCallback,
437 bool setPathProperty);