Skip to content

N4 error in NiBabies 25.0.0 #442

@moser297

Description

@moser297

What happened?

When running NiBabies 25.0.0 with M-CRIB-S surface reconstruction and externally derived masks and segmentations, an error occurs during the N4 BiasFieldCorrection workflow stating that the tolerance between image and mask is exceeded (despite them having the exact same file header).

What command did you use?

env -i ${singularity} run --cleanenv \
-B ${in_dir}:/data:ro \
-B ${out_dir}/:/out \
-B ${nwork_dir}/:/work \
-B ${bibsnet_dir}/:/bibsnet \
-B /path/freesurfer_license/license.txt:/opt/freesurfer/license.txt \
/path/nibabies/nibabies_25.0.0.sif /data /out participant --participant-label ${SUB} \
--derivatives /bibsnet \
--fs-license-file /opt/freesurfer/license.txt \
--cifti-output 91k \
--omp-nthreads 8 \
--nprocs 8 \
--project-goodvoxels \
--surface-recon-method mcribs \
--fd-radius 45 \
--age-months ${MONTHS} \
--multi-step-reg \
--norm-csf \
-vv \
-w /work \
--output-spaces MNI152NLin6Asym:res-2

What version of NiBabies are you using?

25.0.0

Relevant log output

Cmdline:
	N4BiasFieldCorrection --bspline-fitting [ 200 ] -d 3 --input-image /work/nibabies_25_0_wf/single_subject_sub-0006_ses-MENORDIC_wf/infant_anat_fit_wf/mcribs_surface_recon_wf/t2w_las/reoriented.nii.gz --mask-image /work/nibabies_25_0_wf/single_subject_sub-0006_ses-MENORDIC_wf/infant_anat_fit_wf/mcribs_surface_recon_wf/mask_las/reoriented.nii.gz --convergence [ 50x50x50x50x50, 1e-07 ] --output [ reoriented_corrected.nii.gz, reoriented_bias.nii.gz ] -r --shrink-factor 4
Stdout:

Stderr:
	terminate called after throwing an instance of 'itk::ExceptionObject'
	  what():  /opt/conda/envs/nibabies/include/ITK-5.4/itkImageSink.hxx:239:
	ITK ERROR: LabelStatisticsImageFilter(0x5646dbda69f0): Inputs do not occupy the same physical space! 
	InputImage Origin: [-8.3953156e+01, 1.2150912e+02, -1.2113854e+02], InputImagePrimary Origin: [-8.3953148e+01, 1.2150912e+02, -1.2113854e+02]
		Tolerance: 8.0000007e-07

	Aborted

Add any additional information or context about the problem here.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions