ITK  5.2.0
Insight Toolkit
Public Member Functions | Static Public Attributes | List of all members
itk::Experimental::RectangularImageNeighborhoodShape< VImageDimension > Class Template Reference

#include <itkRectangularImageNeighborhoodShape.h>

+ Collaboration diagram for itk::Experimental::RectangularImageNeighborhoodShape< VImageDimension >:

Public Member Functions

constexpr std::vcl_size_t GetNumberOfOffsets () const noexcept
 
constexpr RectangularImageNeighborhoodShape (const Size< ImageDimension > &radius) noexcept
 

Static Public Attributes

static constexpr unsigned int ImageDimension = VImageDimension
 
Size< ImageDimensionm_Radius
 
std::vcl_size_t m_NumberOfOffsets
 
void FillOffsets (Offset< ImageDimension > *const offsets) const noexcept
 
constexpr std::vcl_size_t CalculateNumberOfOffsets (const unsigned dimension) const noexcept
 

Detailed Description

template<unsigned int VImageDimension>
class itk::Experimental::RectangularImageNeighborhoodShape< VImageDimension >

Rectangular (or hyperrectangular) image-neighborhood shape. Eases creating a sequence of offsets for ShapedImageNeighborhoodRange. Can also be used for ShapedNeighborhoodIterator.

The following example creates a 3 x 5 rectangular neighborhood around pixel location [10, 20], and generates the offsets for a neighborhood range:

const Index<> location = { 10, 20 };
const Size<> radius = { { 1, 2 } };
const RectangularImageNeighborhoodShape<2> shape{ radius };
const std::vector<Offset<>> offsets = GenerateImageNeighborhoodOffsets(shape);
ShapedImageNeighborhoodRange<ImageType> neighborhoodRange{ *image, location, offsets };
See also
ShapedNeighborhoodIterator
ShapedImageNeighborhoodRange

Definition at line 55 of file itkRectangularImageNeighborhoodShape.h.

Constructor & Destructor Documentation

◆ RectangularImageNeighborhoodShape()

template<unsigned int VImageDimension>
constexpr itk::Experimental::RectangularImageNeighborhoodShape< VImageDimension >::RectangularImageNeighborhoodShape ( const Size< ImageDimension > &  radius)
inlineexplicitconstexprnoexcept

Constructs a hyperrectangular shape whose size is specified by the radius

Definition at line 62 of file itkRectangularImageNeighborhoodShape.h.

Member Function Documentation

◆ CalculateNumberOfOffsets()

template<unsigned int VImageDimension>
constexpr std::vcl_size_t itk::Experimental::RectangularImageNeighborhoodShape< VImageDimension >::CalculateNumberOfOffsets ( const unsigned  dimension) const
inlineconstexprprivatenoexcept

Fills the specified buffer with the offsets for a neighborhood of this shape.

Definition at line 121 of file itkRectangularImageNeighborhoodShape.h.

References itk::Size< VDimension >::m_InternalArray, and itk::Experimental::RectangularImageNeighborhoodShape< VImageDimension >::m_Radius.

◆ FillOffsets()

template<unsigned int VImageDimension>
void itk::Experimental::RectangularImageNeighborhoodShape< VImageDimension >::FillOffsets ( Offset< ImageDimension > *const  offsets) const
inlinenoexcept

◆ GetNumberOfOffsets()

template<unsigned int VImageDimension>
constexpr std::vcl_size_t itk::Experimental::RectangularImageNeighborhoodShape< VImageDimension >::GetNumberOfOffsets ( ) const
inlineconstexprnoexcept

Returns the number of offsets needed to represent this shape.

Definition at line 70 of file itkRectangularImageNeighborhoodShape.h.

References itk::Experimental::RectangularImageNeighborhoodShape< VImageDimension >::m_NumberOfOffsets.

Member Data Documentation

◆ ImageDimension

template<unsigned int VImageDimension>
constexpr unsigned int itk::Experimental::RectangularImageNeighborhoodShape< VImageDimension >::ImageDimension = VImageDimension
staticconstexpr

◆ m_NumberOfOffsets

template<unsigned int VImageDimension>
std::vcl_size_t itk::Experimental::RectangularImageNeighborhoodShape< VImageDimension >::m_NumberOfOffsets
private

◆ m_Radius

template<unsigned int VImageDimension>
Size<ImageDimension> itk::Experimental::RectangularImageNeighborhoodShape< VImageDimension >::m_Radius
private

The documentation for this class was generated from the following file:
itk::Experimental::GenerateImageNeighborhoodOffsets
std::vector< Offset< TImageNeighborhoodShape::ImageDimension > > GenerateImageNeighborhoodOffsets(const TImageNeighborhoodShape &shape)
Definition: itkImageNeighborhoodOffsets.h:33