# HG changeset patch # User Sebastien Jodogne # Date 1604931763 -3600 # Node ID 6d49e3b6ff77edeae4021e52d79090514e2cb95e # Parent cb9aef006229ef59dff535948aafe12e6cb222d3 fix abi of DicomImageInformation diff -r cb9aef006229 -r 6d49e3b6ff77 OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp --- a/OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp Mon Nov 09 15:07:55 2020 +0100 +++ b/OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp Mon Nov 09 15:22:43 2020 +0100 @@ -337,4 +337,10 @@ GetBytesPerValue() * GetChannelCount()); } + + + unsigned int DicomImageInformation::GetUsefulTagLength() + { + return 256; + } } diff -r cb9aef006229 -r 6d49e3b6ff77 OrthancFramework/Sources/DicomFormat/DicomImageInformation.h --- a/OrthancFramework/Sources/DicomFormat/DicomImageInformation.h Mon Nov 09 15:07:55 2020 +0100 +++ b/OrthancFramework/Sources/DicomFormat/DicomImageInformation.h Mon Nov 09 15:22:43 2020 +0100 @@ -29,18 +29,7 @@ namespace Orthanc { class ORTHANC_PUBLIC DicomImageInformation - { - public: - /** - * This constant gives a bound on the maximum tag length that is - * useful to class "DicomImageInformation", in order to avoid - * using too much memory when copying DICOM tags from "DcmDataset" - * to "DicomMap" using "ExtractDicomSummary()". The value 256 - * corresponds to ORTHANC_MAXIMUM_TAG_LENGTH that was implicitly - * used in Orthanc <= 1.7.2. - **/ - static const unsigned int USEFUL_TAG_LENGTH = 256; - + { private: unsigned int width_; unsigned int height_; @@ -95,5 +84,15 @@ bool ignorePhotometricInterpretation) const; size_t GetFrameSize() const; + + /** + * This constant gives a bound on the maximum tag length that is + * useful to class "DicomImageInformation", in order to avoid + * using too much memory when copying DICOM tags from "DcmDataset" + * to "DicomMap" using "ExtractDicomSummary()". It answers the + * value 256, which corresponds to ORTHANC_MAXIMUM_TAG_LENGTH that + * was implicitly used in Orthanc <= 1.7.2. + **/ + static unsigned int GetUsefulTagLength(); }; } diff -r cb9aef006229 -r 6d49e3b6ff77 OrthancFramework/Sources/DicomParsing/Internals/DicomFrameIndex.cpp --- a/OrthancFramework/Sources/DicomParsing/Internals/DicomFrameIndex.cpp Mon Nov 09 15:07:55 2020 +0100 +++ b/OrthancFramework/Sources/DicomParsing/Internals/DicomFrameIndex.cpp Mon Nov 09 15:22:43 2020 +0100 @@ -350,7 +350,7 @@ // Extract information about the image structure DicomMap tags; std::set ignoreTagLength; - FromDcmtkBridge::ExtractDicomSummary(tags, dicom, DicomImageInformation::USEFUL_TAG_LENGTH, ignoreTagLength); + FromDcmtkBridge::ExtractDicomSummary(tags, dicom, DicomImageInformation::GetUsefulTagLength(), ignoreTagLength); DicomImageInformation information(tags); diff -r cb9aef006229 -r 6d49e3b6ff77 OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp --- a/OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp Mon Nov 09 15:07:55 2020 +0100 +++ b/OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp Mon Nov 09 15:22:43 2020 +0100 @@ -252,7 +252,7 @@ DicomMap m; std::set ignoreTagLength; - FromDcmtkBridge::ExtractDicomSummary(m, dataset, DicomImageInformation::USEFUL_TAG_LENGTH, ignoreTagLength); + FromDcmtkBridge::ExtractDicomSummary(m, dataset, DicomImageInformation::GetUsefulTagLength(), ignoreTagLength); /** * Create an accessor to the raw values of the DICOM image. @@ -325,7 +325,7 @@ { DicomMap m; std::set ignoreTagLength; - FromDcmtkBridge::ExtractDicomSummary(m, dataset, DicomImageInformation::USEFUL_TAG_LENGTH, ignoreTagLength); + FromDcmtkBridge::ExtractDicomSummary(m, dataset, DicomImageInformation::GetUsefulTagLength(), ignoreTagLength); DicomImageInformation info(m); PixelFormat format; @@ -614,7 +614,7 @@ DicomMap m; std::set ignoreTagLength; - FromDcmtkBridge::ExtractDicomSummary(m, dataset, DicomImageInformation::USEFUL_TAG_LENGTH, ignoreTagLength); + FromDcmtkBridge::ExtractDicomSummary(m, dataset, DicomImageInformation::GetUsefulTagLength(), ignoreTagLength); DicomImageInformation info(m); std::unique_ptr target(CreateImage(dataset, true));