Orfeo Toolbox  4.0
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
itk::ConstantBoundaryCondition< TInputImage, TOutputImage > Class Template Reference

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

#include <itkConstantBoundaryCondition.h>

+ Inheritance diagram for itk::ConstantBoundaryCondition< TInputImage, TOutputImage >:
+ Collaboration diagram for itk::ConstantBoundaryCondition< TInputImage, TOutputImage >:

Public Types

typedef Superclass::IndexType IndexType
 
typedef
Superclass::NeighborhoodAccessorFunctorType 
NeighborhoodAccessorFunctorType
 
typedef
Superclass::NeighborhoodType 
NeighborhoodType
 
typedef Superclass::OffsetType OffsetType
 
typedef Superclass::OutputPixelType OutputPixelType
 
typedef
Superclass::PixelPointerType 
PixelPointerType
 
typedef Superclass::PixelType PixelType
 
typedef Superclass::RegionType RegionType
 
typedef ConstantBoundaryCondition Self
 
typedef Superclass::SizeType SizeType
 
typedef ImageBoundaryCondition
< TInputImage, TOutputImage > 
Superclass
 

Public Member Functions

 ConstantBoundaryCondition ()
 
const OutputPixelTypeGetConstant () const
 
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
 
OutputPixelType GetPixel (const IndexType &index, const TInputImage *image) const
 
template<typename TPixel >
void Initialize (const VariableLengthVector< TPixel > *)
 
virtual OutputPixelType operator() (const OffsetType &, const OffsetType &, const NeighborhoodType *) const
 
virtual OutputPixelType operator() (const OffsetType &, const OffsetType &, const NeighborhoodType *, const NeighborhoodAccessorFunctorType &) const
 
virtual void Print (std::ostream &os, Indent i=0) const
 
bool RequiresCompleteNeighborhood ()
 
void SetConstant (const OutputPixelType &c)
 

Static Public Attributes

static const unsigned int ImageDimension = Superclass::ImageDimension
 

Private Attributes

OutputPixelType m_Constant
 

Detailed Description

template<typename TInputImage, typename TOutputImage = TInputImage>
class itk::ConstantBoundaryCondition< TInputImage, TOutputImage >

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

{Iterators/ConstantBoundaryCondition,Make out of bounds pixels return a constant value}

Definition at line 65 of file itkConstantBoundaryCondition.h.

Member Typedef Documentation

template<typename TInputImage, typename TOutputImage = TInputImage>
typedef Superclass::IndexType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::IndexType

Definition at line 78 of file itkConstantBoundaryCondition.h.

template<typename TInputImage, typename TOutputImage = TInputImage>
typedef Superclass::NeighborhoodAccessorFunctorType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::NeighborhoodAccessorFunctorType

Definition at line 84 of file itkConstantBoundaryCondition.h.

template<typename TInputImage, typename TOutputImage = TInputImage>
typedef Superclass::NeighborhoodType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::NeighborhoodType

Definition at line 81 of file itkConstantBoundaryCondition.h.

template<typename TInputImage, typename TOutputImage = TInputImage>
typedef Superclass::OffsetType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::OffsetType

Definition at line 80 of file itkConstantBoundaryCondition.h.

template<typename TInputImage, typename TOutputImage = TInputImage>
typedef Superclass::OutputPixelType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::OutputPixelType

Definition at line 76 of file itkConstantBoundaryCondition.h.

template<typename TInputImage, typename TOutputImage = TInputImage>
typedef Superclass::PixelPointerType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::PixelPointerType

Definition at line 75 of file itkConstantBoundaryCondition.h.

template<typename TInputImage, typename TOutputImage = TInputImage>
typedef Superclass::PixelType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::PixelType

Extract information from the image type

Definition at line 74 of file itkConstantBoundaryCondition.h.

template<typename TInputImage, typename TOutputImage = TInputImage>
typedef Superclass::RegionType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::RegionType

Definition at line 77 of file itkConstantBoundaryCondition.h.

template<typename TInputImage, typename TOutputImage = TInputImage>
typedef ConstantBoundaryCondition itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::Self

Self & superclass typedefs

Definition at line 70 of file itkConstantBoundaryCondition.h.

template<typename TInputImage, typename TOutputImage = TInputImage>
typedef Superclass::SizeType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::SizeType

Definition at line 79 of file itkConstantBoundaryCondition.h.

template<typename TInputImage, typename TOutputImage = TInputImage>
typedef ImageBoundaryCondition< TInputImage, TOutputImage > itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::Superclass

Definition at line 71 of file itkConstantBoundaryCondition.h.

Constructor & Destructor Documentation

template<typename TInputImage , typename TOutputImage >
itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::ConstantBoundaryCondition ( )

Default constructor.

Definition at line 28 of file itkConstantBoundaryCondition.hxx.

References itk::NumericTraits< T >::ZeroValue().

Member Function Documentation

template<typename TInputImage , typename TOutputImage >
const ConstantBoundaryCondition< TInputImage, TOutputImage >::OutputPixelType & itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::GetConstant ( ) const

Get the value of the constant.

Definition at line 62 of file itkConstantBoundaryCondition.hxx.

template<typename TInputImage, typename TOutputImage = TInputImage>
virtual RegionType itk::ImageBoundaryCondition< TInputImage, TOutputImage >::GetInputRequestedRegion ( const RegionType inputLargestPossibleRegion,
const RegionType outputRequestedRegion 
) const
inlinevirtualinherited

Determines the necessary input region for an output region given the largest possible region of the input image. Subclasses should override this method to efficiently support streaming.

Parameters
inputLargestPossibleRegionLargest possible region of the input image.
outputRequestedRegionThe output requested region.
Returns
The necessary input region required to determine the pixel values in the outputRequestedRegion.

Reimplemented in itk::ConstantBoundaryCondition< InputImageType >, itk::ZeroFluxNeumannBoundaryCondition< TInputImage, TOutputImage >, itk::ZeroFluxNeumannBoundaryCondition< ImageType >, itk::ZeroFluxNeumannBoundaryCondition< itk::Image >, itk::ZeroFluxNeumannBoundaryCondition< TInputImage >, itk::ZeroFluxNeumannBoundaryCondition< TImage >, itk::ZeroFluxNeumannBoundaryCondition< FixedImageType >, itk::ZeroFluxNeumannBoundaryCondition< InputImageType >, itk::ZeroFluxNeumannBoundaryCondition< TImageType >, itk::ZeroFluxNeumannBoundaryCondition< TDisplacementField >, itk::ZeroFluxNeumannBoundaryCondition< TSparseImageType >, and itk::PeriodicBoundaryCondition< TInputImage, TOutputImage >.

Definition at line 129 of file itkImageBoundaryCondition.h.

template<typename TInputImage , typename TOutputImage >
ConstantBoundaryCondition< TInputImage, TOutputImage >::RegionType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::GetInputRequestedRegion ( const RegionType inputLargestPossibleRegion,
const RegionType outputRequestedRegion 
) const
virtual

Determines the necessary input region for the output region. For this boundary condition, only the intersection of the largest possible image region and the output requested region is needed.

Parameters
inputLargestPossibleRegionLargest possible region of the input image.
outputRequestedRegionThe output requested region.
Returns
The necessary input region required to determine the pixel values in the outputRequestedRegion.

Definition at line 70 of file itkConstantBoundaryCondition.hxx.

References itk::ImageRegion< VImageDimension >::Crop(), itk::Size< VDimension >::Fill(), itk::Index< VIndexDimension >::Fill(), itk::ImageRegion< VImageDimension >::SetIndex(), and itk::ImageRegion< VImageDimension >::SetSize().

template<typename TInputImage, typename TOutputImage = TInputImage>
virtual const char* itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::GetNameOfClass ( ) const
inlinevirtual

Runtime information support.

Reimplemented from itk::ImageBoundaryCondition< TInputImage, TOutputImage >.

Definition at line 93 of file itkConstantBoundaryCondition.h.

template<typename TInputImage, typename TOutputImage >
ConstantBoundaryCondition< TInputImage, TOutputImage >::OutputPixelType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::GetPixel ( const IndexType index,
const TInputImage *  image 
) const
virtual

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 constant value is returned.

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

Implements itk::ImageBoundaryCondition< TInputImage, TOutputImage >.

Definition at line 90 of file itkConstantBoundaryCondition.hxx.

References itk::ImageRegion< VImageDimension >::IsInside().

template<typename TInputImage, typename TOutputImage = TInputImage>
template<typename TPixel >
void itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::Initialize ( const VariableLengthVector< TPixel > *  )

Special version of initialize for images with pixel type VariableLengthVector.

template<typename TInputImage , typename TOutputImage >
ConstantBoundaryCondition< TInputImage, TOutputImage >::OutputPixelType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::operator() ( const OffsetType ,
const OffsetType ,
const NeighborhoodType  
) const
virtual

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

Implements itk::ImageBoundaryCondition< TInputImage, TOutputImage >.

Definition at line 37 of file itkConstantBoundaryCondition.hxx.

template<typename TInputImage , typename TOutputImage >
ConstantBoundaryCondition< TInputImage, TOutputImage >::OutputPixelType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::operator() ( const OffsetType ,
const OffsetType ,
const NeighborhoodType ,
const NeighborhoodAccessorFunctorType  
) const
virtual

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

Implements itk::ImageBoundaryCondition< TInputImage, TOutputImage >.

Definition at line 45 of file itkConstantBoundaryCondition.hxx.

template<typename TInputImage , typename TOutputImage >
void itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::Print ( std::ostream &  os,
Indent  i = 0 
) const
virtual

Utility for printing the boundary condition.

Reimplemented from itk::ImageBoundaryCondition< TInputImage, TOutputImage >.

Definition at line 104 of file itkConstantBoundaryCondition.hxx.

References itk::Indent::GetNextIndent().

template<typename TInputImage, typename TOutputImage = TInputImage>
bool itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::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< TInputImage, TOutputImage >.

Definition at line 129 of file itkConstantBoundaryCondition.h.

template<typename TInputImage , typename TOutputImage >
void itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::SetConstant ( const OutputPixelType c)

Member Data Documentation

template<typename TInputImage, typename TOutputImage = TInputImage>
const unsigned int itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::ImageDimension = Superclass::ImageDimension
static

Save the image dimension.

Definition at line 87 of file itkConstantBoundaryCondition.h.

template<typename TInputImage, typename TOutputImage = TInputImage>
OutputPixelType itk::ConstantBoundaryCondition< TInputImage, TOutputImage >::m_Constant
private

Definition at line 153 of file itkConstantBoundaryCondition.h.


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

Generated at Sat Mar 8 2014 16:49:04 for Orfeo Toolbox with doxygen 1.8.3.1