ITK  5.4.0
Insight Toolkit
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::AnnulusOperator< TPixel, TDimension, TAllocator > Class Template Reference

#include <itkAnnulusOperator.h>

Detailed Description

template<typename TPixel, unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
class itk::AnnulusOperator< TPixel, TDimension, TAllocator >

A NeighborhoodOperator for performing a matched filtering with an annulus (two concentric circles, spheres, hyperspheres, etc.)

AnnulusOperator defines a non-directional NeighborhoodOperator representing two concentric circles, spheres, hyperspheres, etc. The inner radius and the thickness of the annulus can be specified.

The values for the annulus can be specified in a variety of manners:

1) The values for the interior of the annulus (interior of inner circle), the values for annulus (the region between the inner and outer circle), and the values for the exterior of the annulus can be specified. This mode is useful in correlation based matched filter applications. For instance, defining a hollow (or even filled) circle.

2) The values can defined automatically for normalized correlation. The values in the kernel will be defined to have mean zero and norm 1. The area outside the annulus will have values of zero. In this mode, you can also specify whether you want the center of the annulus to be bright (intensity > 0) or dark (intensity < 0).

1) Set the annulus parameters: InnerRadius and Thickness 2) Set the intensities to use for interior, wall, and exterior kernel positions for correlation based operations or call NormalizeOn() to define kernel values automatically for use in normalized correlation. 3) If NormalizedOn(), indicate whether you want the center of the annulus to be bright or dark. 4) call CreateOperator()

Note
AnnulusOperator does not have any user-declared "special member function", following the C++ Rule of Zero: the compiler will generate them if necessary.
See also
NeighborhoodOperator
Neighborhood
Examples
SphinxExamples/src/Core/Common/DemonstrateAllOperators/Code.cxx.

Definition at line 72 of file itkAnnulusOperator.h.

+ Inheritance diagram for itk::AnnulusOperator< TPixel, TDimension, TAllocator >:
+ Collaboration diagram for itk::AnnulusOperator< TPixel, TDimension, TAllocator >:

Public Types

using PixelType = TPixel
 
using Self = AnnulusOperator
 
using SpacingType = Vector< double, TDimension >
 
using Superclass = NeighborhoodOperator< TPixel, TDimension, TAllocator >
 
- Public Types inherited from itk::NeighborhoodOperator< TPixel, TDimension, TAllocator >
using PixelRealType = typename NumericTraits< TPixel >::RealType
 
using PixelType = TPixel
 
using Self = NeighborhoodOperator
 
using SizeType = itk::Size< VDimension >
 
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

void CreateOperator ()
 
const char * GetNameOfClass () const override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void SetInnerRadius (double r)
 
double GetInnerRadius () const
 
void SetThickness (double t)
 
double GetThickness () const
 
void SetSpacing (SpacingType &s)
 
const SpacingTypeGetSpacing () const
 
void SetNormalize (bool b)
 
bool GetNormalize () const
 
void NormalizeOn ()
 
void NormalizeOff ()
 
void SetBrightCenter (bool b)
 
bool GetBrightCenter () const
 
void BrightCenterOn ()
 
void BrightCenterOff ()
 
void SetInteriorValue (TPixel v)
 
TPixel GetInteriorValue () const
 
void SetAnnulusValue (TPixel v)
 
TPixel GetAnnulusValue () const
 
void SetExteriorValue (TPixel v)
 
TPixel GetExteriorValue () const
 
- Public Member Functions inherited from itk::NeighborhoodOperator< TPixel, TDimension, TAllocator >
virtual void CreateDirectional ()
 
virtual void CreateToRadius (const SizeType &)
 
virtual void CreateToRadius (const SizeValueType)
 
virtual void FlipAxes ()
 
unsigned long GetDirection () const
 
const char * GetNameOfClass () const override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void ScaleCoefficients (PixelRealType)
 
void SetDirection (const unsigned long direction)
 
- Public Member Functions inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
NeighborIndexType GetCenterNeighborhoodIndex () const
 
TPixel GetCenterValue () 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
 

Protected Member Functions

void Fill (const CoefficientVector &coeff) override
 
CoefficientVector GenerateCoefficients () override
 
- Protected Member Functions inherited from itk::NeighborhoodOperator< TPixel, TDimension, TAllocator >
virtual void FillCenteredDirectional (const CoefficientVector &)
 
void InitializeToZero ()
 
- Protected Member Functions inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
virtual void Allocate (NeighborIndexType i)
 
virtual void ComputeNeighborhoodOffsetTable ()
 
virtual void ComputeNeighborhoodStrideTable ()
 
void SetSize ()
 

Private Attributes

PixelType m_AnnulusValue { NumericTraits<PixelType>::OneValue() }
 
bool m_BrightCenter { false }
 
PixelType m_ExteriorValue {}
 
double m_InnerRadius { 1.0 }
 
