Repository navigation
Bugfixes - #1
Merged
Merged
Bugfixes#1
Conversation
Port of MIQ@d6dabd5. The split searched the whole file for \r\n\r\n before \n\n, so in an LF header (Slicer/ITK) any payload bytes 0D 0A 0D 0A won - two adjacent int16 LE voxels of 2573 are enough - and the whole payload was scanned. Walk newline to newline and stop at the first \n\n or \n\r\n instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port of MIQ@d6dabd5. Sub-1e-6 float windows (SI-unit ADC maps, ~1e-9) were squashed into one or two grey levels. A degenerate window still renders black; output is unchanged for every window >= 1e-6. The interactive W/L drag had the same floor on its reference span, which would have made one drag widen such a window ~1000x. The span is now the actual window width, and the drag is inert when it is zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port of MIQ@d6dabd5's sanitizedSpacing: a zero spacing renders as 1 (the 1e-6 floor squashed that axis to one pixel) and a NaN/Inf spacing no longer yields a 1x1 slice. Metadata keeps the raw header values. Beyond the Swift fix: with spacings below 1e-6 no longer raised to 1e-6, ResampleTargetSize's own 1e-6 floor on the reference extent started to shrink slices of volumes whose largest extent is under 1e-6 (256 voxels at 1e-9 rendered at ~66 px). The floor is gone; non-finite or non-positive extents fall back to the unscaled size, which also covers a finite spacing whose extent overflows. The two identical ResampleTargetSize copies (grey, RGB) are merged into ResampleTarget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port of MIQ@d6dabd5. NIfTI-2 shares its file kinds with NIfTI-1, whose display name says "NIfTI-1". NiftiParser now takes a `compressed` flag instead of a label string and names the format once it knows the header version. Unlike macOS, the vol-0-first partial loads keep their probe header as the image's header, so all three call sites pass the flag - otherwise large 4-D NIfTI-2 files, the ones that take the partial paths, would still show "NIfTI-1". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ac45bd4's comment blamed only the 1e-6 reference-extent floor, with a wrong number. The actual invariant is that the slice extent (ResampleTarget) and maxPhysicalExtent (PrepareSlice) treat spacing identically. Measured for 256x4x4 at 1e-9, maxDimension 512 (expected 512x8 / 8x8 / 512x8): - reference term alone: 131x2 / 2x2 / 131x2 (shrunk) - per-axis floors (w/ or w/o reference term): sagittal 512x512 (blown up) The code was already floor-free on both sides; comment only. The test now compares all three plane sizes at once so a failure reports them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
No description provided.