ITK  5.4.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Attributes | List of all members
itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator > Class Template Reference

#include <itkBinaryBallStructuringElement.h>

Detailed Description

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
class itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >

A Neighborhood that represents a ball structuring element (ellipsoid) with binary elements.

This class defines a Neighborhood whose elements are either off or on depending on whether they are outside or inside an ellipsoid whose radii match the radii of the Neighborhood. This class can be used as a structuring element for the Morphology image filters.

A BinaryBallStructuringElement has an N-dimensional radius. The radius is defined separately for each dimension as the number of pixels that the neighborhood extends outward from the center pixel. For example, a 2D BinaryBallStructuringElement object with a radius of 2x3 has sides of length 5x7.

BinaryBallStructuringElement objects always have an unambiguous center because their side lengths are always odd.

Internally, this class carries out all of its computations using the FlatStructuringElement. It is preferable to use that class instead of this one because FlatStructuringElement is more flexible.

See also
Neighborhood
MorphologyImageFilter
BinaryDilateImageFilter
BinaryErodeImageFilter
ITK Sphinx Examples:
Examples
Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx, Examples/Filtering/MathematicalMorphologyBinaryFilters.cxx, Examples/Filtering/MathematicalMorphologyGrayscaleFilters.cxx, Examples/Filtering/MorphologicalImageEnhancement.cxx, SphinxExamples/src/Filtering/BinaryMathematicalMorphology/ClosingBinaryImage/Code.cxx, SphinxExamples/src/Filtering/BinaryMathematicalMorphology/OpeningBinaryImage/Code.cxx, and SphinxExamples/src/Filtering/MathematicalMorphology/CreateABinaryBallStructuringElement/Code.cxx.

Definition at line 62 of file itkBinaryBallStructuringElement.h.

+ Inheritance diagram for itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >:
+ Collaboration diagram for itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >:

Public Types

using AllocatorType = TAllocator
 
using ConstIterator = typename AllocatorType::const_iterator
 
using Iterator = typename AllocatorType::iterator
 
using PixelType = TPixel
 
using RadiusType = itk::Size< VDimension >
 
using Self = BinaryBallStructuringElement
 
using SizeType = itk::Size< VDimension >
 
using SizeValueType = typename SizeType::SizeValueType
 
using SliceIteratorType = SliceIterator< TPixel, Self >
 
using Superclass = Neighborhood< TPixel, VDimension, TAllocator >
 
- Public Types inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
using AllocatorType = TAllocator
 
using ConstIterator = typename AllocatorType::const_iterator
 
using DimensionValueType = unsigned int
 
using Iterator = typename AllocatorType::iterator
 
using NeighborIndexType = SizeValueType
 
using OffsetType = Offset< VDimension >
 
using PixelType = TPixel
 
using RadiusType = itk::Size< VDimension >
 
using Self = Neighborhood
 
using SizeType = itk::Size< VDimension >
 
using SizeValueType = typename SizeType::SizeValueType
 
using SliceIteratorType = SliceIterator< TPixel, Self >
 

Public Member Functions

 BinaryBallStructuringElement ()=default
 
 BinaryBallStructuringElement (const Self &other)
 
void CreateStructuringElement ()
 
 ~BinaryBallStructuringElement () override=default
 
Selfoperator= (const Self &other)
 
- Public Member Functions inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
NeighborIndexType GetCenterNeighborhoodIndex () const
 
TPixel GetCenterValue () const
 
virtual const char * GetNameOfClass () const
 
virtual NeighborIndexType GetNeighborhoodIndex (const OffsetType &) const
 
OffsetType GetOffset (NeighborIndexType i) const
 
const SizeType GetRadius () const
 
SizeValueType GetRadius (DimensionValueType n) const
 
SizeType GetSize () const
 
SizeValueType GetSize (DimensionValueType n) const
 
std::slice GetSlice (unsigned int) const
 
OffsetValueType GetStride (DimensionValueType axis) const
 
 ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION (Self)
 
 Neighborhood ()=default
 
 Neighborhood (const Self &)=default
 
 Neighborhood (Self &&)=default
 
Selfoperator= (const Self &)=default
 
Selfoperator= (Self &&)=default
 
bool operator== (const Self &other) const
 
void Print (std::ostream &os) const
 
void SetRadius (const SizeType &)
 
