20 #include <ThirdPartyWarningsDisable.h>
24 #include <ThirdPartyWarningsRestore.h>
29 #include "DPL_TagValueProvider.h"
30 #include "DPL_TagValue.h"
42 class DirectDicomImportImporterBase;
77 const std::vector<HardOverwriteTag> &hardOverwriteTags);
106 const DPL::TagInfo &tagInfo,
107 DPL::ErrorInfo *error =
nullptr)
const override;
113 void _setUpFrameName(
const DPL::FrameId fullFilePath,
114 DPL::ErrorInfo *error)
const;
128 bool _loadTagFromFrameId(
const DPL::TagInfo &tagInfo,
129 DPL::ErrorInfo *error,
131 ML_NAMESPACE::DicomMessageCollector &dcmMsgCollector)
const;
136 void _calculateTagValueForNonFoundTags(
const DPL::TagInfo &tagInfo,
137 std::string &tagValToReturn)
const;
142 void _handleMissingSeriesInstanceUID(
const std::string &modality,
143 std::string &tagValToReturn)
const;
156 void _handleMissingImagePositionPatient(
const std::string &modality,
157 std::string &tagValToReturn)
const;
162 void _handleMissingImageOrientationPatient(
const std::string &modality,
163 std::string &tagValToReturn)
const;
169 std::string &tagValueToReturn)
const;
175 void _getTagValueFromTag(
const DPL::TagInfo &tagInfo,
177 DPL::ErrorInfo *error,
178 std::string &tagValueToReturn,
179 int &numValues)
const;
185 enum { DDI_FILE_PATH_NOT_IN_MAP = -1,
186 DDI_FILE_LOAD_FAILED = 0,
187 DDI_FILE_LOAD_SUCCESSFUL = 1} DDIFileLoadState;
190 std::vector<HardOverwriteTag> _hardOverwriteTags;
202 std::string _allowSortingAccordingToDimensionIndexValues;
205 std::string _workaroundImageOrientationPatientTag;
222 typedef std::map<std::string, DCMTree::RawTagId> _LocalTagIdMap;
224 mutable _LocalTagIdMap _tagIdLookup;
Project global and OS specific declarations.
#define MLDIRECTDICOMIMPORT_EXPORT
Only for diagnostic purposes.
Class to represent one dicom tag.
A ConstantString which contains a std::string and its hash.
Class to collect messages and errors related to a given frame handle.
An DPL::TagValueProvider class for the DirectDicomImport module.
DPL::TagValue getTagValue(const DPL::FrameId fullFilePath, const DPL::TagInfo &tagInfo, DPL::ErrorInfo *error=nullptr) const override
Retrieves the value for the tag in the specified DICOM file.
void setAllowSortingAccordingToDimensionIndexValues(const std::string &allowMode)
Determines whether or how the DimensionIndexValue tag value can be used instead of a missing ImagePos...
void setWorkaroundImageOrientationPatientTag(const std::string &workaroundValue)
The default ImageOrientationPatient tag to be used instead of a non existing one for the case that an...
DirectDicomImportDPLTagValueProvider(DPL::Logger &logger, DirectDicomImportImporterBase &importer, const std::vector< HardOverwriteTag > &hardOverwriteTags)
Constructs a new TagValueProviderExample with the base directory.
const ConstantString & getFrameName() const
The frame name from which the recent tag was retrieved.
const std::string & setAllowSortingAccordingToDimensionIndexValues() const
Returns the value set by setAllowSortingAccordingToDimensionIndexValues.
const std::string & getWorkaroundImageOrientationPatientTag() const
Returns the value set by setWorkaroundImageOrientationPatientTag.
Base importer class for the DirectDicomImport module.
Header file of class to collect messages and errors related to a given frame handle.
boost::shared_ptr< const Tag > Const_TagPtr
Forward and includes of internally used DPL classes.
std::map< std::string, int > FileLoadStateLookUp
Typedef for a map used for fast look up of file load states.
boost::log::sources::severity_channel_logger< SeverityLevel > Logger
Simple structure of a tag id and a string which overwrites this tag value.
std::string val
Value used to overwrite tags with ID id.
DCMTree::RawTagId id
Id of tags to be overwritten.