Orfeo Toolbox  4.0
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Attributes | List of all members
itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction > Class Template Referenceabstract

Iterates over a flood-filled spatial function with read-only access to pixels. More...

#include <itkShapedFloodFilledFunctionConditionalConstIterator.h>

+ Inheritance diagram for itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >:
+ Collaboration diagram for itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >:

Public Types

typedef TFunction::InputType FunctionInputType
 
typedef TFunction FunctionType
 
typedef TImage ImageType
 
typedef TImage::IndexType IndexType
 
typedef TImage::InternalPixelType InternalPixelType
 
typedef
itk::ShapedNeighborhoodIterator
< ImageType
NeighborhoodIteratorType
 
typedef TImage::OffsetType OffsetType
 
typedef TImage::PixelType PixelType
 
typedef TImage::RegionType RegionType
 
typedef std::vector< IndexTypeSeedsContainerType
 
typedef
ShapedFloodFilledFunctionConditionalConstIterator 
Self
 
typedef TImage::SizeType SizeType
 

Public Member Functions

 ShapedFloodFilledFunctionConditionalConstIterator (const ImageType *imagePtr, FunctionType *fnPtr, IndexType startIndex)
 
 ShapedFloodFilledFunctionConditionalConstIterator (const ImageType *imagePtr, FunctionType *fnPtr, std::vector< IndexType > &startIndices)
 
 ShapedFloodFilledFunctionConditionalConstIterator (const ImageType *imagePtr, FunctionType *fnPtr)
 
virtual ~ShapedFloodFilledFunctionConditionalConstIterator ()
 
void AddSeed (const IndexType seed)
 
void ClearSeeds ()
 
void DoFloodStep ()
 
void FindSeedPixel ()
 
void FindSeedPixels ()
 
virtual void FullyConnectedOff ()
 
virtual void FullyConnectedOn ()
 
const PixelType Get (void) const
 
bool GetFullyConnected () const
 
virtual SmartPointer
< FunctionType
GetFunction () const
 
const IndexType GetIndex ()
 
virtual const SeedsContainerTypeGetSeeds () const
 
void GoToBegin ()
 
void InitializeIterator ()
 
bool IsAtEnd ()
 
virtual bool IsPixelIncluded (const IndexType &index) const =0
 
void operator++ ()
 
Selfoperator= (const Self &it)
 
void SetFullyConnected (const bool _arg)
 

Static Public Member Functions

static unsigned int GetIteratorDimension ()
 

Static Public Attributes

static const unsigned int NDimension = TImage::ImageDimension
 
static const unsigned int NDimensions = TImage::ImageDimension
 

Protected Types

typedef Image< unsigned char,
itkGetStaticConstMacro(NDimensions) > 
TTempImage
 

Protected Attributes

bool m_FoundUncheckedNeighbor
 
bool m_FullyConnected
 
SmartPointer< FunctionTypem_Function
 
ImageType::ConstWeakPointer m_Image
 
ImageType::PointType m_ImageOrigin
 
RegionType m_ImageRegion
 
ImageType::SpacingType m_ImageSpacing
 
std::queue< IndexTypem_IndexStack
 
bool m_IsAtEnd
 
bool m_IsValidIndex
 
FunctionInputType m_LocationVector
 
NeighborhoodIteratorType m_NeighborhoodIterator
 
RegionType m_Region
 
SeedsContainerType m_Seeds
 
TTempImage::Pointer m_TempPtr
 

Detailed Description

template<typename TImage, typename TFunction>
class itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >

Iterates over a flood-filled spatial function with read-only access to pixels.

Contributed as a paper to the Insight Journal: http://hdl.handle.net/1926/1320

Definition at line 43 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

Member Typedef Documentation

template<typename TImage , typename TFunction >
typedef TFunction::InputType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::FunctionInputType

Type of vector used to store location info in the spatial function

Definition at line 54 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
typedef TFunction itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::FunctionType

Type of function

Definition at line 51 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
typedef TImage itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::ImageType

Image typedef support.

Definition at line 72 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
typedef TImage::IndexType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::IndexType

Index typedef support.

Definition at line 57 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
typedef TImage::InternalPixelType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::InternalPixelType

Internal Pixel Type

Definition at line 75 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
typedef itk::ShapedNeighborhoodIterator< ImageType > itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::NeighborhoodIteratorType

Internal Neighborhood Iterator Type

Definition at line 81 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
typedef TImage::OffsetType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::OffsetType

Offset typedef support.

Definition at line 63 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
typedef TImage::PixelType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::PixelType

External Pixel Type

Definition at line 78 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
typedef TImage::RegionType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::RegionType

Region typedef support

Definition at line 69 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
typedef std::vector< IndexType > itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::SeedsContainerType

Index Container Type

Definition at line 60 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
typedef ShapedFloodFilledFunctionConditionalConstIterator itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::Self

Standard class typedefs.

Definition at line 48 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
typedef TImage::SizeType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::SizeType

Size typedef support.

Definition at line 66 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
typedef Image< unsigned char, itkGetStaticConstMacro(NDimensions) > itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::TTempImage
protected

A temporary image used for storing info about indices 0 = pixel has not yet been processed 1 = pixel is not inside the function 2 = pixel is inside the function, neighbor check incomplete 3 = pixel is inside the function, neighbor check complete

Definition at line 236 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

Constructor & Destructor Documentation

template<typename TImage , typename TFunction >
itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::ShapedFloodFilledFunctionConditionalConstIterator ( const ImageType imagePtr,
FunctionType fnPtr,
IndexType  startIndex 
)

Constructor establishes an iterator to walk a particular image and a particular region of that image. This version of the constructor uses an explicit seed pixel for the flood fill, the "startIndex"

Definition at line 28 of file itkShapedFloodFilledFunctionConditionalConstIterator.hxx.

template<typename TImage , typename TFunction >
itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::ShapedFloodFilledFunctionConditionalConstIterator ( const ImageType imagePtr,
FunctionType fnPtr,
std::vector< IndexType > &  startIndices 
)

Constructor establishes an iterator to walk a particular image and a particular region of that image. This version of the constructor uses a list of seed pixels for the flood fill

Definition at line 43 of file itkShapedFloodFilledFunctionConditionalConstIterator.hxx.

template<typename TImage , typename TFunction >
itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::ShapedFloodFilledFunctionConditionalConstIterator ( const ImageType imagePtr,
FunctionType fnPtr 
)

Constructor establishes an iterator to walk a particular image and a particular region of that image. This version of the constructor should be used when the seed pixel is unknown

Definition at line 63 of file itkShapedFloodFilledFunctionConditionalConstIterator.hxx.

template<typename TImage , typename TFunction >
virtual itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::~ShapedFloodFilledFunctionConditionalConstIterator ( )
inlinevirtual

Default Destructor.

Definition at line 122 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

Member Function Documentation

template<typename TImage , typename TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::AddSeed ( const IndexType  seed)
inline
template<typename TImage , typename TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::ClearSeeds ( )
inline
template<typename TImage , typename TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::DoFloodStep ( )
template<typename TImage , typename TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::FindSeedPixel ( )

Automatically find a seed pixel and set m_StartIndex. Does nothing if a seed pixel isn't found. A seed pixel is determined by traversing the input image's LargestPossibleRegion and applying the IsPixelIncluded() test.

Definition at line 121 of file itkShapedFloodFilledFunctionConditionalConstIterator.hxx.

template<typename TImage , typename TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::FindSeedPixels ( )

Automatically find all seed pixels.

Definition at line 147 of file itkShapedFloodFilledFunctionConditionalConstIterator.hxx.

template<typename TImage , typename TFunction >
virtual void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::FullyConnectedOff ( )
virtual
template<typename TImage , typename TFunction >
virtual void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::FullyConnectedOn ( )
virtual
template<typename TImage , typename TFunction >
const PixelType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::Get ( void  ) const
inlinevirtual
template<typename TImage , typename TFunction >
bool itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GetFullyConnected ( ) const
template<typename TImage , typename TFunction >
virtual SmartPointer< FunctionType > itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GetFunction ( void  ) const
inlinevirtual
template<typename TImage , typename TFunction >
const IndexType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GetIndex ( void  )
inlinevirtual

Get the index. This provides a read only reference to the index. This causes the index to be calculated from pointer arithmetic and is therefore an expensive operation.

See Also
SetIndex

Implements itk::ConditionalConstIterator< TImage >.

Definition at line 144 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

References itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_IndexStack.

template<typename TImage , typename TFunction >
static unsigned int itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GetIteratorDimension ( void  )
inlinestatic

Get the dimension (size) of the index.

Definition at line 137 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
virtual const SeedsContainerType& itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GetSeeds ( ) const
inlinevirtual
template<typename TImage , typename TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GoToBegin ( void  )
inline
template<typename TImage , typename TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::InitializeIterator ( )

Initializes the iterator, called from constructor

Definition at line 77 of file itkShapedFloodFilledFunctionConditionalConstIterator.hxx.

References itk::setConnectivity().

template<typename TImage , typename TFunction >
bool itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::IsAtEnd ( void  )
inlinevirtual

Is the iterator at the end of the region?

Implements itk::ConditionalConstIterator< TImage >.

Definition at line 152 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

References itk::ConditionalConstIterator< TImage >::m_IsAtEnd.

template<typename TImage , typename TFunction >
virtual bool itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::IsPixelIncluded ( const IndexType index) const
pure virtual
template<typename TImage , typename TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::operator++ ( )
inlinevirtual
template<typename TImage , typename TFunction >
Self& itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::operator= ( const Self it)
inline

operator= is provided to make sure the handle to the image is properly reference counted.

Definition at line 129 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

References itk::ConditionalConstIterator< TImage >::m_Image, and itk::ConditionalConstIterator< TImage >::m_Region.

template<typename TImage , typename TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::SetFullyConnected ( const bool  _arg)

When m_FullyConnected is set to true, the neighborhood iterator will inspect an 8 respectively 26 neighborhood. When the value is set to false, the neighborhood will be 4 in 2D and 6 in 3D.

Definition at line 231 of file itkShapedFloodFilledFunctionConditionalConstIterator.hxx.

References itk::setConnectivity().

Member Data Documentation

template<typename TImage , typename TFunction >
bool itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_FoundUncheckedNeighbor
protected

Indicates whether or not we've found a neighbor that needs to be checked.

Definition at line 263 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
bool itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_FullyConnected
protected

Defines the connectivity of the neighborhood iterator. In case of 2D the default connectivity is 4 (6 in 3D) and when m_FullyConnected is set to true the connectivity is 8 (26 in 3D).

Definition at line 273 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
SmartPointer< FunctionType > itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_Function
protected
template<typename TImage >
ImageType::ConstWeakPointer itk::ConditionalConstIterator< TImage >::m_Image
protectedinherited
template<typename TImage , typename TFunction >
ImageType::PointType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_ImageOrigin
protected

The origin of the source image

Definition at line 244 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
RegionType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_ImageRegion
protected

Region of the source image

Definition at line 253 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
ImageType::SpacingType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_ImageSpacing
protected

The spacing of the source image

Definition at line 247 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
std::queue< IndexType > itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_IndexStack
protected
template<typename TImage >
bool itk::ConditionalConstIterator< TImage >::m_IsAtEnd
protectedinherited
template<typename TImage , typename TFunction >
bool itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_IsValidIndex
protected

Indicates whether or not an index is valid (inside an image)/

Definition at line 266 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
FunctionInputType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_LocationVector
protected

Location vector used in the flood algorithm

Definition at line 259 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage , typename TFunction >
NeighborhoodIteratorType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_NeighborhoodIterator
protected

The neighborhood iterator

Definition at line 250 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<typename TImage >
RegionType itk::ConditionalConstIterator< TImage >::m_Region
protectedinherited
template<typename TImage , typename TFunction >
SeedsContainerType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_Seeds
protected
template<typename TImage , typename TFunction >
TTempImage::Pointer itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_TempPtr
protected
template<typename TImage >
const unsigned int itk::ConditionalConstIterator< TImage >::NDimension = TImage::ImageDimension
staticinherited

Dimension of the image the iterator walks. This constant is needed so that functions that are templated over image iterator type (as opposed to being templated over pixel type and dimension) can have compile time access to the dimension of the image that the iterator walks.

Definition at line 48 of file itkConditionalConstIterator.h.

Referenced by itk::ConditionalConstIterator< TImage >::GetIteratorDimension().

template<typename TImage , typename TFunction >
const unsigned int itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::NDimensions = TImage::ImageDimension
static

Dimension of the image the iterator walks. This constant is needed so that functions that are templated over image iterator type (as opposed to being templated over pixel type and dimension) can have compile time access to the dimension of the image that the iterator walks.

Definition at line 87 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.


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

Generated at Sat Mar 8 2014 17:41:36 for Orfeo Toolbox with doxygen 1.8.3.1