MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
mlDICOMSOPClassAndModalityTools.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
5
10//----------------------------------------------------------------------------------
11#pragma once
12
13#include "MLDICOMTagsSystem.h"
14
15#include <FMEThirdPartyWarningsDisable.h>
16#include <string>
17#include <tuple>
18#include <FMEThirdPartyWarningsRestore.h>
19
20#include <mlUtilsSystem.h>
21
22// DICOM Tree prototypes.
23#include <DCMTree_Lib.h>
24
26
27class DicomMessageCollector;
28
29//----------------------------------------------------------------------------------
31//----------------------------------------------------------------------------------
32namespace DICOMTagTools {
33
40
47 const bool tryEnhancedReconstruction=false);
48
52 const std::string &modality);
53
59 const std::string &sopClassUID,
60 bool doDeepSearch=false);
61
66
74
79
87
90
93
103 const std::string &modality);
104
106[[nodiscard]] MLDICOMTags_EXPORT bool isKnownRetiredModality(const std::string &modality);
107
110[[nodiscard]] MLDICOMTags_EXPORT bool isKnownModality(const std::string &modality, bool includeRetired);
111
115[[nodiscard]] MLDICOMTags_EXPORT std::string getModalityForSOPClassUID(const std::string &sopClassUID);
116
127[[nodiscard]] MLDICOMTags_EXPORT bool isMultiFrameSOPClassUID(const std::string &SOPClassUID);
128
131
134
139// Examples such as ProbandT1.dcm have NumberOfFrames tags but no FrameincrementPointer.
141
146
152 std::string classicSOPClassUID);
153
159 DicomMessageCollector &dcmMsgCollector);
160
162[[nodiscard]] MLDICOMTags_EXPORT std::pair<bool,bool> isClassicOrEnhancedMultiFrameSOPClass(const std::string &sopClassUID);
163
164};
165
Project global and OS specific declarations.
#define MLDICOMTags_EXPORT
If included by external modules, exported symbols are declared as import symbols.
Class to collect messages and errors related to a given frame handle.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
boost::shared_ptr< const Tree > Const_TreePtr
Definition DCMTree_Lib.h:68
boost::shared_ptr< Tree > TreePtr
Shared pointer to a DCMTree::Tree.
Definition DCMTree_Lib.h:67
MLDICOMTags_EXPORT bool hasTrueModality(DCMTree::Const_TreePtr treePtr, const std::string &modality)
Returns true if the value of the modality tag is of the given modality, the tree is not a secondary c...
MLDICOMTags_EXPORT bool hasSEGImageSOPClassUID(DCMTree::Const_TreePtr dcmTree)
Returns true if dcmTree contains any of the SOPClassUIDs.
MLDICOMTags_EXPORT bool hasSharedOrPerFrameFunctionalGroupSequences(DCMTree::Const_TreePtr dcmTree)
Returns true if the Shared- or the PerFrameFunctionalGroupSequences are on root level,...
MLDICOMTags_EXPORT std::pair< bool, bool > isClassicOrEnhancedMultiFrameSOPClass(const std::string &sopClassUID)
Checks whether sopClassUID is a multi-frame or enhanced one and returns a pair with pair....
MLDICOMTags_EXPORT bool hasMultiFrameModule(DCMTree::Const_TreePtr dcmTree)
Returns true if dcmTree contains has Number of Frames (0028,0008) and Frame Increment Pointer (0028,...
MLDICOMTags_EXPORT void setUpSingleFrameImageStorageSOPClassUIDDerivedFromEnhancedOne(DCMTree::Const_TreePtr dcmMFTree, DCMTree::TreePtr singleFrame, DicomMessageCollector &dcmMsgCollector)
Takes the SOPClassUID from dcmMFTree, and writes the corresponding single frame one into singlFrame.
MLDICOMTags_EXPORT bool hasNMSOPClassUID(DCMTree::Const_TreePtr dcmTree)
Returns true if dcmTree is valid and has the SOPClassUID tag with the value "1.2.840....
MLDICOMTags_EXPORT std::string getModalityTagValue(DCMTree::Const_TreePtr treePtr)
Returns a string with value of the modality tag if it can be determined from the passed tree or an em...
MLDICOMTags_EXPORT bool hasRetiredPETCurveStorageSOPClassUID(DCMTree::Const_TreePtr dcmTree)
Returns true if dcmTree is of the retired Positron Emission Tomography Curve Storage type with SOPCla...
MLDICOMTags_EXPORT std::string getSOPClassUIDTagValue(DCMTree::Const_TreePtr treePtr, const bool tryEnhancedReconstruction=false)
Returns a string with value of the SOPClassUID tag if it can be determined from the passed tree or an...
MLDICOMTags_EXPORT bool isKnownModality(const std::string &modality, bool includeRetired)
Returns true if modality is a known one, otherwise false; if includeRetired is true the also retired ...
MLDICOMTags_EXPORT std::string getModalityForSOPClassUID(const std::string &sopClassUID)
EXPERIMENTAL FUNCTION: If its is known then return the modality corresponding to sopClassUID; if not ...
MLDICOMTags_EXPORT bool hasStandardMRSpectroscopyClassUID(DCMTree::Const_TreePtr dcmTree)
Returns true if dcmTree is valid and has the SOPClassUID tag with the value "1.2.840....
MLDICOMTags_EXPORT bool hasSCSOPClassUID(DCMTree::Const_TreePtr dcmTree)
Returns true if dcmTree is valid and has a SOPClassUID tag value matching a secondary capture SOPClas...
MLDICOMTags_EXPORT bool isKnownRetiredModality(const std::string &modality)
Returns true if modality is a known retired one, otherwise false.
MLDICOMTags_EXPORT bool hasSOPClassUIDOfModality(DCMTree::Const_TreePtr dcmTree, const std::string &modality)
EXPERIMENTAL FUNCTION: Returns true if dcmTree is valid and has the SOPClassUID tag which corresponds...
MLDICOMTags_EXPORT bool isEnhancedSOPClassUID(const std::string &enhancedSOPClassUID)
Returns true if the pass UID is an enhanced Image Storage SOPClassUID, otherwise false.
MLDICOMTags_EXPORT bool hasParametricMapSOPClassUID(DCMTree::Const_TreePtr dcmTree)
Returns true if dcmTree is valid and has a Parametric Map SOPClassUID (which does not have a specific...
MLDICOMTags_EXPORT std::string reconstructEnhancedSOPClassUID(DCMTree::Const_TreePtr dcmMFTree, std::string classicSOPClassUID)
Tries to reconstruct the enhanced SOPClassUID from which classicSOPClassUID might have been derived w...
MLDICOMTags_EXPORT bool hasSOPClassUID(DCMTree::Const_TreePtr dcmTree, const std::string &sopClassUID, bool doDeepSearch=false)
Returns true if dcmTree is valid and has the SOPClassUID tag with the given sopClassUID value.
MLDICOMTags_EXPORT std::string translateToSingleFrameSOPClassUID(const std::string &enhancedSOPClassUID)
Returns a single frame SOPClassUID corresponding to enhancedSOPClassUID.
MLDICOMTags_EXPORT bool isMultiFrameSOPClassUID(const std::string &SOPClassUID)
Returns true if the pass UID is a multi-frame SOPClassUID, otherwise false.