# HG changeset patch # User Sebastien Jodogne # Date 1596728335 -7200 # Node ID 6774605d4341ac5349f94a6294c40d8d284927cb # Parent 2724977419fb8dbd9c0e5bf56eecfeb21f4565e8 keep only one signature for FromDcmtkBridge::ExtractDicomSummary() diff -r 2724977419fb -r 6774605d4341 OrthancFramework/Sources/DicomNetworking/DicomControlUserConnection.cpp --- a/OrthancFramework/Sources/DicomNetworking/DicomControlUserConnection.cpp Thu Aug 06 15:55:03 2020 +0200 +++ b/OrthancFramework/Sources/DicomNetworking/DicomControlUserConnection.cpp Thu Aug 06 17:38:55 2020 +0200 @@ -82,7 +82,8 @@ else { DicomMap m; - FromDcmtkBridge::ExtractDicomSummary(m, *responseIdentifiers, 0 /* don't truncate tags */); + std::set ignoreTagLength; + FromDcmtkBridge::ExtractDicomSummary(m, *responseIdentifiers, 0 /* don't truncate tags */, ignoreTagLength); if (!m.HasTag(DICOM_TAG_QUERY_RETRIEVE_LEVEL)) { diff -r 2724977419fb -r 6774605d4341 OrthancFramework/Sources/DicomNetworking/Internals/FindScp.cpp --- a/OrthancFramework/Sources/DicomNetworking/Internals/FindScp.cpp Thu Aug 06 15:55:03 2020 +0200 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/FindScp.cpp Thu Aug 06 17:38:55 2020 +0200 @@ -265,7 +265,8 @@ } DicomMap input; - FromDcmtkBridge::ExtractDicomSummary(input, *requestIdentifiers, 0 /* don't truncate tags */); + std::set ignoreTagLength; + FromDcmtkBridge::ExtractDicomSummary(input, *requestIdentifiers, 0 /* don't truncate tags */, ignoreTagLength); DicomMap filtered; FixFindQuery(filtered, input); diff -r 2724977419fb -r 6774605d4341 OrthancFramework/Sources/DicomNetworking/Internals/GetScp.cpp --- a/OrthancFramework/Sources/DicomNetworking/Internals/GetScp.cpp Thu Aug 06 15:55:03 2020 +0200 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/GetScp.cpp Thu Aug 06 17:38:55 2020 +0200 @@ -148,7 +148,8 @@ if (data.lastRequest_ == NULL) { DicomMap input; - FromDcmtkBridge::ExtractDicomSummary(input, *requestIdentifiers, 0 /* don't truncate tags */); + std::set ignoreTagLength; + FromDcmtkBridge::ExtractDicomSummary(input, *requestIdentifiers, 0 /* don't truncate tags */, ignoreTagLength); try { diff -r 2724977419fb -r 6774605d4341 OrthancFramework/Sources/DicomNetworking/Internals/MoveScp.cpp --- a/OrthancFramework/Sources/DicomNetworking/Internals/MoveScp.cpp Thu Aug 06 15:55:03 2020 +0200 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/MoveScp.cpp Thu Aug 06 17:38:55 2020 +0200 @@ -166,7 +166,8 @@ if (data.lastRequest_ == NULL) { DicomMap input; - FromDcmtkBridge::ExtractDicomSummary(input, *requestIdentifiers, 0 /* don't truncate tags */); + std::set ignoreTagLength; + FromDcmtkBridge::ExtractDicomSummary(input, *requestIdentifiers, 0 /* don't truncate tags */, ignoreTagLength); try { diff -r 2724977419fb -r 6774605d4341 OrthancFramework/Sources/DicomNetworking/Internals/StoreScp.cpp --- a/OrthancFramework/Sources/DicomNetworking/Internals/StoreScp.cpp Thu Aug 06 15:55:03 2020 +0200 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/StoreScp.cpp Thu Aug 06 17:38:55 2020 +0200 @@ -162,7 +162,7 @@ { std::set ignoreTagLength; - FromDcmtkBridge::ExtractDicomSummary(summary, **imageDataSet, 0 /* don't truncate tags */); + FromDcmtkBridge::ExtractDicomSummary(summary, **imageDataSet, ORTHANC_MAXIMUM_TAG_LENGTH, ignoreTagLength); FromDcmtkBridge::ExtractDicomAsJson(dicomJson, **imageDataSet, ignoreTagLength); if (!FromDcmtkBridge::SaveToMemoryBuffer(buffer, **imageDataSet)) diff -r 2724977419fb -r 6774605d4341 OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp --- a/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp Thu Aug 06 15:55:03 2020 +0200 +++ b/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp Thu Aug 06 17:38:55 2020 +0200 @@ -470,9 +470,10 @@ void FromDcmtkBridge::ExtractDicomSummary(DicomMap& target, DcmItem& dataset, unsigned int maxStringLength, - Encoding defaultEncoding, const std::set& ignoreTagLength) { + const Encoding defaultEncoding = GetDefaultDicomEncoding(); + bool hasCodeExtensions; Encoding encoding = DetectEncoding(hasCodeExtensions, dataset, defaultEncoding); @@ -2036,16 +2037,6 @@ } - void FromDcmtkBridge::ExtractDicomSummary(DicomMap& target, - DcmItem& dataset, - unsigned int maxStringLength, - const std::set& ignoreTagLength) - { - ExtractDicomSummary(target, dataset, maxStringLength, - GetDefaultDicomEncoding(), ignoreTagLength); - } - - void FromDcmtkBridge::ExtractDicomAsJson(Json::Value& target, DcmDataset& dataset, const std::set& ignoreTagLength) diff -r 2724977419fb -r 6774605d4341 OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.h --- a/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.h Thu Aug 06 15:55:03 2020 +0200 +++ b/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.h Thu Aug 06 17:38:55 2020 +0200 @@ -62,12 +62,6 @@ private: FromDcmtkBridge(); // Pure static class - static void ExtractDicomSummary(DicomMap& target, - DcmItem& dataset, - unsigned int maxStringLength, - Encoding defaultEncoding, - const std::set& ignoreTagLength); - static void DatasetToJson(Json::Value& parent, DcmItem& item, DicomToJsonFormat format, @@ -230,14 +224,6 @@ unsigned int maxStringLength, const std::set& ignoreTagLength); - static void ExtractDicomSummary(DicomMap& target, - DcmItem& dataset, - unsigned int maxStringLength) - { - std::set none; - ExtractDicomSummary(target, dataset, maxStringLength, none); - } - static void ExtractDicomAsJson(Json::Value& target, DcmDataset& dataset, const std::set& ignoreTagLength); diff -r 2724977419fb -r 6774605d4341 OrthancFramework/Sources/DicomParsing/Internals/DicomFrameIndex.cpp --- a/OrthancFramework/Sources/DicomParsing/Internals/DicomFrameIndex.cpp Thu Aug 06 15:55:03 2020 +0200 +++ b/OrthancFramework/Sources/DicomParsing/Internals/DicomFrameIndex.cpp Thu Aug 06 17:38:55 2020 +0200 @@ -357,7 +357,8 @@ // Extract information about the image structure DicomMap tags; - FromDcmtkBridge::ExtractDicomSummary(tags, dicom, 0 /* don't truncate tags */); + std::set ignoreTagLength; + FromDcmtkBridge::ExtractDicomSummary(tags, dicom, ORTHANC_MAXIMUM_TAG_LENGTH, ignoreTagLength); DicomImageInformation information(tags); diff -r 2724977419fb -r 6774605d4341 OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp --- a/OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp Thu Aug 06 15:55:03 2020 +0200 +++ b/OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp Thu Aug 06 17:38:55 2020 +0200 @@ -250,7 +250,8 @@ // See also: http://support.dcmtk.org/wiki/dcmtk/howto/accessing-compressed-data DicomMap m; - FromDcmtkBridge::ExtractDicomSummary(m, dataset, 0 /* don't truncate tags */); + std::set ignoreTagLength; + FromDcmtkBridge::ExtractDicomSummary(m, dataset, ORTHANC_MAXIMUM_TAG_LENGTH, ignoreTagLength); /** * Create an accessor to the raw values of the DICOM image. @@ -322,7 +323,8 @@ bool ignorePhotometricInterpretation) { DicomMap m; - FromDcmtkBridge::ExtractDicomSummary(m, dataset, 0 /* don't truncate tags */); + std::set ignoreTagLength; + FromDcmtkBridge::ExtractDicomSummary(m, dataset, ORTHANC_MAXIMUM_TAG_LENGTH, ignoreTagLength); DicomImageInformation info(m); PixelFormat format; @@ -602,7 +604,8 @@ } DicomMap m; - FromDcmtkBridge::ExtractDicomSummary(m, dataset, 0 /* don't truncate tags */); + std::set ignoreTagLength; + FromDcmtkBridge::ExtractDicomSummary(m, dataset, ORTHANC_MAXIMUM_TAG_LENGTH, ignoreTagLength); DicomImageInformation info(m); std::unique_ptr target(CreateImage(dataset, true)); diff -r 2724977419fb -r 6774605d4341 OrthancFramework/Sources/DicomParsing/ParsedDicomDir.cpp --- a/OrthancFramework/Sources/DicomParsing/ParsedDicomDir.cpp Thu Aug 06 15:55:03 2020 +0200 +++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomDir.cpp Thu Aug 06 17:38:55 2020 +0200 @@ -110,7 +110,9 @@ lowerOffsets_[i] = lower; std::unique_ptr entry(new DicomMap); - FromDcmtkBridge::ExtractDicomSummary(*entry, *item, 0 /* don't truncate tags */); + + std::set ignoreTagLength; + FromDcmtkBridge::ExtractDicomSummary(*entry, *item, 0 /* don't truncate tags */, ignoreTagLength); if (next != 0) { diff -r 2724977419fb -r 6774605d4341 OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp --- a/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp Thu Aug 06 15:55:03 2020 +0200 +++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp Thu Aug 06 17:38:55 2020 +0200 @@ -1657,7 +1657,9 @@ void ParsedDicomFile::ExtractDicomSummary(DicomMap& target) const { - FromDcmtkBridge::ExtractDicomSummary(target, *GetDcmtkObject().getDataset(), ORTHANC_MAXIMUM_TAG_LENGTH); + std::set ignoreTagLength; + FromDcmtkBridge::ExtractDicomSummary(target, *GetDcmtkObject().getDataset(), + ORTHANC_MAXIMUM_TAG_LENGTH, ignoreTagLength); } diff -r 2724977419fb -r 6774605d4341 OrthancServer/Sources/DicomInstanceToStore.cpp --- a/OrthancServer/Sources/DicomInstanceToStore.cpp Thu Aug 06 15:55:03 2020 +0200 +++ b/OrthancServer/Sources/DicomInstanceToStore.cpp Thu Aug 06 17:38:55 2020 +0200 @@ -241,20 +241,19 @@ assert(parsed_.HasContent()); // At this point, we have parsed the DICOM file + std::set ignoreTagLength; if (!summary_.HasContent()) { summary_.Allocate(); FromDcmtkBridge::ExtractDicomSummary(summary_.GetContent(), *parsed_.GetContent().GetDcmtkObject().getDataset(), - ORTHANC_MAXIMUM_TAG_LENGTH); + ORTHANC_MAXIMUM_TAG_LENGTH, ignoreTagLength); } if (!json_.HasContent()) { json_.Allocate(); - - std::set ignoreTagLength; FromDcmtkBridge::ExtractDicomAsJson(json_.GetContent(), *parsed_.GetContent().GetDcmtkObject().getDataset(), ignoreTagLength);