ENH: Read NIfTI File should apply flipped axes from the stored transform
I maintainer di solito rispondono entro 6 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with ReadNiftiHeader and the voxel read in src/Plugins/ImageProcessing/src/ImageProcessing/utils/NiftiUtilities.cpp, then trace preflight and warning -34750 in ReadNIfTIFileFilter and review ReadNIfTIFileFilter.md. Check both the regular and out-of-core paths. The issue leaves the flip option, origin convention, and warning behavior undecided; those decisions must be settled before implementation, and done means flipped voxel order and geometry preserve the file's physical placement.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Request. With Use Stored Affine Transform on, Read NIfTI File (ReadNIfTIFileFilter) should apply an axis flip that the file stores. When the file gives a negative direction for an axis, the filter should reverse the voxel order along that axis and move the origin, so that the Image Geometry has the same physical placement and orientation as the file. Today the filter only warns about the flip.
Why it is needed. Many NIfTI files store a negative direction for one or more axes. The common LPS/RAS radiological conventions use a negative X or Y direction. The reader always uses positive spacing and loads the voxels in their stored order, so such an image is placed mirrored along that axis. A user who combines it with other data in physical coordinates, for example a mask or a second scan, gets data that does not line up. The warning tells the user about this, but the user must then flip the data with another filter and correct the origin by hand.
How it works now.
ReadNiftiHeadertakes the spacing from the length of each sform column (always positive) and the origin from the translation column. For the qform, it uses the offsets as the origin and only checks the quaternion for a rotation. The sign of each axis is dropped.- PR #1911 (#1908 item L59) adds a flag for a flipped axis: a negative diagonal term in a used sform, qfac = -1 (
pixdim[0] < 0) in a used qform, or a negativepixdim[1..3]when no sform is used. Preflight then gives warning -34750 ("contains negative direction values ... does not preserve these directions"). The geometry and the voxel order do not change. - A rotation in the transform is dropped too, with its own warning -34750 (ReadNIfTIFileFilter.cpp:279). Rotations are not part of this request.
Where it applies.
src/Plugins/ImageProcessing/src/ImageProcessing/utils/NiftiUtilities.cpp(ReadNiftiHeaderand the voxel read).ReadNIfTIFileFilter(preflight geometry values and warning -34750) and its documentation pageReadNIfTIFileFilter.md.- The out-of-core read path, because the voxel order along a flipped axis changes.
Open design points. Whether the flip is always applied or is a new option (and its default), which origin the flipped geometry gets (the physical position of the first voxel or of the voxel corner), and whether warning -34750 stays for the flip case are not decided yet.
- Lingua principale
- C++
- Stelle
- 18
- Fork
- 15
- Merge medio
- 4g 23h
- PR unite (30g)
- 42
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di BlueQuartzSoftware/simplnx
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
BlueQuartzSoftware/simplnx#1987 ·
I maintainer di solito rispondono entro 6 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
BlueQuartzSoftware/simplnx#1980 ·
I maintainer di solito rispondono entro 6 giorni
-
Testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
BlueQuartzSoftware/simplnx#1979 ·
I maintainer di solito rispondono entro 6 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
BlueQuartzSoftware/simplnx#1978 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
BlueQuartzSoftware/simplnx#1945 ·
I maintainer di solito rispondono entro 6 giorni
Tutte le issue di BlueQuartzSoftware/simplnx
Issue simili
-
bug triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
26.04 bug dark-mode Easy Hack impress symptom: visual
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
CollaboraOnline/online#16421 · 1 commento ·
-
area/cs bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ydb-platform/ydb#59881 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
documentation enhancement lua server
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100