nipy / nipy/nitransforms

Incorrect dimension order with HDF5 warp field transforms

Open
#171 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
35
Forks
18
Avg merge
21h 48m
Merged PRs (30d)
1

Description

Hello,

It seems that loading composite transforms using ITKCompositeH5 may generate incorrect warp fields data. Here is some minimal code and data to replicate the problem:
https://www.dropbox.com/sh/9q7fkiil5acd9wy/AAD9IAK-fPIQZ6HSke67nFPea?dl=0

My understanding is that the tensor dimensions were messed up when the warp field data was loaded from the HDF5 file, somehow the first and the third dimensions were swapped.

ants_t1_to_mniComposite.h5 was from a working directory of fMRIPrep 21.0.2, and it's identical to sub-*_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5 in the output directory. The NIFTI file was generated using CompositeTransformUtil --disassemble ants_t1_to_mniComposite.h5 ants_t1_to_mniComposite.

Best,
Feilong

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the linked data and ants_t1_to_mniComposite.h5, using ITKCompositeH5 and the NIFTI produced by CompositeTransformUtil --disassemble. Trace how the composite transform loads the warp field and verify the tensor dimension order; done means the loaded warp field matches the expected NIFTI orientation without swapping the first and third dimensions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.