30 #if !defined(MITK_WINDOWS_NO_UNDEF) && defined(GetTempPath)
164 const std::string &templateName =
"XXXXXX",
165 std::string path = std::string());
190 std::ios_base::openmode mode,
191 const std::string &templateName =
"XXXXXX",
192 std::string path = std::string());
215 std::string path = std::string());
234 std::string path = std::string());
252 static DataStorage::SetOfObjects::Pointer
Load(
const std::string &path,
DataStorage &storage,
270 static DataStorage::SetOfObjects::Pointer
Load(
const std::string &path,
289 static std::vector<BaseData::Pointer>
Load(
const std::string &path,
292 template <
typename T>
295 return dynamic_cast<T*
>(Load(path, optionsCallback).at(0).GetPointer());
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,
337 static std::vector<BaseData::Pointer>
Load(
const std::vector<std::string> &paths,
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());
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,
445 const std::string &mimeType,
446 const std::string &path,
449 bool setPathProperty);
451 static std::string
Save(std::vector<SaveInfo> &saveInfos,
453 bool setPathProperty);
Base of all data objects.
Data management class that handles 'was created by' relations.
itk::VectorContainer< unsigned int, DataNode::Pointer > SetOfObjects
A Container of objects that is used as a result set of GetSubset() query operations (Set of.
A utility class to load and save data from/to the local file system.
static BaseData::Pointer Load(const std::string &path, const PropertyList *properties)
static std::string Save(std::vector< SaveInfo > &saveInfos, WriterOptionsFunctorBase *optionsCallback, bool setPathProperty)
static void Save(const mitk::BaseData *data, const std::string &path, bool setPathProperty=false)
Save a mitk::BaseData instance.
static T::Pointer Load(const std::string &path, const ReaderOptionsFunctorBase *optionsCallback=nullptr)
static std::string CreateTemporaryFile(std::ofstream &tmpStream, std::ios_base::openmode mode, const std::string &templateName="XXXXXX", std::string path=std::string())
static void Save(std::vector< SaveInfo > &saveInfos, bool setPathProperty=false)
Use SaveInfo objects to save BaseData instances.
static std::vector< BaseData::Pointer > Load(const us::ModuleResource &usResource, std::ios_base::openmode mode=std::ios_base::in)
Loads the contents of a us::ModuleResource and returns the corresponding mitk::BaseData.
static DataStorage::SetOfObjects::Pointer Load(const std::vector< std::string > &paths, DataStorage &storage, const ReaderOptionsFunctorBase *optionsCallback=nullptr)
Loads a list of file paths into the given DataStorage.
static std::string CreateTemporaryDirectory(const std::string &templateName="XXXXXX", std::string path=std::string())
static std::vector< BaseData::Pointer > Load(const std::string &path, const IFileReader::Options &options)
Load a file and return the loaded data.
static char GetDirectorySeparator()
static void Save(const mitk::BaseData *data, const std::string &mimeType, const std::string &path, const mitk::IFileWriter::Options &options, bool addExtension=true, bool setPathProperty=false)
Save a mitk::BaseData instance.
static std::string CreateTemporaryFile(std::ofstream &tmpStream, const std::string &templateName="XXXXXX", std::string path=std::string())
static std::vector< BaseData::Pointer > Load(const std::string &path, const ReaderOptionsFunctorBase *optionsCallback=nullptr)
Load a file and return the loaded data.
static void Save(const mitk::BaseData *data, const std::string &mimeType, const std::string &path, bool addExtension=true, bool setPathProperty=false)
Save a mitk::BaseData instance.
static DataStorage::SetOfObjects::Pointer Load(const std::string &path, const IFileReader::Options &options, DataStorage &storage)
Load a file into the given DataStorage given user defined IFileReader::Options.
static T::Pointer Load(const us::ModuleResource &usResource, std::ios_base::openmode mode=std::ios_base::in)
static void Save(const mitk::BaseData *data, const std::string &path, const IFileWriter::Options &options, bool setPathProperty=false)
Save a mitk::BaseData instance.
static fs::path GetAppBundlePath(AppBundlePath path=AppBundlePath::Parent)
static T::Pointer Load(const std::string &path, const IFileReader::Options &options)
static std::string GetTempPath()
static std::vector< BaseData::Pointer > Load(const std::vector< std::string > &paths, const ReaderOptionsFunctorBase *optionsCallback=nullptr)
static std::string GetProgramPath()
static std::string Load(std::vector< LoadInfo > &loadInfos, DataStorage::SetOfObjects *nodeResult, DataStorage *ds, const ReaderOptionsFunctorBase *optionsCallback)
static DataStorage::SetOfObjects::Pointer Load(const std::string &path, DataStorage &storage, const ReaderOptionsFunctorBase *optionsCallback=nullptr)
Load a file into the given DataStorage.
static std::string Save(const BaseData *data, const std::string &mimeType, const std::string &path, WriterOptionsFunctorBase *optionsCallback, bool addExtension, bool setPathProperty)
static std::string CreateTemporaryFile(const std::string &templateName="XXXXXX", std::string path=std::string())
The MimeType class represents a registered mime-type. It is an immutable wrapper for mitk::CustomMime...
Key-value list holding instances of BaseProperty.
Find image slices visible on a given plane.
std::map< std::string, us::Any > Options
Options for reading or writing data.
const PropertyList * m_Properties
std::vector< BaseData::Pointer > m_Output
LoadInfo(const std::string &path)
FileReaderSelector m_ReaderSelector
virtual bool operator()(LoadInfo &loadInfo) const =0
SaveInfo(const BaseData *baseData, const MimeType &mimeType, const std::string &path)
std::string m_Path
The path to write the BaseData object to.
const BaseData * m_BaseData
The BaseData object to save.
bool m_Cancel
Flag indicating if sub-sequent save operations are to be canceled.
MimeType m_MimeType
The selected mime-type, used to restrict results from FileWriterSelector.
FileWriterSelector m_WriterSelector
Contains a set of IFileWriter objects.
bool operator<(const SaveInfo &other) const
virtual bool operator()(SaveInfo &saveInfo) const =0