67 virtual bool operator()(
LoadInfo &loadInfo)
const = 0;
74 bool operator<(
const SaveInfo &other)
const;
95 virtual bool operator()(
SaveInfo &saveInfo)
const = 0;
103 static std::string GetProgramPath();
110 static std::string GetTempPath();
117 static char GetDirectorySeparator();
139 static std::string CreateTemporaryFile(std::ofstream &tmpStream,
140 const std::string &templateName =
"XXXXXX",
141 std::string path = std::string());
165 static std::string CreateTemporaryFile(std::ofstream &tmpStream,
166 std::ios_base::openmode mode,
167 const std::string &templateName =
"XXXXXX",
168 std::string path = std::string());
190 static std::string CreateTemporaryFile(
const std::string &templateName =
"XXXXXX",
191 std::string path = std::string());
209 static std::string CreateTemporaryDirectory(
const std::string &templateName =
"XXXXXX",
210 std::string path = std::string());
228 static DataStorage::SetOfObjects::Pointer Load(
const std::string &path,
DataStorage &storage,
246 static DataStorage::SetOfObjects::Pointer Load(
const std::string &path,
265 static std::vector<BaseData::Pointer> Load(
const std::string &path,
268 template <
typename T>
271 return dynamic_cast<T*
>(Load(path, optionsCallback).at(0).GetPointer());
288 static std::vector<BaseData::Pointer> Load(
const std::string &path,
const IFileReader::Options &options);
290 template <
typename T>
293 return dynamic_cast<T*
>(Load(path, options).at(0).GetPointer());
310 static DataStorage::SetOfObjects::Pointer Load(
const std::vector<std::string> &paths,
DataStorage &storage,
313 static std::vector<BaseData::Pointer> Load(
const std::vector<std::string> &paths,
326 std::ios_base::openmode mode = std::ios_base::in);
328 template <
typename T>
331 return dynamic_cast<T*
>(Load(usResource, mode).at(0).GetPointer());
344 static void Save(
const mitk::BaseData *data,
const std::string &path,
bool setPathProperty =
false);
373 const std::string &mimeType,
374 const std::string &path,
375 bool addExtension =
true,
376 bool setPathProperty =
false);
393 const std::string &mimeType,
394 const std::string &path,
396 bool addExtension =
true,
397 bool setPathProperty =
false);
410 static void Save(std::vector<SaveInfo> &saveInfos,
bool setPathProperty =
false);
413 static std::string Load(std::vector<LoadInfo> &loadInfos,
418 static std::string Save(
const BaseData *data,
419 const std::string &mimeType,
420 const std::string &path,
423 bool setPathProperty);
425 static std::string Save(std::vector<SaveInfo> &saveInfos,
427 bool setPathProperty);
434 #endif // MITKIOUTIL_H
Data management class that handles 'was created by' relations.
FileWriterSelector m_WriterSelector
Contains a set of IFileWriter objects.
Base of all data objects.
static T::Pointer Load(const us::ModuleResource &usResource, std::ios_base::openmode mode=std::ios_base::in)
bool operator<(const StaticParameterMap::ValueType &a, const StaticParameterMap::ValueType &b)
Compares two var lists and returns true if the first list's first item is lower than the second one's...
DataCollection - Class to facilitate loading/accessing structured data.
std::map< std::string, us::Any > Options
Options for reading or writing data.
const BaseData * m_BaseData
The BaseData object to save.
std::vector< BaseData::Pointer > m_Output
MimeType m_MimeType
The selected mime-type, used to restrict results from FileWriterSelector.
A utility class to load and save data from/to the local file system.
itk::VectorContainer< unsigned int, DataNode::Pointer > SetOfObjects
A Container of objects that is used as a result set of GetSubset() query operations (Set of...
The MimeType class represens a registered mime-type. It is an immutable wrapper for mitk::CustomMimeT...
bool m_Cancel
Flag indicating if sub-sequent save operations are to be canceled.
FileReaderSelector m_ReaderSelector
std::string m_Path
The path to write the BaseData object to.
static T::Pointer Load(const std::string &path, const IFileReader::Options &options)
static T::Pointer Load(const std::string &path, const ReaderOptionsFunctorBase *optionsCallback=nullptr)