Closed N-Dekker closed 1 month ago
@dzenanz, @issakomi Thanks for your approval! I think this PR can wait until after v5.4.0. right? I just submitted the PR, so that we don't forget about it!
/azp run ITK.Linux
I think this pull request may also be merged now, as v5.4.0 has been tagged (https://github.com/InsightSoftwareConsortium/ITK/pull/4603#issuecomment-2120498131)
The original code requested
gdcm::DataSet
to search for one and the same data element three times in a row, by calling both FindDataElement and GetDataElement for the very same tag. With this commit, the search is only performed once.Issue found by Mihail Isakov (@issakomi): https://github.com/InsightSoftwareConsortium/ITK/pull/4636#discussion_r1593789757
For the record, the redundant searches appear introduced with commit 168c457e840c3ca9e7c0b6d4df4a25252a5ddc7a, June 5, 2014: https://github.com/InsightSoftwareConsortium/ITK/blob/168c457e840c3ca9e7c0b6d4df4a25252a5ddc7a/Modules/IO/GDCM/src/itkGDCMImageIO.cxx#L384-L387