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

#include <itkRectangularImageNeighborhoodShape.h>

Detailed Description

template<unsigned int VImageDimension>
class itk::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

Definition at line 53 of file itkRectangularImageNeighborhoodShape.h.

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

Public Member Functions

constexpr vcl_size_t GetNumberOfOffsets () const noexcept
constexpr RectangularImageNeighborhoodShape (const Size< ImageDimension > &radius) noexcept
void FillOffsets (Offset< ImageDimension > *const offsets) const noexcept

Static Public Attributes

static constexpr unsigned int ImageDimension = VImageDimension

Private Member Functions

constexpr vcl_size_t CalculateNumberOfOffsets (const unsigned int dimension) const noexcept

Private Attributes

vcl_size_t m_NumberOfOffsets
Size< ImageDimensionm_Radius

Constructor & Destructor Documentation

◆ RectangularImageNeighborhoodShape()

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

Constructs a hyperrectangular shape whose size is specified by the radius

Definition at line 60 of file itkRectangularImageNeighborhoodShape.h.

Member Function Documentation

◆ CalculateNumberOfOffsets()

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

◆ FillOffsets()

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

◆ GetNumberOfOffsets()

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

Returns the number of offsets needed to represent this shape.

Definition at line 68 of file itkRectangularImageNeighborhoodShape.h.

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

Member Data Documentation

◆ ImageDimension

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

◆ m_NumberOfOffsets

template<unsigned int VImageDimension>
vcl_size_t itk::RectangularImageNeighborhoodShape< VImageDimension >::m_NumberOfOffsets

◆ m_Radius

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

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