InsightSoftwareConsortium / InsightSoftwareConsortium/itk_cucim
boundary handling conventions
- Dominant language
- Python
- Stars
- 3
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
`scikit-image` boundary handling names are unfortunately [currently inconsistent across functions](https://github.com/scikit-image/scikit-image/issues/5439#issuecomment-903344391), but all filters use `scipy.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 | ITK
------------|----------
'constant' | itk.ConstantBoundaryCondition
'nearest' (but `skimage.transforms` uses 'edge' instead!)| itk.ZeroFluxNeumannBoundaryCondition
'wrap' | itk.PeriodicBoundaryCondition
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](https://docs.scipy.org/doc/scipy/tutorial/ndimage.html#interpolation-boundary-handling))
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.