PixelType m_InteriorValue {}
 
bool m_Normalize { false }
 
SpacingType m_Spacing { MakeFilled<SpacingType>(1.0) }
 
double m_Thickness { 1.0 }
 

Additional Inherited Members

- Static Public Attributes inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
static constexpr unsigned int NeighborhoodDimension = VDimension
 
- Protected Types inherited from itk::NeighborhoodOperator< TPixel, TDimension, TAllocator >
using CoefficientVector = typename std::vector< PixelRealType >
 

Member Typedef Documentation

◆ PixelType

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

Additional type aliases.

Definition at line 81 of file itkAnnulusOperator.h.

◆ Self

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

Standard class type aliases.

Definition at line 77 of file itkAnnulusOperator.h.

◆ SpacingType

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::AnnulusOperator< TPixel, TDimension, TAllocator >::SpacingType = Vector<double, TDimension>

Definition at line 84 of file itkAnnulusOperator.h.

◆ Superclass

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::AnnulusOperator< TPixel, TDimension, TAllocator >::Superclass = NeighborhoodOperator<TPixel, TDimension, TAllocator>

Definition at line 78 of file itkAnnulusOperator.h.

Member Function Documentation

◆ BrightCenterOff()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::BrightCenterOff ( )
inline

If Normalize is on, you define the annulus to have a bright center or a dark center.

Definition at line 178 of file itkAnnulusOperator.h.

◆ BrightCenterOn()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::BrightCenterOn ( )
inline

If Normalize is on, you define the annulus to have a bright center or a dark center.

Definition at line 173 of file itkAnnulusOperator.h.

◆ CreateOperator()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::CreateOperator ( )

Create the operator. The radius of the operator is determined automatically.

◆ Fill()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::Fill ( const CoefficientVector coeff)
overrideprotectedvirtual

Arranges coefficients spatially in the memory buffer.

Implements itk::NeighborhoodOperator< TPixel, TDimension, TAllocator >.

◆ GenerateCoefficients()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
CoefficientVector itk::AnnulusOperator< TPixel, TDimension, TAllocator >::GenerateCoefficients ( )
overrideprotectedvirtual

Calculates operator coefficients.

Implements itk::NeighborhoodOperator< TPixel, TDimension, TAllocator >.

◆ GetAnnulusValue()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
TPixel itk::AnnulusOperator< TPixel, TDimension, TAllocator >::GetAnnulusValue ( ) const
inline

If Normalize is off, the interior to annulus, the annulus (region between the two circles), and the region exterior to the annulus to be defined manually. Defaults are 0, 1, 0 respectively.

Definition at line 204 of file itkAnnulusOperator.h.

◆ GetBrightCenter()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
bool itk::AnnulusOperator< TPixel, TDimension, TAllocator >::GetBrightCenter ( ) const
inline

If Normalize is on, you define the annulus to have a bright center or a dark center.

Definition at line 168 of file itkAnnulusOperator.h.

◆ GetExteriorValue()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
TPixel itk::AnnulusOperator< TPixel, TDimension, TAllocator >::GetExteriorValue ( ) const
inline

If Normalize is off, the interior to annulus, the annulus (region between the two circles), and the region exterior to the annulus to be defined manually. Defaults are 0, 1, 0 respectively.

Definition at line 214 of file itkAnnulusOperator.h.

◆ GetInnerRadius()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
double itk::AnnulusOperator< TPixel, TDimension, TAllocator >::GetInnerRadius ( ) const
inline

Set/Get the inner radius of the annulus. Radius is specified in physical units (mm).

Definition at line 101 of file itkAnnulusOperator.h.

◆ GetInteriorValue()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
TPixel itk::AnnulusOperator< TPixel, TDimension, TAllocator >::GetInteriorValue ( ) const
inline

If Normalize is off, the interior to annulus, the annulus (region between the two circles), and the region exterior to the annulus to be defined manually. Defaults are 0, 1, 0 respectively.

Definition at line 194 of file itkAnnulusOperator.h.

◆ GetNameOfClass()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
const char* itk::AnnulusOperator< TPixel, TDimension, TAllocator >::GetNameOfClass ( ) const
overridevirtual

◆ GetNormalize()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
bool itk::AnnulusOperator< TPixel, TDimension, TAllocator >::GetNormalize ( ) const
inline

Set/Get whether kernel values are computed automatically or specified manually

Definition at line 144 of file itkAnnulusOperator.h.

◆ GetSpacing()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
const SpacingType& itk::AnnulusOperator< TPixel, TDimension, TAllocator >::GetSpacing ( ) const
inline

Set/Get the pixel spacings. Setting these ensures the annulus is round in physical space. Defaults to 1.

Definition at line 130 of file itkAnnulusOperator.h.

◆ GetThickness()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
double itk::AnnulusOperator< TPixel, TDimension, TAllocator >::GetThickness ( ) const
inline

