Medical Imaging Interaction Toolkit
2024.06.00
Medical Imaging Interaction Toolkit
|
The CustomMimeType class represents a custom mime-type which may be registered as a service object. It should only be used for mime-type registration, see also mitk::MimeType. More...
#include <mitkCustomMimeType.h>
Public Member Functions | |
CustomMimeType () | |
CustomMimeType (const std::string &name) | |
CustomMimeType (const CustomMimeType &other) | |
CustomMimeType (const MimeType &other) | |
virtual | ~CustomMimeType () |
CustomMimeType & | operator= (const CustomMimeType &other) |
CustomMimeType & | operator= (const MimeType &other) |
std::string | GetName () const |
Returns the unique name for the MimeType. More... | |
std::string | GetCategory () const |
Returns the human-readable Category of the mime-type. Allows grouping of similar mime-types (like Surfaces) More... | |
std::vector< std::string > | GetExtensions () const |
Returns all extensions that this MimeType can handle. More... | |
std::string | GetComment () const |
Returns the Human readable comment of the MimeType, a string that describes its unique role. More... | |
virtual bool | AppliesTo (const std::string &path) const |
Checks if the MimeType can handle file at the given location. More... | |
bool | MatchesExtension (const std::string &path) const |
Checks if the MimeType can handle the extension of the given path. More... | |
std::string | GetExtension (const std::string &path) const |
Provides the first matching extension. More... | |
std::string | GetFilenameWithoutExtension (const std::string &path) const |
Provides the filename minus the extension. More... | |
void | SetName (const std::string &name) |
void | SetCategory (const std::string &category) |
void | SetExtension (const std::string &extension) |
void | AddExtension (const std::string &extension) |
void | SetComment (const std::string &comment) |
void | Swap (CustomMimeType &r) |
virtual CustomMimeType * | Clone () const |
The CustomMimeType class represents a custom mime-type which may be registered as a service object. It should only be used for mime-type registration, see also mitk::MimeType.
Instances of this class are usually created and registered as a service. They act as meta data information to allow the linking of files to reader and writer. They write files to specific IFileReader instances and provide data format meta-data for selecting compatible IFileWriter instances. mirk::CustomMimetype should only be used to register mime-types. All other interaction should happen through mitk::MimeTypeProvider, from which registered mimetypes can be pulled. mitk::MimeType provides a safe and memory-managed way of interacting with Mimetypes.
Definition at line 44 of file mitkCustomMimeType.h.
mitk::CustomMimeType::CustomMimeType | ( | ) |
mitk::CustomMimeType::CustomMimeType | ( | const std::string & | name | ) |
mitk::CustomMimeType::CustomMimeType | ( | const CustomMimeType & | other | ) |
|
explicit |
|
virtual |
void mitk::CustomMimeType::AddExtension | ( | const std::string & | extension | ) |
|
virtual |
Checks if the MimeType can handle file at the given location.
In its base implementation, this function exclusively looks a the given string. However, child classes can override this behaviour and peek into the file.
Reimplemented in mitk::MitkCESTIOMimeTypes::MitkCESTDicomWOMetaFileMimeType, mitk::MitkCESTIOMimeTypes::MitkCESTDicomWithMetaFileMimeType, mitk::DICOMRTMimeTypes::RTPlanMimeType, mitk::DICOMRTMimeTypes::RTStructMimeType, mitk::MitkMultilabelIOMimeTypes::LegacyLabelSetMimeType, mitk::IOMimeTypes::BaseDicomMimeType, mitk::MitkDICOMPMIOMimeTypes::MitkDICOMPMMimeType, mitk::MitkCESTIOMimeTypes::MitkCESTDicomMimeType, mitk::MitkDICOMSEGIOMimeTypes::MitkDICOMSEGMimeType, mitk::DICOMRTMimeTypes::RTDoseMimeType, mitk::ExampleIOMimeTypes::ExampleDataStructureMimeType, mitk::MitkMultilabelIOMimeTypes::MitkSegmentationTaskListMimeType, and mitk::MitkROIIOMimeTypes::MitkROIMimeType.
|
virtual |
Reimplemented in mitk::MitkCESTIOMimeTypes::MitkCESTDicomWOMetaFileMimeType, mitk::MitkCESTIOMimeTypes::MitkCESTDicomWithMetaFileMimeType, mitk::DICOMRTMimeTypes::RTPlanMimeType, mitk::IOMimeTypes::DicomMimeType, mitk::DICOMRTMimeTypes::RTStructMimeType, mitk::MitkMultilabelIOMimeTypes::LegacyLabelSetMimeType, mitk::IOMimeTypes::BaseDicomMimeType, mitk::MitkDICOMPMIOMimeTypes::MitkDICOMPMMimeType, mitk::MitkCESTIOMimeTypes::MitkCESTDicomMimeType, mitk::MitkDICOMSEGIOMimeTypes::MitkDICOMSEGMimeType, mitk::DICOMRTMimeTypes::RTDoseMimeType, mitk::ExampleIOMimeTypes::ExampleDataStructureMimeType, mitk::MitkMultilabelIOMimeTypes::MitkSegmentationTaskListMimeType, and mitk::MitkROIIOMimeTypes::MitkROIMimeType.
std::string mitk::CustomMimeType::GetCategory | ( | ) | const |
Returns the human-readable Category of the mime-type. Allows grouping of similar mime-types (like Surfaces)
std::string mitk::CustomMimeType::GetComment | ( | ) | const |
Returns the Human readable comment of the MimeType, a string that describes its unique role.
std::string mitk::CustomMimeType::GetExtension | ( | const std::string & | path | ) | const |
Provides the first matching extension.
Checks whether any of its extensions are present at the end of the provided path. Returns the first found one.
std::vector<std::string> mitk::CustomMimeType::GetExtensions | ( | ) | const |
Returns all extensions that this MimeType can handle.
std::string mitk::CustomMimeType::GetFilenameWithoutExtension | ( | const std::string & | path | ) | const |
Provides the filename minus the extension.
Checks whether any of its extensions are present at the end of the provided path. Returns the filename without that extension and without the directory.
std::string mitk::CustomMimeType::GetName | ( | ) | const |
Returns the unique name for the MimeType.
bool mitk::CustomMimeType::MatchesExtension | ( | const std::string & | path | ) | const |
Checks if the MimeType can handle the extension of the given path.
This function exclusively looks a the given string
CustomMimeType& mitk::CustomMimeType::operator= | ( | const CustomMimeType & | other | ) |
CustomMimeType& mitk::CustomMimeType::operator= | ( | const MimeType & | other | ) |
void mitk::CustomMimeType::SetCategory | ( | const std::string & | category | ) |
void mitk::CustomMimeType::SetComment | ( | const std::string & | comment | ) |
void mitk::CustomMimeType::SetExtension | ( | const std::string & | extension | ) |
void mitk::CustomMimeType::SetName | ( | const std::string & | name | ) |
void mitk::CustomMimeType::Swap | ( | CustomMimeType & | r | ) |