Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkDICOMRTMimeTypes.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkDICOMRTMimeTypes_h
14 #define mitkDICOMRTMimeTypes_h
15 
16 #include <mitkCustomMimeType.h>
17 #include <MitkRTExports.h>
18 
19 #include <array>
20 #include <memory>
21 #include <string>
22 
23 namespace mitk {
24 
37 {
38 public:
39 
49  {
50  public:
53 
59  bool AppliesTo(const std::string &path) const override;
60 
65  RTDoseMimeType* Clone() const override;
66  };
67 
76  {
77  public:
80 
86  bool AppliesTo(const std::string &path) const override;
87 
92  RTStructMimeType* Clone() const override;
93  };
94 
103  {
104  public:
107 
113  bool AppliesTo(const std::string &path) const override;
114 
119  RTPlanMimeType* Clone() const override;
120  };
121 
126  static std::array<std::unique_ptr<CustomMimeType>, 3> Get();
127 
133 
139 
145 
150  static std::string DICOMRT_DOSE_MIMETYPE_NAME();
151 
156  static std::string DICOMRT_STRUCT_MIMETYPE_NAME();
157 
162  static std::string DICOMRT_PLAN_MIMETYPE_NAME();
163 
168  static std::string DICOMRT_DOSE_MIMETYPE_DESCRIPTION();
169 
175 
180  static std::string DICOMRT_PLAN_MIMETYPE_DESCRIPTION();
181 
182  DICOMRTMimeTypes() = delete;
184 
190  static bool canReadByDicomFileReader(const std::string & path);
191 
197  static std::string GetModality(const std::string & path);
198 };
199 
200 }
201 
202 #endif
#define MITKRT_EXPORT
Definition: MitkRTExports.h:15
A custom mime-type that can be registered as a service object.
MIME type for DICOM RT Dose files.
bool AppliesTo(const std::string &path) const override
Checks whether the given file is an RT Dose DICOM file.
RTDoseMimeType * Clone() const override
Creates a clone of this MIME type instance.
RTDoseMimeType()
Default constructor. Sets category to "DICOMRT" and adds ".dcm" extension.
MIME type for DICOM RT Plan files.
RTPlanMimeType()
Default constructor. Sets category to "DICOMRT" and adds ".dcm" extension.
bool AppliesTo(const std::string &path) const override
Checks whether the given file is an RT Plan DICOM file.
RTPlanMimeType * Clone() const override
Creates a clone of this MIME type instance.
MIME type for DICOM RT Structure Set files.
RTStructMimeType()
Default constructor. Sets category to "DICOMRT" and adds ".dcm" extension.
RTStructMimeType * Clone() const override
Creates a clone of this MIME type instance.
bool AppliesTo(const std::string &path) const override
Checks whether the given file is an RT Structure Set DICOM file.
Provides MIME type definitions for DICOM-RT file types (RTDose, RTStruct, RTPlan).
static bool canReadByDicomFileReader(const std::string &path)
Checks whether the given file can be read by any built-in DICOM file reader.
static RTPlanMimeType DICOMRT_PLAN_MIMETYPE()
Returns an RTPlanMimeType instance.
static std::array< std::unique_ptr< CustomMimeType >, 3 > Get()
Returns an array of all DICOM-RT MIME types (Dose, Plan, Struct).
DICOMRTMimeTypes(const DICOMRTMimeTypes &)=delete
static RTStructMimeType DICOMRT_STRUCT_MIMETYPE()
Returns an RTStructMimeType instance.
static std::string GetModality(const std::string &path)
Reads the DICOM Modality tag (0008,0060) from the given file.
static RTDoseMimeType DICOMRT_DOSE_MIMETYPE()
Returns an RTDoseMimeType instance.
static std::string DICOMRT_STRUCT_MIMETYPE_DESCRIPTION()
Returns a human-readable description for the RT Struct MIME type.
static std::string DICOMRT_DOSE_MIMETYPE_DESCRIPTION()
Returns a human-readable description for the RT Dose MIME type.
static std::string DICOMRT_PLAN_MIMETYPE_NAME()
Returns the registered name string for the RT Plan MIME type.
static std::string DICOMRT_STRUCT_MIMETYPE_NAME()
Returns the registered name string for the RT Struct MIME type.
static std::string DICOMRT_DOSE_MIMETYPE_NAME()
Returns the registered name string for the RT Dose MIME type.
static std::string DICOMRT_PLAN_MIMETYPE_DESCRIPTION()
Returns a human-readable description for the RT Plan MIME type.
Find image slices visible on a given plane.