STYLE: Share the MINC apparent-dimension read between time and space - #6875
Open
hjmjohnson wants to merge 1 commit into
Open
hjmjohnson wants to merge 1 commit into
hjmjohnson wants to merge 1 commit into
Conversation
hjmjohnson
force-pushed
the
enh-minc-extract-apparent-dim-helper
branch
from
September 18, 2026 14:54
0476aba to
275d038
Compare
hjmjohnson
marked this pull request as ready for review
September 18, 2026 14:58
Contributor
|
The time-dimension block repeated the spatial loop's handle attach, positive-order request, and size/separation/start reads verbatim. A single helper keeps the two call sites from drifting apart. The vector_dimension block deliberately omits the positive-order request, so it is left alone.
hjmjohnson
force-pushed
the
enh-minc-extract-apparent-dim-helper
branch
from
September 18, 2026 15:07
275d038 to
3d96eb2
Compare
Member
Author
|
@greptileai please re-review — the redundant comment was removed in 3d96eb2; the prior review covered 275d038. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extracts the duplicated MINC apparent-dimension read in
ReadImageInformationinto one helper. No functional change; addresses item 4 of #6874.What was duplicated
The time-dimension block added by #6586 repeats the spatial loop's body nearly verbatim: attach the file dimension to the next apparent-order slot, request
MI_POSITIVEvoxel order, then read size, separation, and start in apparent order.Both call sites now use:
The spatial site keeps its own
miget_dimension_cosinescall, since the time axis derives its direction from a unit vector rather than from stored cosines.The
vector_dimensionblock is deliberately left alone: it does not request positive voxel order (a vector dimension has no meaningful step direction), so folding it into the helper would change behavior.Verification
Built on
mainafter #6586 merged, Release, clang,Module_ITKIOMINC=ONandModule_ITKIOTransformMINC=ON.ITKIOMINCforced full recompile: 0 warnings, 0 errors.ctest -R MINC— 125/125 passed (110ITKIOMINC, 4ITKIOTransformMINC, plus style/Doxygen checks).pre-commit run --all-files— exits 0, all hooks including KWStyle.