30 #if !defined(MITK_WINDOWS_NO_UNDEF) && defined(GetTempPath)
76 virtual bool operator()(
LoadInfo &loadInfo)
const = 0;
104 virtual bool operator()(
SaveInfo &saveInfo)
const = 0;
112 static std::string GetProgramPath();
127 static fs::path GetAppBundlePath(AppBundlePath path = AppBundlePath::Parent);
134 static std::string GetTempPath();
141 static char GetDirectorySeparator();
163 static std::string CreateTemporaryFile(std::ofstream &tmpStream,
164 const std::string &templateName =
"XXXXXX",
165 std::string path = std::string());
189 static std::string CreateTemporaryFile(std::ofstream &tmpStream,
190 std::ios_base::openmode mode,
191 const std::string &templateName =
"XXXXXX",
192 std::string path = std::string());
214 static std::string CreateTemporaryFile(
const std::string &templateName =
"XXXXXX",
215 std::string path = std::string());
233 static std::string CreateTemporaryDirectory(
const std::string &templateName =
"XXXXXX",
234 std::string path = std::string());
252 static DataStorage::SetOfObjects::Pointer Load(
const std::string &path,
DataStorage &storage,
253 const ReaderOptionsFunctorBase *optionsCallback =
nullptr);
270 static DataStorage::SetOfObjects::Pointer Load(
const std::string &path,
289 static std::vector<BaseData::Pointer> Load(
const std::string &path,
290 const ReaderOptionsFunctorBase *optionsCallback =
nullptr);
292 template <
typename T>
295 return dynamic_cast<T*
>(Load(path, optionsCallback).at(0).GetPointer());
312 static std::vector<BaseData::Pointer> Load(
const std::string &path,
const IFileReader::Options &options);
314 template <
typename T>
317 return dynamic_cast<T*
>(Load(path, options).at(0).GetPointer());
334 static DataStorage::SetOfObjects::Pointer Load(
const std::vector<std::string> &paths,
DataStorage &storage,
335 const ReaderOptionsFunctorBase *optionsCallback =
nullptr);
337 static std::vector<BaseData::Pointer> Load(
const std::vector<std::string> &paths,
338 const ReaderOptionsFunctorBase *optionsCallback =
nullptr);
350 std::ios_base::openmode mode = std::ios_base::in);
352 template <
typename T>
355 return dynamic_cast<T*
>(Load(usResource, mode).at(0).GetPointer());
370 static void Save(
const mitk::BaseData *data,
const std::string &path,
bool setPathProperty =
false);
399 const std::string &mimeType,
400 const std::string &path,
401 bool addExtension =
true,
402 bool setPathProperty =
false);
419 const std::string &mimeType,
420 const std::string &path,
422 bool addExtension =
true,
423 bool setPathProperty =
false);
436 static void Save(std::vector<SaveInfo> &saveInfos,
bool setPathProperty =
false);
439 static std::string Load(std::vector<LoadInfo> &loadInfos,
442 const ReaderOptionsFunctorBase *optionsCallback);
444 static std::string Save(
const BaseData *data,
445 const std::string &mimeType,
446 const std::string &path,
447 WriterOptionsFunctorBase *optionsCallback,
449 bool setPathProperty);
451 static std::string Save(std::vector<SaveInfo> &saveInfos,
452 WriterOptionsFunctorBase *optionsCallback,
453 bool setPathProperty);