Closed gdevenyi closed 9 years ago
I don't see how that is the case:
https://github.com/stnava/ANTs/blob/master/Examples/N4BiasFieldCorrection.cxx#L376-L388
And, again, please use non-minc examples.
Whoops, yeah, here's non-minc
N4BiasFieldCorrection -d 3 --verbose -r -b [200] -c [200x200x200x200,0.0] -t [0.05,0.01,200] -w mask.nii -i 0102.nii -o 0102.N4.nii
Running N4 for 3-dimensional images.
Mask not read. Creating Otsu mask.
Exception caught:
itk::ExceptionObject (0xd96a40)
Location: "unknown"
File: /opt/quarantine/minc-toolkit/1.9.10/src/build/ITKv4/Modules/Core/Common/include/itkImageToImageFilter.hxx
Line: 248
Description: itk::ERROR: N4BiasFieldCorrectionImageFilter(0xd8ca30): Inputs do not occupy the same physical space!
InputImage Origin: [1.0770190e+02, 7.7216897e+01, -4.7320700e+01], InputImage_2 Origin: [1.0770190e+02, 7.7216897e+01, -4.7320705e+01]
Tolerance: 3.4375999e-06
InputImage Spacing: [3.4375999e+00, 3.4375999e+00, 5.1999998e+00], InputImage_2 Spacing: [3.4375999e+00, 3.4375999e+00, 5.1999898e+00]
Tolerance: 3.4375999e-06
> N4BiasFieldCorrection -d 3 -r -b [200] -c [200x200x200x200,0.0] -t [0.05,0.01,200] -w mask.nii -i 0102.nii -o 0102.N4.nii
> echo $?
0
Oh, wait, I see. That's intended. We don't want anything written if not in verbose mode due to ANTsR.
Followup to #214
When N4 runs and fails, it only shows what happened if --verbose is on
A little more concerning on that, the exit code is success: