When running the N4 filter as part of my (c#) code, I see that if the input image has only 1 slice I get an error, even if I set ShrinkFactor=1. The error message is:
Exception thrown in SimpleITK N4BiasFieldCorrectionImageFilter_Execute: d:\a\1\sitk-build\itk-prefix\include\itk-5.2\itkImageBase.hxx:165:
ITK ERROR: Image(00000218C297CE70): A spacing of 0 is not allowed: Spacing is [0, 123, 123]
With 2 slices or more, I don’t get an error (as long as the shrink factor is 1).
Will be glad for any advice - thank you!