Open grlee77 opened 2 years ago
There is no mirror boundary condition, there is a mirror filter. I think that itk.ConstantBoundaryCondition
does the equivalent of grid-constant
, not constant
. And generally ITK treats pixels as small hypercubes centered at the pixel position/index, see Figure 4.1 "Geometrical concepts associated with the ITK image." in section 4.1.4 of the ITK software guide.
In general, is it the case that most filters in ITK use the itk.ZeroFluxNeumannBoundaryCondition or are there common cases where the boundary mode is user-selected?
This is the default for the ConvolutionImageFilter, which is a fairly primary filter, and Neumann is also used in many other filters.
The ResampleImageFilter is also a primary filters. It's behavior is to use a constant value by default when sampling outside the input domain. However, an Extrapolator can be set the behaves like Neumann.
scikit-image
boundary handling names are unfortunately currently inconsistent across functions, but all filters usescipy.ndimage
conventions. We plan to migrate all functions to use the same conventions in a future release.From what I can tell there is the following equivalence between these ndimage names and ITK ones
skimage.transforms
uses 'edge' instead!)I didn't see an enum for a mirror boundary condition, but did see some comments in ITK code that
BSplineInterpolateImageFunction
uses that mode. Please update the table above if anything seems missing/wrong.questions regarding ITK behavior
In general, is it the case that most filters in ITK use the
itk.ZeroFluxNeumannBoundaryCondition
or are there common cases where the boundary mode is user-selected?Also, for interpolation/resampling, does ITK interpolate between the image edge and background as in 'grid-constant' or just immediately set the background to 0 as in 'constant' (see 1D illustrations of all modes here)