Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::MitkMultilabelIOMimeTypes::LegacyLabelSetMimeType Class Reference

MIME type for legacy LabelSetImage NRRD files. More...

#include <mitkMultilabelIOMimeTypes.h>

Inheritance diagram for mitk::MitkMultilabelIOMimeTypes::LegacyLabelSetMimeType:
Collaboration diagram for mitk::MitkMultilabelIOMimeTypes::LegacyLabelSetMimeType:

Public Member Functions

 LegacyLabelSetMimeType ()
 
bool AppliesTo (const std::string &path) const override
 Check whether this mime-type can handle the file at the given path. More...
 
LegacyLabelSetMimeType * Clone () const override
 Create a heap-allocated copy of this CustomMimeType. More...
 
- Public Member Functions inherited from mitk::CustomMimeType
 CustomMimeType ()
 Construct a default CustomMimeType with an empty name. More...
 
 CustomMimeType (const std::string &name)
 Construct a CustomMimeType with the given unique name. More...
 
 CustomMimeType (const CustomMimeType &other)
 Copy constructor. More...
 
 CustomMimeType (const MimeType &other)
 Construct from an immutable MimeType wrapper. More...
 
virtual ~CustomMimeType ()
 
CustomMimeType & operator= (const CustomMimeType &other)
 Copy assignment operator. More...
 
CustomMimeType & operator= (const MimeType &other)
 Assignment from an immutable MimeType wrapper. More...
 
std::string GetName () const
 Get the unique name for this mime-type. More...
 
std::string GetCategory () const
 Get the human-readable category of this mime-type. More...
 
std::vector< std::string > GetExtensions () const
 Get all file extensions this mime-type can handle. More...
 
std::string GetComment () const
 Get a human-readable description of this mime-type. More...
 
bool MatchesExtension (const std::string &path) const
 Check whether the file extension of the given path matches this mime-type. More...
 
std::string GetExtension (const std::string &path) const
 Get the first matching extension found at the end of the given path. More...
 
std::string GetFilenameWithoutExtension (const std::string &path) const
 Get the filename from the given path, without the matching extension. More...
 
void SetName (const std::string &name)
 Set the unique name of this mime-type. More...
 
void SetCategory (const std::string &category)
 Set the category for grouping this mime-type. More...
 
void SetExtension (const std::string &extension)
 Set a single file extension, replacing all existing extensions. More...
 
void AddExtension (const std::string &extension)
 Add a file extension to the list if not already present (case-insensitive). More...
 
void SetComment (const std::string &comment)
 Set the human-readable comment for this mime-type. More...
 
void Swap (CustomMimeType &r)
 Swap the contents of this CustomMimeType with another. More...
 

Detailed Description

MIME type for legacy LabelSetImage NRRD files.

Definition at line 25 of file mitkMultilabelIOMimeTypes.h.

Constructor & Destructor Documentation

◆ LegacyLabelSetMimeType()

mitk::MitkMultilabelIOMimeTypes::LegacyLabelSetMimeType::LegacyLabelSetMimeType ( )

Member Function Documentation

◆ AppliesTo()

bool mitk::MitkMultilabelIOMimeTypes::LegacyLabelSetMimeType::AppliesTo ( const std::string &  path) const
overridevirtual

Check whether this mime-type can handle the file at the given path.

Parameters
[in]pathThe file path to check.
Returns
true if this mime-type applies to the given file.

The base implementation checks only the file extension. Subclasses may override this method to inspect file contents (e.g. DICOM magic bytes).

Reimplemented from mitk::CustomMimeType.

◆ Clone()

LegacyLabelSetMimeType* mitk::MitkMultilabelIOMimeTypes::LegacyLabelSetMimeType::Clone ( ) const
overridevirtual

Create a heap-allocated copy of this CustomMimeType.

Returns
A pointer to the cloned object. The caller takes ownership.

Reimplemented from mitk::CustomMimeType.


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