13 #ifndef mitkItkImageIO_h
14 #define mitkItkImageIO_h
18 #include <itkImageIOBase.h>
81 static PropertyList::Pointer
ExtractMetaDataAsPropertyList(
const itk::MetaDataDictionary& dictionary,
const std::string& mimeTypeName,
const std::vector<std::string>& defaultMetaDataKeys);
133 std::vector<itk::SmartPointer<BaseData>>
DoRead()
override;
140 itk::ImageIOBase::Pointer m_ImageIO;
142 std::vector<std::string> m_DefaultMetaDataKeys;
Abstract base class for implementing a combined file reader and writer.
std::vector< itk::SmartPointer< BaseData > > Read() override
Read data and create a list of BaseData objects.
A custom mime-type that can be registered as a service object.
Image class for storing multi-dimensional medical image data.
Wraps ITK image IO objects as mitk::IFileReader and mitk::IFileWriter objects.
virtual void FixUpCustomMimeTypeName(const std::string &imageIOName, CustomMimeType &customMimeType)
Fix up the custom MIME type name based on the ITK ImageIO name.
ItkImageIO(itk::ImageIOBase::Pointer imageIO)
Construct an ItkImageIO from an ITK ImageIO instance.
static Image::Pointer LoadRawMitkImageFromImageIO(itk::ImageIOBase *imageIO, const std::string &path)
Extract a raw MITK image from the given file path using the specified ImageIOBase.
ConfidenceLevel GetReaderConfidenceLevel() const override
Get the confidence level for reading the current file.
static void PreparImageIOToWriteImage(itk::ImageIOBase *imageIO, const Image *image)
Prepare an ITK ImageIOBase instance for writing the given MITK image.
static void SavePropertyListAsMetaData(itk::MetaDataDictionary &dictionary, const PropertyList *properties, const std::string &mimeTypeName)
Save a PropertyList as meta data in an ITK MetaDataDictionary.
void Write() override
Write the input data to file.
ItkImageIO(const CustomMimeType &mimeType, itk::ImageIOBase::Pointer imageIO, int rank)
Construct an ItkImageIO with a custom MIME type and rank.
virtual void InitializeDefaultMetaDataKeys()
Fills the m_DefaultMetaDataKeys vector with default values.
std::vector< itk::SmartPointer< BaseData > > DoRead() override
Perform the actual reading operation.
static PropertyList::Pointer ExtractMetaDataAsPropertyList(const itk::MetaDataDictionary &dictionary, const std::string &mimeTypeName, const std::vector< std::string > &defaultMetaDataKeys)
Convert a MetaDataDictionary into a PropertyList for a certain MIME type.
virtual std::vector< std::string > FixUpImageIOExtensions(const std::string &imageIOName)
Fix up file extensions reported by the ITK ImageIO.
ConfidenceLevel GetWriterConfidenceLevel() const override
Get the confidence level for writing the current data.
Key-value list holding instances of BaseProperty.
Find image slices visible on a given plane.
MITKCORE_EXPORT itk::MetaDataObjectBase::Pointer ConvertTimePointListToMetaDataObject(const mitk::TimeGeometry *timeGeometry)
MITKCORE_EXPORT std::vector< TimePointType > ConvertMetaDataObjectToTimePointList(const itk::MetaDataObjectBase *data)
ConfidenceLevel
A confidence level describing the reader's or writer's ability to handle the given data or file forma...