Medical Imaging Interaction Toolkit  2018.4.99-87d68d9f
Medical Imaging Interaction Toolkit
mitk::CustomMimeType Class Reference

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>

Inheritance diagram for mitk::CustomMimeType:

Public Member Functions

 CustomMimeType ()
 
 CustomMimeType (const std::string &name)
 
 CustomMimeType (const CustomMimeType &other)
 
 CustomMimeType (const MimeType &other)
 
virtual ~CustomMimeType ()
 
CustomMimeTypeoperator= (const CustomMimeType &other)
 
CustomMimeTypeoperator= (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 etension 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 CustomMimeTypeClone () const
 

Detailed Description

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 trough 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.

Constructor & Destructor Documentation

◆ CustomMimeType() [1/4]

mitk::CustomMimeType::CustomMimeType ( )

Definition at line 51 of file mitkCustomMimeType.cpp.

Referenced by Clone().

◆ CustomMimeType() [2/4]

mitk::CustomMimeType::CustomMimeType ( const std::string &  name)

Definition at line 52 of file mitkCustomMimeType.cpp.

◆ CustomMimeType() [3/4]

mitk::CustomMimeType::CustomMimeType ( const CustomMimeType other)

Definition at line 53 of file mitkCustomMimeType.cpp.

◆ CustomMimeType() [4/4]

mitk::CustomMimeType::CustomMimeType ( const MimeType other)
explicit

◆ ~CustomMimeType()

mitk::CustomMimeType::~CustomMimeType ( )
virtual

Definition at line 50 of file mitkCustomMimeType.cpp.

Member Function Documentation

◆ AddExtension()

void mitk::CustomMimeType::AddExtension ( const std::string &  extension)

Definition at line 142 of file mitkCustomMimeType.cpp.

Referenced by mitk::ContourModelReader::ContourModelReader(), mitk::ContourModelSetReader::ContourModelSetReader(), mitk::ContourModelSetWriter::ContourModelSetWriter(), mitk::ContourModelWriter::ContourModelWriter(), mitk::IOMimeTypes::DicomMimeType::DicomMimeType(), mitk::DummyLsetFileReader::DummyLsetFileReader(), mitk::ExampleIOMimeTypes::EXAMPLE_TWO_MIMETYPE(), mitk::ExampleIOMimeTypes::ExampleDataStructureMimeType::ExampleDataStructureMimeType(), mitk::IOMimeTypes::GEOMETRY_DATA_MIMETYPE(), mitk::ItkImageIO::ItkImageIO(), mitk::LegacyFileReaderService::LegacyFileReaderService(), mitk::LegacyFileWriterService::LegacyFileWriterService(), mitk::MAPRegistrationWrapperIO::MAPRegistrationWrapperIO(), mitk::MitkCESTIOMimeTypes::MitkCESTDicomMimeType::MitkCESTDicomMimeType(), mitk::MitkDICOMPMIOMimeTypes::MitkDICOMPMMimeType::MitkDICOMPMMimeType(), mitk::MitkDICOMSEGIOMimeTypes::MitkDICOMSEGMimeType::MitkDICOMSEGMimeType(), mitk::IGTMimeTypes::NAVIGATIONDATASETCSV_MIMETYPE(), mitk::IGTMimeTypes::NAVIGATIONDATASETXML_MIMETYPE(), mitk::IOMimeTypes::NIFTI_MIMETYPE(), mitk::IOMimeTypes::NRRD_MIMETYPE(), mitk::IOMimeTypes::POINTSET_MIMETYPE(), mitk::RandomForestFileIO::RandomForestFileIO(), mitk::IOMimeTypes::RAW_MIMETYPE(), mitk::DicomRTMimeTypes::RTDoseMimeType::RTDoseMimeType(), mitk::DicomRTMimeTypes::RTPlanMimeType::RTPlanMimeType(), mitk::DicomRTMimeTypes::RTStructMimeType::RTStructMimeType(), mitk::IOMimeTypes::STANFORD_PLY_MIMETYPE(), mitk::IOMimeTypes::STEREOLITHOGRAPHY_MIMETYPE(), mitk::TubeGraphIO::TUBEGRAPH_MIMETYPE(), mitk::IGTMimeTypes::USDEVICEINFORMATIONXML_MIMETYPE(), mitk::IOMimeTypes::VTK_IMAGE_LEGACY_MIMETYPE(), mitk::IOMimeTypes::VTK_IMAGE_MIMETYPE(), mitk::IOMimeTypes::VTK_PARALLEL_IMAGE_MIMETYPE(), mitk::IOMimeTypes::VTK_PARALLEL_POLYDATA_MIMETYPE(), mitk::IOMimeTypes::VTK_POLYDATA_LEGACY_MIMETYPE(), mitk::IOMimeTypes::VTK_POLYDATA_MIMETYPE(), and mitk::IOMimeTypes::WAVEFRONT_OBJ_MIMETYPE().

◆ AppliesTo()

◆ Clone()

◆ GetCategory()

std::string mitk::CustomMimeType::GetCategory ( ) const

Returns the human-readable Category of the mime-type. Allows grouping of similar mime-types (like Surfaces)

Definition at line 77 of file mitkCustomMimeType.cpp.

◆ GetComment()

std::string mitk::CustomMimeType::GetComment ( ) const

Returns the Human readable comment of the MimeType, a string that describes its unique role.

Definition at line 79 of file mitkCustomMimeType.cpp.

◆ GetExtension()

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.

Definition at line 97 of file mitkCustomMimeType.cpp.

Referenced by mitk::ExampleIOMimeTypes::ExampleDataStructureMimeType::AppliesTo().

◆ GetExtensions()

std::vector< std::string > mitk::CustomMimeType::GetExtensions ( ) const

Returns all extensions that this MimeType can handle.

Definition at line 78 of file mitkCustomMimeType.cpp.

Referenced by mitk::ItkImageIO::ItkImageIO(), and mitk::AbstractFileIO::RegisterService().

◆ GetFilenameWithoutExtension()

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.

Definition at line 104 of file mitkCustomMimeType.cpp.

◆ GetName()

◆ MatchesExtension()

bool mitk::CustomMimeType::MatchesExtension ( const std::string &  path) const

Checks if the MimeType can handle the etension of the given path.

This function exclusively looks a the given string

Definition at line 91 of file mitkCustomMimeType.cpp.

Referenced by AppliesTo().

◆ operator=() [1/2]

CustomMimeType & mitk::CustomMimeType::operator= ( const CustomMimeType other)

Definition at line 62 of file mitkCustomMimeType.cpp.

References Swap().

◆ operator=() [2/2]

CustomMimeType & mitk::CustomMimeType::operator= ( const MimeType other)

Definition at line 69 of file mitkCustomMimeType.cpp.

References Swap().

◆ SetCategory()

void mitk::CustomMimeType::SetCategory ( const std::string &  category)

Definition at line 135 of file mitkCustomMimeType.cpp.

Referenced by mitk::ContourModelReader::ContourModelReader(), mitk::ContourModelSetReader::ContourModelSetReader(), mitk::ContourModelSetWriter::ContourModelSetWriter(), mitk::ContourModelWriter::ContourModelWriter(), mitk::IOMimeTypes::DicomMimeType::DicomMimeType(), mitk::DummyLsetFileReader::DummyLsetFileReader(), mitk::ExampleIOMimeTypes::EXAMPLE_TWO_MIMETYPE(), mitk::ExampleIOMimeTypes::ExampleDataStructureMimeType::ExampleDataStructureMimeType(), mitk::IOMimeTypes::GEOMETRY_DATA_MIMETYPE(), mitk::ItkImageIO::ItkImageIO(), mitk::LegacyFileReaderService::LegacyFileReaderService(), mitk::MAPRegistrationWrapperIO::MAPRegistrationWrapperIO(), mitk::MitkCESTIOMimeTypes::MitkCESTDicomMimeType::MitkCESTDicomMimeType(), mitk::MitkDICOMPMIOMimeTypes::MitkDICOMPMMimeType::MitkDICOMPMMimeType(), mitk::MitkDICOMSEGIOMimeTypes::MitkDICOMSEGMimeType::MitkDICOMSEGMimeType(), mitk::IGTMimeTypes::NAVIGATIONDATASETCSV_MIMETYPE(), mitk::IGTMimeTypes::NAVIGATIONDATASETXML_MIMETYPE(), mitk::IOMimeTypes::NIFTI_MIMETYPE(), mitk::IOMimeTypes::NRRD_MIMETYPE(), mitk::IOMimeTypes::POINTSET_MIMETYPE(), mitk::RandomForestFileIO::RandomForestFileIO(), mitk::IOMimeTypes::RAW_MIMETYPE(), mitk::DicomRTMimeTypes::RTDoseMimeType::RTDoseMimeType(), mitk::DicomRTMimeTypes::RTPlanMimeType::RTPlanMimeType(), mitk::DicomRTMimeTypes::RTStructMimeType::RTStructMimeType(), mitk::IOMimeTypes::STANFORD_PLY_MIMETYPE(), mitk::IOMimeTypes::STEREOLITHOGRAPHY_MIMETYPE(), mitk::TubeGraphIO::TUBEGRAPH_MIMETYPE(), mitk::IGTMimeTypes::USDEVICEINFORMATIONXML_MIMETYPE(), mitk::IOMimeTypes::VTK_IMAGE_LEGACY_MIMETYPE(), mitk::IOMimeTypes::VTK_IMAGE_MIMETYPE(), mitk::IOMimeTypes::VTK_PARALLEL_IMAGE_MIMETYPE(), mitk::IOMimeTypes::VTK_PARALLEL_POLYDATA_MIMETYPE(), mitk::IOMimeTypes::VTK_POLYDATA_LEGACY_MIMETYPE(), mitk::IOMimeTypes::VTK_POLYDATA_MIMETYPE(), and mitk::IOMimeTypes::WAVEFRONT_OBJ_MIMETYPE().

◆ SetComment()

void mitk::CustomMimeType::SetComment ( const std::string &  comment)

Definition at line 151 of file mitkCustomMimeType.cpp.

Referenced by mitk::IOMimeTypes::DicomMimeType::DicomMimeType(), mitk::DummyLsetFileReader::DummyLsetFileReader(), mitk::ExampleIOMimeTypes::EXAMPLE_TWO_MIMETYPE(), mitk::ExampleIOMimeTypes::ExampleDataStructureMimeType::ExampleDataStructureMimeType(), mitk::IOMimeTypes::GEOMETRY_DATA_MIMETYPE(), mitk::MitkCESTIOMimeTypes::MitkCESTDicomMimeType::MitkCESTDicomMimeType(), mitk::MitkDICOMPMIOMimeTypes::MitkDICOMPMMimeType::MitkDICOMPMMimeType(), mitk::MitkDICOMSEGIOMimeTypes::MitkDICOMSEGMimeType::MitkDICOMSEGMimeType(), mitk::IGTMimeTypes::NAVIGATIONDATASETCSV_MIMETYPE(), mitk::IGTMimeTypes::NAVIGATIONDATASETXML_MIMETYPE(), mitk::IOMimeTypes::NIFTI_MIMETYPE(), mitk::IOMimeTypes::NRRD_MIMETYPE(), mitk::IOMimeTypes::POINTSET_MIMETYPE(), mitk::RandomForestFileIO::RandomForestFileIO(), mitk::IOMimeTypes::RAW_MIMETYPE(), mitk::DicomRTMimeTypes::RTDoseMimeType::RTDoseMimeType(), mitk::DicomRTMimeTypes::RTPlanMimeType::RTPlanMimeType(), mitk::DicomRTMimeTypes::RTStructMimeType::RTStructMimeType(), mitk::IOMimeTypes::STANFORD_PLY_MIMETYPE(), mitk::IOMimeTypes::STEREOLITHOGRAPHY_MIMETYPE(), mitk::TubeGraphIO::TUBEGRAPH_MIMETYPE(), mitk::IGTMimeTypes::USDEVICEINFORMATIONXML_MIMETYPE(), mitk::IOMimeTypes::VTK_IMAGE_LEGACY_MIMETYPE(), mitk::IOMimeTypes::VTK_IMAGE_MIMETYPE(), mitk::IOMimeTypes::VTK_PARALLEL_IMAGE_MIMETYPE(), mitk::IOMimeTypes::VTK_PARALLEL_POLYDATA_MIMETYPE(), mitk::IOMimeTypes::VTK_POLYDATA_LEGACY_MIMETYPE(), mitk::IOMimeTypes::VTK_POLYDATA_MIMETYPE(), and mitk::IOMimeTypes::WAVEFRONT_OBJ_MIMETYPE().

◆ SetExtension()

void mitk::CustomMimeType::SetExtension ( const std::string &  extension)

Definition at line 136 of file mitkCustomMimeType.cpp.

◆ SetName()

void mitk::CustomMimeType::SetName ( const std::string &  name)

Definition at line 134 of file mitkCustomMimeType.cpp.

Referenced by mitk::ItkImageIO::FixUpCustomMimeTypeName().

◆ Swap()

void mitk::CustomMimeType::Swap ( CustomMimeType r)

Definition at line 152 of file mitkCustomMimeType.cpp.

Referenced by operator=(), and mitk::swap().


The documentation for this class was generated from the following files: