Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkBaseDICOMReaderService.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 mitkBaseDICOMReaderService_h
14 #define mitkBaseDICOMReaderService_h
15 
16 #include <mitkAbstractFileReader.h>
17 #include <mitkDICOMFileReader.h>
18 
19 #include <MitkDICOMExports.h>
20 
21 namespace mitk {
22 
34 {
35 public:
37 
43 
44 protected:
49  BaseDICOMReaderService(const std::string& description);
50 
56  BaseDICOMReaderService(const mitk::CustomMimeType& customType, const std::string& description);
57 
66  std::vector<itk::SmartPointer<BaseData>> DoRead() override;
67 
73 
83  virtual mitk::DICOMFileReader::Pointer GetReader(const mitk::StringList& relevantFiles) const = 0;
84 
89  void SetOnlyRegardOwnSeries(bool onlyRegardOwnSeries);
90 
95  bool GetOnlyRegardOwnSeries() const;
96 
97 private:
102  bool m_OnlyRegardOwnSeries = true;
103 };
104 
105 
106 class IPropertyProvider;
107 
120 
121 }
122 
123 #endif
#define MITKDICOM_EXPORT
Base class for creating mitk::BaseData objects from files or streams.
std::vector< itk::SmartPointer< BaseData > > Read() override
Read data and create a list of BaseData objects.
Base class for service wrappers that make DICOMFileReader from the DICOM module usable.
IFileReader::ConfidenceLevel GetConfidenceLevel() const override
Determine the confidence level for reading a given file.
bool GetOnlyRegardOwnSeries() const
Get whether only files from the same DICOM series are loaded.
BaseDICOMReaderService(const std::string &description)
Construct with the default DICOM MIME type and a description string.
BaseDICOMReaderService(const mitk::CustomMimeType &customType, const std::string &description)
Construct with a custom MIME type and a description string.
mitk::StringList GetDICOMFilesInSameDirectory() const
Returns the list of all DICOM files in the same directory as this->GetLocalFileName().
std::vector< itk::SmartPointer< BaseData > > DoRead() override
Perform the actual reading of DICOM data.
virtual mitk::DICOMFileReader::Pointer GetReader(const mitk::StringList &relevantFiles) const =0
Returns the reader instance that should be used for loading.
void SetOnlyRegardOwnSeries(bool onlyRegardOwnSeries)
Set whether only files from the same DICOM series should be loaded.
A custom mime-type that can be registered as a service object.
Interface implemented by classes that provide access to property information.
Find image slices visible on a given plane.
std::vector< std::string > StringList
A list of strings, used throughout the DICOM module to hold file paths and similar data.
std::string MITKDICOM_EXPORT GenerateNameFromDICOMProperties(const mitk::IPropertyProvider *provider)
Generate a human-readable name from DICOM properties of a data object.
ConfidenceLevel
A confidence level describing the reader's or writer's ability to handle the given data or file forma...
Definition: mitkIFileIO.h:57