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

#include <itkRectangularImageNeighborhoodShape.h>

+ Collaboration diagram for itk::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::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 53 of file itkRectangularImageNeighborhoodShape.h.

Constructor & Destructor Documentation

◆ RectangularImageNeighborhoodShape()

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

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 std::vcl_size_t itk::RectangularImageNeighborhoodShape< VImageDimension >::CalculateNumberOfOffsets ( const unsigned  dimension) const
inlineconstexprprivatenoexcept

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

Definition at line 119 of file itkRectangularImageNeighborhoodShape.h.

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

◆ FillOffsets()

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

◆ GetNumberOfOffsets()

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

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
staticconstexpr

◆ m_NumberOfOffsets

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

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

Definition at line 113 of file itkRectangularImageNeighborhoodShape.h.

Referenced by itk::RectangularImageNeighborhoodShape< VImageDimension >::FillOffsets(), and itk::RectangularImageNeighborhoodShape< VImageDimension >::GetNumberOfOffsets().

◆ m_Radius

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

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