13 #ifndef mitkAbstractFileReader_h
14 #define mitkAbstractFileReader_h
45 void SetInput(
const std::string &location)
override;
47 void SetInput(
const std::string &location, std::istream *is)
override;
62 std::vector<itk::SmartPointer<BaseData>>
Read()
override;
116 std::istream *m_Stream;
157 virtual std::vector<itk::SmartPointer<BaseData>>
DoRead() = 0;
238 std::unique_ptr<Impl> d;
Base class for creating mitk::BaseData objects from files or streams.
std::vector< std::string > m_ReadFiles
void SetMimeType(const CustomMimeType &mimeType)
AbstractFileReader(const AbstractFileReader &other)
std::vector< std::string > GetReadFiles() override
void SetOption(const std::string &name, const us::Any &value) override
void SetProperties(const PropertyList *properties) override
Optionally provide base data properties as a source of meta data.
ConfidenceLevel GetConfidenceLevel() const override
The confidence level of the reader or writer implementation.
std::istream * GetInputStream() const override
Get the input stream.
Options GetOptions() const override
returns a list of the supported options
std::string GetInputLocation() const override
Get the current input location.
void AddProgressCallback(const ProgressCallback &callback) override
MimeType GetRegisteredMimeType() const
virtual us::ServiceRegistration< CustomMimeType > RegisterMimeType(us::ModuleContext *context)
us::ServiceRegistration< IFileReader > RegisterService(us::ModuleContext *context=us::GetModuleContext())
const PropertyList * GetProperties() const override
virtual us::ServiceProperties GetServiceProperties() const
void SetInput(const std::string &location) override
Set the input location.
const CustomMimeType * GetMimeType() const
void RemoveProgressCallback(const ProgressCallback &callback) override
us::Any GetOption(const std::string &name) const override
std::string GetMimeTypePrefix() const
~AbstractFileReader() override
virtual std::vector< itk::SmartPointer< BaseData > > DoRead()=0
std::vector< itk::SmartPointer< BaseData > > Read() override
Reads a path or stream and creates a list of BaseData objects.
Options GetDefaultOptions() const
virtual void SetDefaultDataNodeProperties(DataNode *node, const std::string &filePath)
void SetMimeTypePrefix(const std::string &prefix)
void SetRanking(int ranking)
Set the service ranking for this file reader.
std::string GetLocalFileName() const
Get a local file name for reading.
AbstractFileReader(const CustomMimeType &mimeType, const std::string &description)
std::string GetDescription() const
void SetDefaultOptions(const Options &defaultOptions)
DataStorage::SetOfObjects::Pointer Read(mitk::DataStorage &ds) override
Reads the specified file or input stream, loading its contents into the provided DataStorage.
void SetOptions(const Options &options) override
void SetDescription(const std::string &description)
void SetInput(const std::string &location, std::istream *is) override
Set an input stream to read from.
The CustomMimeType class represents a custom mime-type which may be registered as a service object....
Class for nodes of the DataTree.
Data management class that handles 'was created by' relations.
The MimeType class represents a registered mime-type. It is an immutable wrapper for mitk::CustomMime...
Key-value list holding instances of BaseProperty.
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.
US_UNORDERED_MAP_TYPE< std::string, Any > ServiceProperties
Find image slices visible on a given plane.
ConfidenceLevel
A confidence level describing the confidence of the reader or writer in handling the given data.
std::map< std::string, us::Any > Options
Options for reading or writing data.
The common interface for all MITK file readers.