MeVisLab Toolbox Reference
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 <ThirdPartyWarningsDisable.h>
16 #include <string>
17 #include <ThirdPartyWarningsRestore.h>
18 
19 #include <mlUtilsSystem.h>
20 
21 // DICOM Tree prototypes.
22 #include <DCMTree_Lib.h>
23 
24 ML_START_NAMESPACE
25 
26 //----------------------------------------------------------------------------------
28 //----------------------------------------------------------------------------------
29 namespace DICOMTagTools {
30 
36 MLDICOMTags_EXPORT std::string getModalityTagValue(DCMTree::Const_TreePtr treePtr) ML_RETURN_VALUE_SHOULD_BE_USED;
37 
40 MLDICOMTags_EXPORT std::string getSOPClassUIDTagValue(DCMTree::Const_TreePtr treePtr) ML_RETURN_VALUE_SHOULD_BE_USED;
41 
45  const std::string &modality) ML_RETURN_VALUE_SHOULD_BE_USED;
46 
52  const std::string &sopClassUID,
53  bool doDeepSearch=false) ML_RETURN_VALUE_SHOULD_BE_USED;
54 
58 MLDICOMTags_EXPORT bool hasNMSOPClassUID(DCMTree::Const_TreePtr dcmTree) ML_RETURN_VALUE_SHOULD_BE_USED;
59 
63 MLDICOMTags_EXPORT bool hasStandardMRSpectroscopyClassUID(DCMTree::Const_TreePtr dcmTree) ML_RETURN_VALUE_SHOULD_BE_USED;
64 
71 MLDICOMTags_EXPORT bool hasRetiredPETCurveStorageSOPClassUID(DCMTree::Const_TreePtr dcmTree) ML_RETURN_VALUE_SHOULD_BE_USED;
72 
74 MLDICOMTags_EXPORT bool hasSCSOPClassUID(DCMTree::Const_TreePtr dcmTree) ML_RETURN_VALUE_SHOULD_BE_USED;
75 
77 MLDICOMTags_EXPORT bool hasParametricMapSOPClassUID(DCMTree::Const_TreePtr dcmTree) ML_RETURN_VALUE_SHOULD_BE_USED;
78 
88  const std::string &modality) ML_RETURN_VALUE_SHOULD_BE_USED;
89 
91 MLDICOMTags_EXPORT bool isKnownRetiredModality(const std::string &modality) ML_RETURN_VALUE_SHOULD_BE_USED;
92 
95 MLDICOMTags_EXPORT bool isKnownModality(const std::string &modality, bool includeRetired) ML_RETURN_VALUE_SHOULD_BE_USED;
96 
100 MLDICOMTags_EXPORT std::string getModalityForSOPClassUID(const std::string &sopClassUID) ML_RETURN_VALUE_SHOULD_BE_USED;
101 
112 MLDICOMTags_EXPORT bool isMultiFrameSOPClassUID(const std::string &SOPClassUID) ML_RETURN_VALUE_SHOULD_BE_USED;
113 
115 MLDICOMTags_EXPORT bool isEnhancedSOPClassUID(const std::string &enhancedSOPClassUID) ML_RETURN_VALUE_SHOULD_BE_USED;
116 
119 
124 // Examples such as ProbandT1.dcm have NumberOfFrames tags but no FrameincrementPointer.
125 MLDICOMTags_EXPORT bool hasMultiFrameModule(DCMTree::Const_TreePtr dcmTree) ML_RETURN_VALUE_SHOULD_BE_USED;
126 
130 MLDICOMTags_EXPORT std::string translateToSingleFrameSOPClassUID(const std::string &enhancedSOPClassUID) ML_RETURN_VALUE_SHOULD_BE_USED;
131 
136  DCMTree::TreePtr singleFrame);
137 
138 };
139 
140 ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLDICOMTags_EXPORT
If included by external modules, exported symbols are declared as import symbols.
class to dump a DCMTree dicom message into a human readable file this class could be used as a starte...
boost::shared_ptr< const Tree > Const_TreePtr
Definition: DCMTree_Lib.h:73
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree
Definition: DCMTree_Lib.h:70
MLDICOMTags_EXPORT void setUpSingleFrameImageStorageSOPClassUIDDerivedFromEnhancedOne(DCMTree::Const_TreePtr dcmMFTree, DCMTree::TreePtr singleFrame)
Takes the SOPClassUID from dcmMFTree, and writes the corresponding single frame one into singlFrame.
MLDICOMTags_EXPORT bool hasStandardMRSpectroscopyClassUID(DCMTree::Const_TreePtr dcmTree) ML_RETURN_VALUE_SHOULD_BE_USED
Returns true if dcmTree is valid and has the SOPClassUID tag with the value "1.2.840....
MLDICOMTags_EXPORT bool isMultiFrameSOPClassUID(const std::string &SOPClassUID) ML_RETURN_VALUE_SHOULD_BE_USED
Returns true if the pass UID is a multi-frame SOPClassUID, otherwise false.
MLDICOMTags_EXPORT bool hasTrueModality(DCMTree::Const_TreePtr treePtr, const std::string &modality) ML_RETURN_VALUE_SHOULD_BE_USED
Returns true if the value of the modality tag is of the given modality, the tree is not a secondary c...
MLDICOMTags_EXPORT std::string getModalityTagValue(DCMTree::Const_TreePtr treePtr) ML_RETURN_VALUE_SHOULD_BE_USED
Returns a string with value of the modality tag if it can be determined from the passed tree or an em...
MLDICOMTags_EXPORT std::string getModalityForSOPClassUID(const std::string &sopClassUID) ML_RETURN_VALUE_SHOULD_BE_USED
EXPERIMENTAL FUNCTION: If its is known then return the modality corresponding to sopClassUID; if not ...
MLDICOMTags_EXPORT bool isEnhancedSOPClassUID(const std::string &enhancedSOPClassUID) ML_RETURN_VALUE_SHOULD_BE_USED
Returns true if the pass UID is an enhanced Image Storage SOPClassUID, otherwise false.
MLDICOMTags_EXPORT std::string getSOPClassUIDTagValue(DCMTree::Const_TreePtr treePtr) ML_RETURN_VALUE_SHOULD_BE_USED
Returns a string with value of the SOPClassUID tag if it can be determined from the passed tree or an...
MLDICOMTags_EXPORT bool hasRetiredPETCurveStorageSOPClassUID(DCMTree::Const_TreePtr dcmTree) ML_RETURN_VALUE_SHOULD_BE_USED
Returns true if dcmTree is of the retired Positron Emission Tomography Curve Storage type with SOPCla...
MLDICOMTags_EXPORT std::string translateToSingleFrameSOPClassUID(const std::string &enhancedSOPClassUID) ML_RETURN_VALUE_SHOULD_BE_USED
Returns a single frame SOPClassUID corresponding to enhancedSOPClassUID.
MLDICOMTags_EXPORT bool hasParametricMapSOPClassUID(DCMTree::Const_TreePtr dcmTree) ML_RETURN_VALUE_SHOULD_BE_USED
Returns true if dcmTree is valid and has a Parametric Map SOPClassUID (which does not have a specific...
MLDICOMTags_EXPORT bool hasNMSOPClassUID(DCMTree::Const_TreePtr dcmTree) ML_RETURN_VALUE_SHOULD_BE_USED
Returns true if dcmTree is valid and has the SOPClassUID tag with the value "1.2.840....
MLDICOMTags_EXPORT bool hasMultiFrameModule(DCMTree::Const_TreePtr dcmTree) ML_RETURN_VALUE_SHOULD_BE_USED
Returns true if dcmTree contains has Number of Frames (0028,0008) and Frame Increment Pointer (0028,...
MLDICOMTags_EXPORT bool isKnownRetiredModality(const std::string &modality) ML_RETURN_VALUE_SHOULD_BE_USED
Returns true if modality is a known retired one, otherwise false.
MLDICOMTags_EXPORT bool hasSCSOPClassUID(DCMTree::Const_TreePtr dcmTree) ML_RETURN_VALUE_SHOULD_BE_USED
Returns true if dcmTree is valid and has a SOPClassUID tag value matching a secondary capture SOPClas...
MLDICOMTags_EXPORT bool isKnownModality(const std::string &modality, bool includeRetired) ML_RETURN_VALUE_SHOULD_BE_USED
Returns true if modality is a known one, otherwise false; if includeRetired is true the also retired ...
MLDICOMTags_EXPORT bool hasSOPClassUIDOfModality(DCMTree::Const_TreePtr dcmTree, const std::string &modality) ML_RETURN_VALUE_SHOULD_BE_USED
EXPERIMENTAL FUNCTION: Returns true if dcmTree is valid and has the SOPClassUID tag which corresponds...
MLDICOMTags_EXPORT bool hasSharedOrPerFrameFunctionalGroupSequences(DCMTree::Const_TreePtr dcmTree) ML_RETURN_VALUE_SHOULD_BE_USED
Returns true if the Shared- or the PerFrameFunctionalGroupSequences are on root level,...
MLDICOMTags_EXPORT bool hasSOPClassUID(DCMTree::Const_TreePtr dcmTree, const std::string &sopClassUID, bool doDeepSearch=false) ML_RETURN_VALUE_SHOULD_BE_USED
Returns true if dcmTree is valid and has the SOPClassUID tag with the given sopClassUID value.