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

mp2rage_denoise.py input error #146

Open
pesojka opened this issue Dec 23, 2024 · 0 comments
Open

mp2rage_denoise.py input error #146

pesojka opened this issue Dec 23, 2024 · 0 comments

Comments

@pesojka
Copy link

pesojka commented Dec 23, 2024

Hello,
it seems that mp2rage_denoise.py takes as input T1w image instead of UNI image. This leads to the following error:

COMMAND --> /opt/micapipe/functions/mp2rage_denoise.py /tmp/6194_micapipe_proc_struc-vol_F113/sub-F113_ses-01_space-nativepro_T1w_reo.nii.gz /bids_dataset/sub-F113/ses-01/anat/sub-F113_ses-01_acq-inv1_T1map.nii.gz /bids_dataset/sub-F113/ses-01/anat/sub-F113_ses-01_acq-inv2_T1map.nii.gz /tmp/6194_micapipe_proc_struc-vol_F113/sub-F113_ses-01_space-nativepro_T1w_n4.nii.gz --mf 45
Traceback (most recent call last):
File "/opt/micapipe/functions/mp2rage_denoise.py", line 130, in
mp2rage_robust_combination(params.uni,params.inv1,params.inv2,filename_output=params.output,multiplying_factor=params.mf)
File "/opt/micapipe/functions/mp2rage_denoise.py", line 69, in mp2rage_robust_combination
image_inv1_fdata = np.sign(image_uni_fdata) * image_inv1_fdata
ValueError: operands could not be broadcast together with shapes (176,240,256) (224,240,256)

In my case, INV1, INV2 and UNI have 224,240,256 dimensions but T1w has 176,240,256 dims

files in the anat folder:
sub-F113_ses-01_acq-inv2_T1map.json
sub-F113_ses-01_acq-inv2_T1map.nii.gz
sub-F113_ses-01_acq-inv1_T1map.json
sub-F113_ses-01_acq-inv1_T1map.nii.gz
sub-F113_ses-01_acq-uni_T1map.nii.gz
sub-F113_ses-01_acq-uni_T1map.json
sub-F113_ses-01_acq-mp2rage_T1map.nii.gz
sub-F113_ses-01_acq-mp2rage_T1map.json
sub-F113_ses-01_T1w.nii.gz
sub-F113_ses-01_T1w.json

command:
singularity run --cleanenv
-B /storage/projects/neuroVFN/qMRI:/bids_dataset
-B /storage/projects/neuroVFN/qMRI/derivatives/mica023:/output_directory
-B /storage/brno2/home/pe_so/cert/license.txt:/cert
-B $SCRATCHDIR:/tmp
/storage/brno2/home/pe_so/sing_images/mica_v023.sif
-bids /bids_dataset
-out /output_directory
-sub sub-F113
-ses 01
-proc_structural
-uni
-mf 45
-proc_surf
-fs_licence /cert
-post_structural
-QC_subj

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

1 participant