void SetRadius (const SizeValueType)
 
NeighborIndexType Size () const
 
virtual ~Neighborhood ()=default
 
Iterator End ()
 
Iterator Begin ()
 
ConstIterator End () const
 
ConstIterator Begin () const
 
TPixel & operator[] (NeighborIndexType i)
 
const TPixel & operator[] (NeighborIndexType i) const
 
TPixel & GetElement (NeighborIndexType i)
 
void SetRadius (const SizeValueType *rad)
 
AllocatorTypeGetBufferReference ()
 
const AllocatorTypeGetBufferReference () const
 
TPixel & operator[] (const OffsetType &o)
 
const TPixel & operator[] (const OffsetType &o) const
 

Static Public Attributes

static constexpr unsigned int NeighborhoodDimension = VDimension
 
- Static Public Attributes inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
static constexpr unsigned int NeighborhoodDimension = VDimension
 

Additional Inherited Members

- Protected Member Functions inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
virtual void Allocate (NeighborIndexType i)
 
virtual void ComputeNeighborhoodOffsetTable ()
 
virtual void ComputeNeighborhoodStrideTable ()
 
virtual void PrintSelf (std::ostream &, Indent) const
 
void SetSize ()
 

Member Typedef Documentation

◆ AllocatorType

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >::AllocatorType = TAllocator

External support for allocator type.

Definition at line 70 of file itkBinaryBallStructuringElement.h.

◆ ConstIterator

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >::ConstIterator = typename AllocatorType::const_iterator

Definition at line 82 of file itkBinaryBallStructuringElement.h.

◆ Iterator

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >::Iterator = typename AllocatorType::iterator

Iterator type alias support Note the naming is intentional, i.e., AllocatorType::iterator and AllocatorType::const_iterator, because the allocator may be a vnl object or other type, which uses this form.

Definition at line 81 of file itkBinaryBallStructuringElement.h.

◆ PixelType

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >::PixelType = TPixel

External support for pixel type.

Definition at line 76 of file itkBinaryBallStructuringElement.h.

◆ RadiusType

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::Neighborhood< TPixel, VDimension, TAllocator >::RadiusType = itk::Size<VDimension>

Radius type alias support

Definition at line 83 of file itkNeighborhood.h.

◆ Self

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >::Self = BinaryBallStructuringElement

Standard class type aliases.

Definition at line 66 of file itkBinaryBallStructuringElement.h.

◆ SizeType

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::Neighborhood< TPixel, VDimension, TAllocator >::SizeType = itk::Size<VDimension>

Size and value type alias support

Definition at line 79 of file itkNeighborhood.h.

◆ SizeValueType

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::Neighborhood< TPixel, VDimension, TAllocator >::SizeValueType = typename SizeType::SizeValueType

Definition at line 80 of file itkNeighborhood.h.

◆ SliceIteratorType

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >::SliceIteratorType = SliceIterator<TPixel, Self>

External slice iterator type alias support

Definition at line 92 of file itkBinaryBallStructuringElement.h.

◆ Superclass

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >::Superclass = Neighborhood<TPixel, VDimension, TAllocator>

Definition at line 67 of file itkBinaryBallStructuringElement.h.

Constructor & Destructor Documentation

◆ BinaryBallStructuringElement() [1/2]

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >::BinaryBallStructuringElement ( )
default

Default constructor.

◆ ~BinaryBallStructuringElement()

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >::~BinaryBallStructuringElement ( )
overridedefault

Default destructor.

◆ BinaryBallStructuringElement() [2/2]

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >::BinaryBallStructuringElement ( const Self other)
inline

Copy constructor.

Definition at line 101 of file itkBinaryBallStructuringElement.h.

Member Function Documentation

◆ CreateStructuringElement()

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >::CreateStructuringElement ( )

Build the structuring element

◆ operator=()

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
Self& itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >::operator= ( const Self other)
inline

Assignment operator.

Definition at line 107 of file itkBinaryBallStructuringElement.h.

Member Data Documentation

◆ NeighborhoodDimension

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
constexpr unsigned int itk::BinaryBallStructuringElement< TPixel, VDimension, TAllocator >::NeighborhoodDimension = VDimension
staticconstexpr

External support for dimensionality.

Definition at line 73 of file itkBinaryBallStructuringElement.h.


The documentation for this class was generated from the following file: