68 bool operator<(
const SaveInfo &other)
const;
88 static std::string GetProgramPath();
95 static std::string GetTempPath();
102 static char GetDirectorySeparator();
124 static std::string CreateTemporaryFile(std::ofstream &tmpStream,
125 const std::string &templateName =
"XXXXXX",
126 std::string path = std::string());
150 static std::string CreateTemporaryFile(std::ofstream &tmpStream,
151 std::ios_base::openmode mode,
152 const std::string &templateName =
"XXXXXX",
153 std::string path = std::string());
175 static std::string CreateTemporaryFile(
const std::string &templateName =
"XXXXXX",
176 std::string path = std::string());
194 static std::string CreateTemporaryDirectory(
const std::string &templateName =
"XXXXXX",
195 std::string path = std::string());
216 static std::vector<BaseData::Pointer> Load(
const std::string &path);
218 static std::vector<BaseData::Pointer> Load(
const std::string &path,
const IFileReader::Options &options);
233 static std::vector<BaseData::Pointer> Load(
const std::vector<std::string> &paths);
326 static void Save(
const mitk::BaseData *data,
const std::string &path);
353 const std::string &mimeType,
354 const std::string &path,
355 bool addExtension =
true);
371 const std::string &mimeType,
372 const std::string &path,
374 bool addExtension =
true);
386 static void Save(std::vector<SaveInfo> &saveInfos);
438 virtual bool operator()(
LoadInfo &loadInfo) = 0;
443 virtual bool operator()(
SaveInfo &saveInfo) = 0;
446 static std::string Load(std::vector<LoadInfo> &loadInfos,
451 static std::string Save(
const BaseData *data,
452 const std::string &mimeType,
453 const std::string &path,
464 #endif // MITKIOUTIL_H
Data management class that handles 'was created by' relations.
itk::SmartPointer< Self > Pointer
FileWriterSelector m_WriterSelector
Contains a set of IFileWriter objects.
itk::VectorContainer< unsigned int, mitk::DataNode::Pointer > SetOfObjects
A Container of objects that is used as a result set of GetSubset() query operations (Set of...
Base of all data objects.
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.
The MimeType class represens a registered mime-type. It is an immutable wrapper for mitk::CustomMimeT...
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)
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 void SaveImage(std::string fileName, mitk::Image *image, std::string fileType)
Save images according to file type.