Set/Get the thickness of the annulus. The outer radius of the annulus is defined as r = InnerRadius + Thickness. Thickness is specified in physical units (mm).

Definition at line 116 of file itkAnnulusOperator.h.

◆ NormalizeOff()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::NormalizeOff ( )
inline

Set/Get whether kernel values are computed automatically or specified manually

Definition at line 154 of file itkAnnulusOperator.h.

◆ NormalizeOn()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::NormalizeOn ( )
inline

Set/Get whether kernel values are computed automatically or specified manually

Definition at line 149 of file itkAnnulusOperator.h.

◆ PrintSelf()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::PrintSelf ( std::ostream &  ,
Indent   
) const
inlineoverridevirtual

Standard itk object method.

Reimplemented from itk::Neighborhood< TPixel, VDimension, TAllocator >.

Definition at line 221 of file itkAnnulusOperator.h.

◆ SetAnnulusValue()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::SetAnnulusValue ( TPixel  v)
inline

If Normalize is off, the interior to annulus, the annulus (region between the two circles), and the region exterior to the annulus to be defined manually. Defaults are 0, 1, 0 respectively.

Definition at line 199 of file itkAnnulusOperator.h.

◆ SetBrightCenter()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::SetBrightCenter ( bool  b)
inline

If Normalize is on, you define the annulus to have a bright center or a dark center.

Definition at line 163 of file itkAnnulusOperator.h.

◆ SetExteriorValue()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::SetExteriorValue ( TPixel  v)
inline

If Normalize is off, the interior to annulus, the annulus (region between the two circles), and the region exterior to the annulus to be defined manually. Defaults are 0, 1, 0 respectively.

Definition at line 209 of file itkAnnulusOperator.h.

◆ SetInnerRadius()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::SetInnerRadius ( double  r)
inline

Set/Get the inner radius of the annulus. Radius is specified in physical units (mm).

Definition at line 96 of file itkAnnulusOperator.h.

◆ SetInteriorValue()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::SetInteriorValue ( TPixel  v)
inline

If Normalize is off, the interior to annulus, the annulus (region between the two circles), and the region exterior to the annulus to be defined manually. Defaults are 0, 1, 0 respectively.

Definition at line 189 of file itkAnnulusOperator.h.

◆ SetNormalize()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::SetNormalize ( bool  b)
inline

Set/Get whether kernel values are computed automatically or specified manually

Definition at line 139 of file itkAnnulusOperator.h.

◆ SetSpacing()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::SetSpacing ( SpacingType s)
inline

Set/Get the pixel spacings. Setting these ensures the annulus is round in physical space. Defaults to 1.

Definition at line 125 of file itkAnnulusOperator.h.

◆ SetThickness()

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::AnnulusOperator< TPixel, TDimension, TAllocator >::SetThickness ( double  t)
inline

Set/Get the thickness of the annulus. The outer radius of the annulus is defined as r = InnerRadius + Thickness. Thickness is specified in physical units (mm).

Definition at line 111 of file itkAnnulusOperator.h.

Member Data Documentation

◆ m_AnnulusValue

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
PixelType itk::AnnulusOperator< TPixel, TDimension, TAllocator >::m_AnnulusValue { NumericTraits<PixelType>::OneValue() }
private

Definition at line 256 of file itkAnnulusOperator.h.

◆ m_BrightCenter

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
bool itk::AnnulusOperator< TPixel, TDimension, TAllocator >::m_BrightCenter { false }
private

Definition at line 254 of file itkAnnulusOperator.h.

◆ m_ExteriorValue

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
PixelType itk::AnnulusOperator< TPixel, TDimension, TAllocator >::m_ExteriorValue {}
private

Definition at line 257 of file itkAnnulusOperator.h.

◆ m_InnerRadius

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
double itk::AnnulusOperator< TPixel, TDimension, TAllocator >::m_InnerRadius { 1.0 }
private

Definition at line 251 of file itkAnnulusOperator.h.

◆ m_InteriorValue

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
PixelType itk::AnnulusOperator< TPixel, TDimension, TAllocator >::m_InteriorValue {}
private

Definition at line 255 of file itkAnnulusOperator.h.

◆ m_Normalize

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
bool itk::AnnulusOperator< TPixel, TDimension, TAllocator >::m_Normalize { false }
private

Definition at line 253 of file itkAnnulusOperator.h.

◆ m_Spacing

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
SpacingType itk::AnnulusOperator< TPixel, TDimension, TAllocator >::m_Spacing { MakeFilled<SpacingType>(1.0) }
private

Definition at line 258 of file itkAnnulusOperator.h.

◆ m_Thickness

template<typename TPixel , unsigned int TDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
double itk::AnnulusOperator< TPixel, TDimension, TAllocator >::m_Thickness { 1.0 }
private

Definition at line 252 of file itkAnnulusOperator.h.


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