ENH: printing for meta data object of vectors#4831
ENH: printing for meta data object of vectors#4831hjmjohnson merged 5 commits intoInsightSoftwareConsortium:mainfrom
Conversation
|
As best I can tell: the print_helper operator is being instantiated for |
f9db8de to
764de64
Compare
|
@blowekamp — picked up your dormant draft and pushed two commits to
The compile error @dzenanz hypothesized in 2024 — "the Local verification on Apple-clang 17 (Xcode):
Convert to ready-for-review when you're satisfied with the approach. |
This comment was marked as resolved.
This comment was marked as resolved.
dzenanz
left a comment
There was a problem hiding this comment.
Looks good. I have not tested it.
|
FYI: I tested locally and added gtests to exercise on all CI platforms. |
DICOM Supplements 172/173 added the OD, OL, and OV bulk-data VRs. Add them to the binary-VR masks at the read site (InternalReadImageInformation base64-encode) and the write site (Write base64-decode) so values for those VRs survive the ITK MetaDataDictionary roundtrip instead of being silently dropped.
Regression guard for issue InsightSoftwareConsortium#1011 (fixed by InsightSoftwareConsortium#1202): a Gaussian-interpolated ResampleImageFilter must produce the same output whether or not its downstream is streamed. Reverts of the bounding-box fix (BufferedRegion vs LargestPossibleRegion) reproduce a 28672 / 32768-pixel divergence with NaN output values. A CastImageFilter is inserted upstream of the resampler so the bug surfaces; an in-memory image's BufferedRegion never shrinks under streaming, which is why the abandoned WIP draft InsightSoftwareConsortium#1012 no longer reproduced. Supersedes InsightSoftwareConsortium#1012 by @romangrothausmann; uses the modern GTest harness and fits as a TEST block in itkResampleImageFilterGTest. Co-Authored-By: Roman Grothausmann <roman.grothausmann@mh-hannover.de>
std::ostream_iterator<T> performs '*os << *iter' from inside namespace std, where ADL on std container types never reaches itk::print_helper. For nested containers (e.g. vector<vector<float>>) the inner overload is invisible and the recursion fails to compile. Replace each std::copy(..., std::ostream_iterator<T>(os, ', ')) with a manual loop whose unqualified 'os << *it' resolves print_helper overloads via namespace lookup. Co-Authored-By: Bradley Lowekamp <blowekamp@mail.nih.gov>
e0892a2 to
7d75504
Compare
|
Status update — branch now at What landed since the last force-pushFolded one fixup into the
Recap of @dzenanz's 2024 diagnosis
Confirmed correct. The earlier Local validation
|
…ests
Two-phase template lookup at template definition time only sees names
declared earlier in the translation unit. Without the forward
declarations, recursing into vector<list<T>> from inside the vector
operator's body could not find the list overload (declared later);
ADL on std container types never reaches itk::print_helper.
Adds GTests for vector<vector<int>>, vector<vector<int>{empty}>,
vector<list<int>>, and array<vector<int>, N> to lock in the recursive
behaviour that the manual loop and forward declarations together
enable.
Co-Authored-By: Bradley Lowekamp <blowekamp@mail.nih.gov>
7d75504 to
70d4cc2
Compare
|
Correcting course on the Greptile P1 fix — branch now at The previous attempt ( Why Greptile's P1 doesn't bite in practiceGreptile's hypothetical: if Why the Greptile acknowledged this in its own writeup: "The Reverted to the SFINAE-only trait. P2 (comment scope) addressed by an expanded comment explaining the using-directive's role and the What the new tip looks likeDiff vs |
closes #4368
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.