22 #include <itksys/SystemTools.hxx> 34 std::vector<CustomMimeType*> mimeTypes;
49 std::string category =
"DICOMRT";
70 if (modality ==
"RTDOSE") {
85 for (
const auto& tag : tagsOfInterest) {
86 tagsOfInterestList.push_back(tag.first);
90 scanner->SetInputFiles({ path });
91 scanner->AddTagPaths(tagsOfInterestList);
95 std::string modality =
"";
98 auto findings = frames.front()->GetTagValueAsString(
DICOMTagPath(0x0008, 0x0060));
100 modality = findings.front().value;
107 selector->LoadBuiltIn3DConfigs();
108 selector->SetInputFiles({ filename });
110 mitk::DICOMFileReader::Pointer reader = selector->GetFirstReaderWithMinimumNumberOfOutputImages();
112 if (reader.IsNull()) {
128 std::string category =
"DICOMRT";
144 if (modality ==
"RTSTRUCT") {
160 std::string category =
"DICOMRT";
176 if (modality ==
"RTPLAN") {
228 static std::string description =
"RTDOSE reader";
234 static std::string description =
"RTSTRUCT reader";
240 static std::string description =
"RTPLAN reader";
249 if (!toiRegisters.empty())
251 if (toiRegisters.size() > 1)
253 MITK_WARN <<
"Multiple DICOM tags of interest services found. Using just one.";
static std::string GetModality(const std::string &path)
Class is used to identify (nested) attributes in a DICOM dataset. In contrast to the class DICOMTag...
static std::string DICOMRT_STRUCT_MIMETYPE_DESCRIPTION()
DataCollection - Class to facilitate loading/accessing structured data.
static RTDoseMimeType DICOMRT_DOSE_MIMETYPE()
RTPlanMimeType * Clone() const override
virtual bool AppliesTo(const std::string &path) const
Checks if the MimeType can handle file at the given location.
static std::string DICOMRT_PLAN_MIMETYPE_DESCRIPTION()
void SetComment(const std::string &comment)
void * GetService(const ServiceReferenceBase &reference)
static std::string DICOMRT_PLAN_MIMETYPE_NAME()
static RTPlanMimeType DICOMRT_PLAN_MIMETYPE()
The CustomMimeType class represents a custom mime-type which may be registered as a service object...
static std::string DEFAULT_BASE_NAME()
bool AppliesTo(const std::string &path) const override
Checks if the MimeType can handle file at the given location.
bool AppliesTo(const std::string &path) const override
Checks if the MimeType can handle file at the given location.
static bool canReadByDicomFileReader(const std::string &path)
bool AppliesTo(const std::string &path) const override
Checks if the MimeType can handle file at the given location.
static mitk::IDICOMTagsOfInterest * GetDicomTagsOfInterestService()
void AddExtension(const std::string &extension)
std::vector< ServiceReferenceU > GetServiceReferences(const std::string &clazz, const std::string &filter=std::string())
std::vector< DICOMTagPath > DICOMTagPathList
static std::vector< CustomMimeType * > Get()
void SetCategory(const std::string &category)
static RTStructMimeType DICOMRT_STRUCT_MIMETYPE()
std::vector< DICOMDatasetAccessingImageFrameInfo::Pointer > DICOMDatasetAccessingImageFrameList
RTStructMimeType * Clone() const override
static std::string DICOMRT_DOSE_MIMETYPE_DESCRIPTION()
static std::string DICOMRT_STRUCT_MIMETYPE_NAME()
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.
RTDoseMimeType * Clone() const override
static std::string DICOMRT_DOSE_MIMETYPE_NAME()