ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itk::ConstantImagePointerBoundaryCondition< TImage > Class Template Reference

#include <itkConstantImagePointerBoundaryCondition.h>

Detailed Description

template<typename TImage>
class itk::ConstantImagePointerBoundaryCondition< TImage >

This boundary condition returns a constant value for out-of-bounds image pixels.

For example, invoking this function object with a constant value of zero (the default) on each out-of-bounds element of a 7x5 iterator that masks a region at an image corner (iterator is centered on the 2):

          * * * * * * *
          * * * * * * *
          * * 1 2 3 4 5  (where * denotes pixels that lie
          * * 3 3 5 5 6          outside of the image boundary)
          * * 4 4 6 7 8

would produce the following neighborhood of values:

          0 0 0 0 0 0 0
          0 0 0 0 0 0 0
          0 0 1 2 3 4 5
          0 0 3 3 5 5 6
          0 0 4 4 6 7 8
Note
If you are using an image with Array as the pixel type, you will need to set the constant explicitly with an array of the appropriate length. This is also true if your image type is a VectorImage.
See also
ImageBoundaryCondition

Definition at line 62 of file itkConstantImagePointerBoundaryCondition.h.

+ Inheritance diagram for itk::ConstantImagePointerBoundaryCondition< TImage >:
+ Collaboration diagram for itk::ConstantImagePointerBoundaryCondition< TImage >:

Public Types

using IndexType = typename Superclass::IndexType
 
using NeighborhoodAccessorFunctorType = typename Superclass::NeighborhoodAccessorFunctorType
 
using NeighborhoodType = typename Superclass::NeighborhoodType
 
using OffsetType = typename Superclass::OffsetType
 
using PixelPointerType = typename Superclass::PixelPointerType
 
using PixelType = typename Superclass::PixelType
 
using Self = ConstantImagePointerBoundaryCondition
 
using Superclass = ImageBoundaryCondition<TImage>
 
- Public Types inherited from itk::ImageBoundaryCondition< TImage >
using IndexType
 
using InputImageType
 
using NeighborhoodAccessorFunctorType
 
using NeighborhoodType
 
using OffsetType
 
using OutputImageType
 
using OutputPixelType
 
using PixelPointerType
 
using PixelType
 
using RegionType
 
using Self
 
using SizeType
 

Public Member Functions

 ConstantImagePointerBoundaryCondition ()
 
const PixelType & GetConstant () const
 
PixelType GetPixel (const IndexType &index, const TImage *image) const
 
virtual PixelType operator() (const OffsetType &, const OffsetType &, const NeighborhoodType *) const
 
virtual PixelType operator() (const OffsetType &, const OffsetType &, const NeighborhoodType *, const NeighborhoodAccessorFunctorType &) const
 
bool RequiresCompleteNeighborhood ()
 
void SetConstant (const PixelType &c)
 
- Public Member Functions inherited from itk::ImageBoundaryCondition< TImage >
virtual RegionType GetInputRequestedRegion (const RegionType &inputLargestPossibleRegion, const RegionType &outputRequestedRegion) const
 
virtual RegionType GetInputRequestedRegion (const RegionType &inputLargestPossibleRegion, const RegionType &outputRequestedRegion) const
 
virtual const char * GetNameOfClass () const
 
virtual const char * GetNameOfClass () const
 
 ImageBoundaryCondition ()=default
 
 ImageBoundaryCondition ()=default
 
 ImageBoundaryCondition (const ImageBoundaryCondition &)=default
 
 ImageBoundaryCondition (const ImageBoundaryCondition &)=default
 
 ImageBoundaryCondition (ImageBoundaryCondition &&)=default
 
 ImageBoundaryCondition (ImageBoundaryCondition &&)=default
 
ImageBoundaryCondition & operator= (const ImageBoundaryCondition &)=default
 
ImageBoundaryCondition & operator= (const ImageBoundaryCondition &)=default
 
ImageBoundaryCondition & operator= (ImageBoundaryCondition &&)=default
 
ImageBoundaryCondition & operator= (ImageBoundaryCondition &&)=default
 
virtual void Print (std::ostream &os, Indent i=0) const
 
virtual void Print (std::ostream &os, Indent i=0) const
 
virtual ~ImageBoundaryCondition ()=default
 
virtual ~ImageBoundaryCondition ()=default
 

Static Public Attributes

static constexpr unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::ImageBoundaryCondition< TImage >
static constexpr unsigned int ImageDimension
 
static constexpr unsigned int ImageDimension
 

Private Attributes

PixelType m_Constant
 

Member Typedef Documentation

◆ IndexType

template<typename TImage>
using itk::ConstantImagePointerBoundaryCondition< TImage >::IndexType = typename Superclass::IndexType

Definition at line 72 of file itkConstantImagePointerBoundaryCondition.h.

◆ NeighborhoodAccessorFunctorType

template<typename TImage>
using itk::ConstantImagePointerBoundaryCondition< TImage >::NeighborhoodAccessorFunctorType = typename Superclass::NeighborhoodAccessorFunctorType

Definition at line 76 of file itkConstantImagePointerBoundaryCondition.h.

◆ NeighborhoodType

template<typename TImage>
using itk::ConstantImagePointerBoundaryCondition< TImage >::NeighborhoodType = typename Superclass::NeighborhoodType

Definition at line 74 of file itkConstantImagePointerBoundaryCondition.h.

◆ OffsetType

template<typename TImage>
using itk::ConstantImagePointerBoundaryCondition< TImage >::OffsetType = typename Superclass::OffsetType

Definition at line 73 of file itkConstantImagePointerBoundaryCondition.h.

◆ PixelPointerType

template<typename TImage>
using itk::ConstantImagePointerBoundaryCondition< TImage >::PixelPointerType = typename Superclass::PixelPointerType

Definition at line 71 of file itkConstantImagePointerBoundaryCondition.h.

◆ PixelType

template<typename TImage>
using itk::ConstantImagePointerBoundaryCondition< TImage >::PixelType = typename Superclass::PixelType

Extract information from the image type

Definition at line 70 of file itkConstantImagePointerBoundaryCondition.h.

◆ Self

template<typename TImage>
using itk::ConstantImagePointerBoundaryCondition< TImage >::Self = ConstantImagePointerBoundaryCondition

Self & superclass type alias

Definition at line 66 of file itkConstantImagePointerBoundaryCondition.h.

◆ Superclass

template<typename TImage>
using itk::ConstantImagePointerBoundaryCondition< TImage >::Superclass = ImageBoundaryCondition<TImage>

Definition at line 67 of file itkConstantImagePointerBoundaryCondition.h.

Constructor & Destructor Documentation

◆ ConstantImagePointerBoundaryCondition()

template<typename TImage>
itk::ConstantImagePointerBoundaryCondition< TImage >::ConstantImagePointerBoundaryCondition ( )
inline

Default constructor.

Definition at line 82 of file itkConstantImagePointerBoundaryCondition.h.

References m_Constant.

Member Function Documentation

◆ GetConstant()

template<typename TImage>
const PixelType & itk::ConstantImagePointerBoundaryCondition< TImage >::GetConstant ( ) const
inline

Get the value of the constant.

Definition at line 116 of file itkConstantImagePointerBoundaryCondition.h.

References m_Constant.

◆ GetPixel()

template<typename TImage>
PixelType itk::ConstantImagePointerBoundaryCondition< TImage >::GetPixel ( const IndexType & index,
const TImage * image ) const
inlinevirtual

Returns a value for a given pixel at an index. If the index is inside the bounds of the input image, then the pixel value is obtained from the input image. Otherwise, the pixel value is determined according to the boundary condition type.

Parameters
indexThe index of the desired pixel.
imageThe image from which pixel values should be determined.

Implements itk::ImageBoundaryCondition< TImage >.

Definition at line 131 of file itkConstantImagePointerBoundaryCondition.h.

References m_Constant.

◆ operator()() [1/2]

template<typename TImage>
virtual PixelType itk::ConstantImagePointerBoundaryCondition< TImage >::operator() ( const OffsetType & ,
const OffsetType & ,
const NeighborhoodType *  ) const
inlinevirtual

Computes and returns appropriate out-of-bounds values from neighborhood iterator data.

Implements itk::ImageBoundaryCondition< TImage >.

Definition at line 91 of file itkConstantImagePointerBoundaryCondition.h.

References m_Constant.

◆ operator()() [2/2]

template<typename TImage>
virtual PixelType itk::ConstantImagePointerBoundaryCondition< TImage >::operator() ( const OffsetType & ,
const OffsetType & ,
const NeighborhoodType * ,
const NeighborhoodAccessorFunctorType &  ) const
inlinevirtual

Computes and returns the appropriate pixel value from neighborhood iterator data, using the functor.

Implements itk::ImageBoundaryCondition< TImage >.

Definition at line 99 of file itkConstantImagePointerBoundaryCondition.h.

References m_Constant.

◆ RequiresCompleteNeighborhood()

template<typename TImage>
bool itk::ConstantImagePointerBoundaryCondition< TImage >::RequiresCompleteNeighborhood ( )
inlinevirtual

Tell if the boundary condition can index to any location within the associated iterator's neighborhood or if it has some limited subset (such as none) that it relies upon.

Reimplemented from itk::ImageBoundaryCondition< TImage >.

Definition at line 125 of file itkConstantImagePointerBoundaryCondition.h.

◆ SetConstant()

template<typename TImage>
void itk::ConstantImagePointerBoundaryCondition< TImage >::SetConstant ( const PixelType & c)
inline

Set the value of the constant.

Definition at line 109 of file itkConstantImagePointerBoundaryCondition.h.

References m_Constant.

Member Data Documentation

◆ ImageDimension

template<typename TImage>
unsigned int itk::ConstantImagePointerBoundaryCondition< TImage >::ImageDimension = Superclass::ImageDimension
staticconstexpr

Save the image dimension.

Definition at line 79 of file itkConstantImagePointerBoundaryCondition.h.

◆ m_Constant


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