Constant boundary¶
-
struct ConstantBoundary¶
Struct for dealing with n-dimensional image boundaries by returning a constant values for coordinates out of bounds.
Public Static Functions
-
template<typename T, int Dim>
static inline T apply(const pybind11::detail::unchecked_reference<T, Dim> &image, const std::array<int, Dim> &voxel_position, T background_value)¶ Apply the constant boundary to the given image and position.
- Parameters:
image – [in] The image to sample
voxel_position – [in] The position at which to sample
background_value – [in] The background value to use if the given position is out of bounds
- Template Parameters:
T – The data type of the given image
Dim – The dimensions of the given image
- Returns:
The value at the given position using the rules defined by ConstantBoundary for positions outside of the given image.
-
template<typename T, int Dim>