Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkIOMimeTypes.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 mitkIOMimeTypes_h
14 #define mitkIOMimeTypes_h
15 
16 #include "mitkCustomMimeType.h"
17 
18 #include <string>
19 
20 namespace mitk
21 {
27  {
28  public:
29 
33  {
34  public:
35  BaseDicomMimeType(const std::string &name);
36  BaseDicomMimeType(const BaseDicomMimeType& other) = default;
37  bool AppliesTo(const std::string& path) const override;
38  BaseDicomMimeType* Clone() const override;
39  };
40 
42  {
43  public:
45  DicomMimeType *Clone() const override;
46  };
47 
48  static std::vector<CustomMimeType *> Get();
49 
50  static std::string DEFAULT_BASE_NAME(); // application/vnd.mitk
51 
52  static std::string CATEGORY_IMAGES(); // Images
53  static std::string CATEGORY_SURFACES(); // Surfaces
54 
55  // ------------------------------ VTK formats ----------------------------------
56 
57  static CustomMimeType VTK_IMAGE_MIMETYPE(); // (mitk::Image) vti
58  static CustomMimeType VTK_IMAGE_LEGACY_MIMETYPE(); // (mitk::Image) vtk
59  static CustomMimeType VTK_PARALLEL_IMAGE_MIMETYPE(); // (mitk::Image) pvti
60  static CustomMimeType VTK_POLYDATA_MIMETYPE(); // (mitk::Surface) vtp, vtk
61  static CustomMimeType VTK_POLYDATA_LEGACY_MIMETYPE(); // (mitk::Surface) vtk
62  static CustomMimeType VTK_PARALLEL_POLYDATA_MIMETYPE(); // (mitk::Surface) pvtp
63  static CustomMimeType STEREOLITHOGRAPHY_MIMETYPE(); // (mitk::Surface) stl
64  static CustomMimeType WAVEFRONT_OBJ_MIMETYPE(); // (mitk::Surface) obj
65  static CustomMimeType STANFORD_PLY_MIMETYPE(); // (mitk::Surface) ply
66 
67  static std::string STEREOLITHOGRAPHY_NAME(); // DEFAULT_BASE_NAME.stl
68  static std::string VTK_IMAGE_NAME(); // DEFAULT_BASE_NAME.vtk.image
69  static std::string VTK_IMAGE_LEGACY_NAME(); // DEFAULT_BASE_NAME.vtk.image.legacy
70  static std::string VTK_PARALLEL_IMAGE_NAME(); // DEFAULT_BASE_NAME.vtk.parallel.image
71  static std::string VTK_POLYDATA_NAME(); // DEFAULT_BASE_NAME.vtk.polydata
72  static std::string VTK_POLYDATA_LEGACY_NAME(); // DEFAULT_BASE_NAME.vtk.polydata.legacy
73  static std::string VTK_PARALLEL_POLYDATA_NAME(); // DEFAULT_BASE_NAME.vtk.parallel.polydata
74  static std::string WAVEFRONT_OBJ_NAME(); // DEFAULT_BASE_NAME.obj
75  static std::string STANFORD_PLY_NAME(); // DEFAULT_BASE_NAME.ply
76 
77  // ------------------------- Image formats (ITK based) --------------------------
78 
79  static CustomMimeType NRRD_MIMETYPE(); // nrrd, nhdr
81  static CustomMimeType RAW_MIMETYPE(); // raw
83 
84  static std::string NRRD_MIMETYPE_NAME(); // DEFAULT_BASE_NAME.nrrd
85  static std::string NIFTI_MIMETYPE_NAME();
86  static std::string RAW_MIMETYPE_NAME(); // DEFAULT_BASE_NAME.raw
87  static std::string DICOM_MIMETYPE_NAME();
88 
89  // ------------------------------ MITK formats ----------------------------------
90 
92  static CustomMimeType GEOMETRY_DATA_MIMETYPE(); // .mitkgeometry
93 
94  static std::string POINTSET_MIMETYPE_NAME(); // DEFAULT_BASE_NAME.pointset
95 
96  private:
97  // purposely not implemented
98  IOMimeTypes();
99  IOMimeTypes(const IOMimeTypes &);
100  };
101 }
102 
103 #endif
#define MITKCORE_EXPORT
The CustomMimeType class represents a custom mime-type which may be registered as a service object....
BaseDicomMimeType * Clone() const override
BaseDicomMimeType(const BaseDicomMimeType &other)=default
bool AppliesTo(const std::string &path) const override
Checks if the MimeType can handle file at the given location.
BaseDicomMimeType(const std::string &name)
DicomMimeType * Clone() const override
The IOMimeTypes class.
static std::string DEFAULT_BASE_NAME()
static std::string STEREOLITHOGRAPHY_NAME()
static CustomMimeType WAVEFRONT_OBJ_MIMETYPE()
static std::string WAVEFRONT_OBJ_NAME()
static std::string VTK_PARALLEL_IMAGE_NAME()
static std::string CATEGORY_SURFACES()
static std::string POINTSET_MIMETYPE_NAME()
static std::string CATEGORY_IMAGES()
static CustomMimeType RAW_MIMETYPE()
static std::string VTK_PARALLEL_POLYDATA_NAME()
static CustomMimeType POINTSET_MIMETYPE()
static CustomMimeType VTK_PARALLEL_IMAGE_MIMETYPE()
static CustomMimeType NRRD_MIMETYPE()
static std::string VTK_POLYDATA_NAME()
static CustomMimeType VTK_PARALLEL_POLYDATA_MIMETYPE()
static std::string STANFORD_PLY_NAME()
static std::string RAW_MIMETYPE_NAME()
static CustomMimeType VTK_IMAGE_LEGACY_MIMETYPE()
static std::string DICOM_MIMETYPE_NAME()
static std::string NRRD_MIMETYPE_NAME()
static CustomMimeType GEOMETRY_DATA_MIMETYPE()
static CustomMimeType STEREOLITHOGRAPHY_MIMETYPE()
static std::string NIFTI_MIMETYPE_NAME()
static CustomMimeType VTK_IMAGE_MIMETYPE()
static CustomMimeType VTK_POLYDATA_MIMETYPE()
static std::string VTK_IMAGE_LEGACY_NAME()
static CustomMimeType VTK_POLYDATA_LEGACY_MIMETYPE()
static std::vector< CustomMimeType * > Get()
static std::string VTK_IMAGE_NAME()
static CustomMimeType STANFORD_PLY_MIMETYPE()
static DicomMimeType DICOM_MIMETYPE()
static CustomMimeType NIFTI_MIMETYPE()
static std::string VTK_POLYDATA_LEGACY_NAME()
Find image slices visible on a given plane.