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

conforming adding header info #587

Open
m-reuter opened this issue Oct 3, 2024 · 1 comment
Open

conforming adding header info #587

m-reuter opened this issue Oct 3, 2024 · 1 comment

Comments

@m-reuter
Copy link
Member

m-reuter commented Oct 3, 2024

Description

When conforming happens from inside run_prediction it adds incorrect "TR" information to the image header.

Steps to Reproduce

Run run_prediction with an already conform input, e.g. from oasis and compare the conformed output image.
mri_info will show on the original:
TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees
and on the conformed:
TR: 1000.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees
So acquisition parameters change, while the image is identical (no conforming necessary as it is already).

Expected Behavior

Copy those values from the original header.

Environment

  • FastSurfer Version: dev
  • OS: macos

absl-py==2.1.0
certifi==2024.8.30
charset-normalizer==3.3.2
click==8.1.7
contourpy==1.3.0
cycler==0.12.1
Deprecated==1.2.14
filelock==3.16.0
fonttools==4.53.1
fsspec==2024.9.0
grpcio==1.66.1
h5py==3.11.0
humanize==4.10.0
idna==3.8
imageio==2.35.1
Jinja2==3.1.4
joblib==1.4.2
kiwisolver==1.4.7
lapy==1.1.1
lazy_loader==0.4
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.9.2
mdurl==0.1.2
mpmath==1.3.0
networkx==3.3
nibabel==5.2.1
numpy==1.26.4
packaging==24.1
pandas==2.2.2
pillow==10.4.0
plotly==5.24.0
protobuf==5.28.0
psutil==6.0.0
Pygments==2.18.0
pyparsing==3.1.4
python-dateutil==2.9.0.post0
pytz==2024.1
PyYAML==6.0.2
requests==2.32.3
rich==13.8.0
scikit-image==0.24.0
scikit-learn==1.5.1
scipy==1.14.1
shellingham==1.5.4
SimpleITK==2.4.0
six==1.16.0
sympy==1.13.2
tenacity==9.0.0
tensorboard==2.17.1
tensorboard-data-server==0.7.2
threadpoolctl==3.5.0
tifffile==2024.8.30
torch==2.4.1
torchio==0.19.9
torchvision==0.19.1
tqdm==4.66.5
typer==0.12.5
typing_extensions==4.12.2
tzdata==2024.1
urllib3==2.2.2
Werkzeug==3.0.4
wrapt==1.16.0
yacs==0.1.8

Execution

python3.10 FastSurfer/FastSurferCNN/run_prediction.py --t1 /....../T1_input.nii.gz --asegdkt_segfile /...../aparc+aseg.orig.nii.gz --conformed_name /...../T1_conform.nii.gz --brainmask_name /...../mask.nii.gz --aseg_name /...../aseg.auto_noCCseg.nii.gz --sid OAS1_0111_MR2_l --seg_log /dev/null --vox_size min --batch_size 1 --viewagg_device auto --device mps
@dkuegler
Copy link
Member

dkuegler commented Oct 4, 2024

This issue might be a nibabel bug.

The header gets initialized here and these specific fields never get touched after.

Also, these MR infos are kind of specific to MGH format and not usually included in other file formats such as nifti.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants