ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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 std::vector<Offset<>> offsets = GenerateImageNeighborhoodOffsets(shape);
ShapedImageNeighborhoodRange<ImageType> neighborhoodRange{ *image, location, offsets };
constexpr RectangularImageNeighborhoodShape(const Size< ImageDimension > &radius) noexcept
std::vector< Offset< TImageNeighborhoodShape::ImageDimension > > GenerateImageNeighborhoodOffsets(const TImageNeighborhoodShape &shape)
Represent a n-dimensional index in a n-dimensional image.
Definition itkIndex.h:69
Represent a n-dimensional size (bounds) of a n-dimensional image.
Definition itkSize.h:70
See also
ShapedNeighborhoodIterator
ShapedImageNeighborhoodRange

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>
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.

References ImageDimension.

Member Function Documentation

◆ CalculateNumberOfOffsets()

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

◆ FillOffsets()

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

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

Definition at line 76 of file itkRectangularImageNeighborhoodShape.h.

References itk::Offset< VDimension >::begin(), ImageDimension, m_NumberOfOffsets, and m_Radius.

◆ GetNumberOfOffsets()

template<unsigned int VImageDimension>
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 m_NumberOfOffsets.

Member Data Documentation

◆ ImageDimension

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

◆ m_NumberOfOffsets

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

Definition at line 113 of file itkRectangularImageNeighborhoodShape.h.

Referenced by FillOffsets(), and 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: