Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T2* map not properly scaled to 2mm MNI #320

Closed
moser297 opened this issue Nov 8, 2023 · 2 comments
Closed

T2* map not properly scaled to 2mm MNI #320

moser297 opened this issue Nov 8, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@moser297
Copy link

moser297 commented Nov 8, 2023

What happened?

The T2* maps per run outputted by Nibabies for multi-echo data are not aligned with the 2mm NMI anatomicals (see screenshot)

image

@madisoth suggested that the BOLD-T1w transform step is missing

What command did you use?

singularity run --cleanenv \
-B /nibabies_test_binds/enh_single-anat/nibabies/nibabies/:/opt/conda/envs/nibabies/lib/python3.10/site-packages/nibabies \
-B /bids_in/:/bids_dir \
-B /nibabies:/output_dir \
-B /derivatives:/derivatives \
-B /work/:/wd \
-B /license.txt:/opt/freesurfer/license.txt \
/nibabies_unstable_10052023a.sif /bids_dir /output_dir participant \
--project-goodvoxels \
--output-spaces MNI152NLin6Asym:res-2 \
--surface-recon-method mcribs \
--omp-nthreads 3 \
--derivatives /derivatives/bibsnet \
--cifti-output 91k \
-vv \
-w /wd \
--fd-radius 35 \
--skip-bids-validation \
--participant-label <>

What version of NiBabies are you using?

unstable

Relevant log output

No response

Add any additional information or context about the problem here.

@madisoth provided an intermediate solution:

antsApplyTransforms --default-value 0 --float 1 --input /work/nibabies_23_2_wf/single_subject_01_wf/func_preproc_ses_01_task_restME_run_04_echo_1_wf/bold_t2smap_wf/t2smap_node/T2starmap.nii.gz --interpolation LanczosWindowedSinc --output /T2star/sub-_ses-01_task-restME_run-04_space-real-MNI152NLin6Asym_res-2_T2starmap.nii.gz --reference-image /any/anat/sub-_ses-01_space-MNI152NLin6Asym_desc-preproc_T1w.nii.gz --transform /work/nibabies_23_2_wf/single_subject__01_wf/infant_anat_wf/anat_norm_wf/_template_MNI152NLin6Asym/registration/ants_t1_to_mniComposite.h5 --transform /work/nibabies_23_2_wf/single_subject_ION0005_01_wf/func_preproc_ses_01_task_restME_run_04_echo_1_wf/bold_reg_wf/bbreg_wf/concat_xfm/out_fwd.tfm

@moser297 moser297 added the bug Something isn't working label Nov 8, 2023
@mgxd
Copy link
Collaborator

mgxd commented Nov 9, 2023

@moser297 is this specifically for the single anat branch (#316)?

@moser297
Copy link
Author

moser297 commented Nov 9, 2023

No it's not (tried it in both branches) and I actually saw the same thing in fMRIprep yesterday, when I was processing a multi-echo adult dataset.

@mgxd mgxd closed this as completed Dec 11, 2023
mgxd added a commit that referenced this issue Aug 30, 2024
24.0.0 (August 29, 2024)

This major release includes a substantial refactoring of the pipeline.

One key addition is the addition of the `--level` flag, which can take the arguments minimal, resampling or full. The default is full, which should produce nearly the same results as previous versions. minimal will produce only the minimum necessary to deterministically generate the remaining derivatives. resampling will produce some additional derivatives, intended to simplify resampling with other tools.

The `--derivatives` flag was altered to take arguments in the form `name=/path/to/dir`.
For each directory provided, if a derivative is found - it will be used instead of computing it from scratch. If a derivative is not found, NiBabies will compute it and proceed as usual.

Taken together, these features can allow a dataset provider to run a minimal NiBabies run, targeting many output spaces, while a user can then run a `--derivatives` run to generate additional derivatives in only the output spaces they need. Another use case is to provide an precomputed derivative to override the default NiBabies behavior, enabling easier workarounds for bugs or experimentation with alternatives.

Another new feature is a dynamic anatomical reference, which is set based on surface reconstruction method or through the `--reference-anatomical` flag. Previously, T1w was the default output space. Now, the reference anatomical is determined based on the surface reconstruction method.

Additionally, minor adjustments have been made to MCRIBS surface reconstruction to address failure rates. This is still an on-going investigation, but preliminary results look promising.

This release resolves a number of issues with fieldmaps inducing distortions during correction. Phase difference and direct fieldmaps are now masked correctly, preventing the overestimation of distortions outside the brain. Additionally, we now implement Jacobian weighting during unwarping, which corrects for compression and expansion effects on signal intensity. To disable Jacobian weighting, add `fmap-jacobian` to the `--ignore` argument.

Finally, a new resampling method has been added, to better account for susceptibility distortion and motion in a single shot resampling to a volumetric target space. We anticipate extending this to surface targets in the future.

  * FIX: nest pathlib import in fix_multi_source_name (#365)
  * FIX: Avoid retrieving multiple templates from latest TF (#353)
  * FIX: Raise informative error if no t1w or t2w found (#347)
  * FIX: Easier pyenv usage (#342)
  * FIX: Catch nonexistent derivatives, clean up subworkflow logic (#336)
  * FIX: Use fsLR reg sphere for MCRIBS morphometrics resampling (#334)
  * FIX: T2star map MNI scaling (#320)

  * ENH: Alter outputs when MCRIBS reconstruction is used (#329)
  * ENH: Use nireports for Report generation + add reportlet per reconstruction (#328)
  * ENH: better repr for Derivatives class (#351)

  * RF: Move to fit/apply workflow (#360)
  * RF: Replace `resource_filename` with `load_data` (#345)

  * MAINT: Bump urllib3 from 2.0.3 to 2.0.7 (#319)
  * MAINT: Raise minimum to 3.10, bump actions (#337)
  * MAINT: Bump pillow from 9.5.0 to 10.0.1 (#317)
  * MAINT: Update to latest migas API (#326)

  * DOC: Use correct argument flag (#338)
  * DOC: Move to new theme, add outputs description (#383)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants