Orfeo Toolbox  3.16
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Attributes | List of all members
itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction > Class Template Reference

Iterates over a flood-filled image function. More...

#include <itkShapedFloodFilledImageFunctionConditionalIterator.h>

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

Public Types

typedef
Superclass::FunctionInputType 
FunctionInputType
 
typedef Superclass::FunctionType FunctionType
 
typedef Superclass::ImageType ImageType
 
typedef Superclass::IndexType IndexType
 
typedef
Superclass::InternalPixelType 
InternalPixelType
 
typedef
itk::ShapedNeighborhoodIterator
< ImageType
NeighborhoodIteratorType
 
typedef TImage::OffsetType OffsetType
 
typedef Superclass::PixelType PixelType
 
typedef Superclass::RegionType RegionType
 
typedef
ShapedFloodFilledImageFunctionConditionalIterator 
Self
 
typedef Superclass::SizeType SizeType
 
typedef
ShapedFloodFilledImageFunctionConditionalConstIterator
< TImage, TFunction > 
Superclass
 

Public Member Functions

 ShapedFloodFilledImageFunctionConditionalIterator (ImageType *imagePtr, FunctionType *fnPtr, IndexType startIndex)
 
 ShapedFloodFilledImageFunctionConditionalIterator (ImageType *imagePtr, FunctionType *fnPtr, std::vector< IndexType > &startIndex)
 
 ShapedFloodFilledImageFunctionConditionalIterator (ImageType *imagePtr, FunctionType *fnPtr)
 
virtual ~ShapedFloodFilledImageFunctionConditionalIterator ()
 
void AddSeed (const IndexType seed)
 
void ClearSeeds ()
 
void DoFloodStep ()
 
void FindSeedPixel ()
 
void FindSeedPixels ()
 
virtual void FullyConnectedOff ()
 
virtual void FullyConnectedOn ()
 
const PixelTypeGet (void) const
 
bool GetFullyConnected () const
 
virtual SmartPointer
< FunctionType
GetFunction () const
 
const IndexType GetIndex ()
 
void GoToBegin ()
 
void InitializeIterator ()
 
bool IsAtEnd ()
 
bool IsPixelIncluded (const IndexType &index) const
 
void operator++ ()
 
void Set (const PixelType &value)
 
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 = Superclass::NDimensions
 

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
 
std::vector< IndexTypem_StartIndices
 
TTempImage::Pointer m_TempPtr
 

Detailed Description

template<class TImage, class TFunction>
class itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >

Iterates over a flood-filled image function.

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

Definition at line 36 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

Member Typedef Documentation

template<class TImage , class TFunction >
typedef Superclass::FunctionInputType itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::FunctionInputType

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

Definition at line 47 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

template<class TImage , class TFunction >
typedef Superclass::FunctionType itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::FunctionType

Type of function

Definition at line 44 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

template<class TImage , class TFunction >
typedef Superclass::ImageType itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::ImageType

Image typedef support.

Definition at line 59 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

template<class TImage , class TFunction >
typedef Superclass::IndexType itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::IndexType

Index typedef support.

Definition at line 50 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

template<class TImage , class TFunction >
typedef Superclass::InternalPixelType itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::InternalPixelType

Internal Pixel Type

Definition at line 62 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

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

Internal Neighborhood Iterator Type

Definition at line 79 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
typedef TImage::OffsetType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::OffsetType
inherited

Offset typedef support.

Definition at line 61 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
typedef Superclass::PixelType itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::PixelType

External Pixel Type

Definition at line 65 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

template<class TImage , class TFunction >
typedef Superclass::RegionType itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::RegionType

Region typedef support

Definition at line 56 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

template<class TImage , class TFunction >
typedef ShapedFloodFilledImageFunctionConditionalIterator itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::Self

Standard class typedefs.

Definition at line 40 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

template<class TImage , class TFunction >
typedef Superclass::SizeType itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::SizeType

Size typedef support.

Definition at line 53 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

template<class TImage , class TFunction >
typedef ShapedFloodFilledImageFunctionConditionalConstIterator<TImage, TFunction> itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::Superclass
template<class TImage , class TFunction >
typedef Image<unsigned char, itkGetStaticConstMacro(NDimensions)> itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::TTempImage
protectedinherited

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 228 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

Constructor & Destructor Documentation

template<class TImage , class TFunction >
itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::ShapedFloodFilledImageFunctionConditionalIterator ( ImageType imagePtr,
FunctionType fnPtr,
IndexType  startIndex 
)
inline

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 76 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

template<class TImage , class TFunction >
itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::ShapedFloodFilledImageFunctionConditionalIterator ( ImageType imagePtr,
FunctionType fnPtr,
std::vector< IndexType > &  startIndex 
)
inline

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

Definition at line 83 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

template<class TImage , class TFunction >
itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::ShapedFloodFilledImageFunctionConditionalIterator ( ImageType imagePtr,
FunctionType fnPtr 
)
inline

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 90 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

template<class TImage , class TFunction >
virtual itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::~ShapedFloodFilledImageFunctionConditionalIterator ( )
inlinevirtual

Default Destructor.

Definition at line 102 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

Member Function Documentation

template<class TImage , class TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::AddSeed ( const IndexType  seed)
inlineinherited

Put more seeds on the list

Definition at line 154 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::ClearSeeds ( )
inlineinherited

Clear all the seeds

Definition at line 160 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::DoFloodStep ( )
inherited
template<class TImage , class TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::FindSeedPixel ( )
inherited

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 120 of file itkShapedFloodFilledFunctionConditionalConstIterator.txx.

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

Automatically find all seed pixels.

Definition at line 146 of file itkShapedFloodFilledFunctionConditionalConstIterator.txx.

template<class TImage , class TFunction >
virtual void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::FullyConnectedOff ( )
virtualinherited
template<class TImage , class TFunction >
virtual void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::FullyConnectedOn ( )
virtualinherited
template<class TImage , class TFunction >
const PixelType& itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::Get ( void  ) const
inlinevirtual
template<class TImage , class TFunction >
bool itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GetFullyConnected ( ) const
inherited
template<class TImage , class TFunction >
virtual SmartPointer<FunctionType> itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GetFunction ( void  ) const
inlinevirtualinherited
template<class TImage , class TFunction >
const IndexType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GetIndex ( void  )
inlinevirtualinherited

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 142 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
static unsigned int itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GetIteratorDimension ( )
inlinestaticinherited

Get the dimension (size) of the index.

Definition at line 135 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GoToBegin ( void  )
inlineinherited

Move an iterator to the beginning of the region. "Begin" is defined as the first pixel in the region.

Definition at line 167 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::InitializeIterator ( )
inherited

Initializes the iterator, called from constructor

Definition at line 76 of file itkShapedFloodFilledFunctionConditionalConstIterator.txx.

References itk::Size< VDimension >::Fill(), and itk::setConnectivity().

template<class TImage , class TFunction >
bool itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::IsAtEnd ( void  )
inlinevirtualinherited

Is the iterator at the end of the region?

Implements itk::ConditionalConstIterator< TImage >.

Definition at line 150 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
bool itk::ShapedFloodFilledImageFunctionConditionalConstIterator< TImage, TFunction >::IsPixelIncluded ( const IndexType index) const
virtualinherited

Compute whether the index of interest should be included in the flood

Implements itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >.

Definition at line 27 of file itkShapedFloodFilledImageFunctionConditionalConstIterator.txx.

template<class TImage , class TFunction >
void itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::operator++ ( )
inlinevirtualinherited

Walk forward one index

Implements itk::ConditionalConstIterator< TImage >.

Definition at line 200 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
void itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::Set ( const PixelType value)
inline

Set the pixel value

Definition at line 98 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.

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

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 232 of file itkShapedFloodFilledFunctionConditionalConstIterator.txx.

References itk::setConnectivity().

Member Data Documentation

template<class TImage , class TFunction >
bool itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_FoundUncheckedNeighbor
protectedinherited

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

Definition at line 255 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
bool itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_FullyConnected
protectedinherited

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 265 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
SmartPointer<FunctionType> itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_Function
protectedinherited

Smart pointer to the function we're evaluating

Definition at line 216 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage >
ImageType::ConstWeakPointer itk::ConditionalConstIterator< TImage >::m_Image
protectedinherited
template<class TImage , class TFunction >
ImageType::PointType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_ImageOrigin
protectedinherited

The origin of the source image

Definition at line 236 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
RegionType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_ImageRegion
protectedinherited

Region of the source image

Definition at line 245 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
ImageType::SpacingType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_ImageSpacing
protectedinherited

The spacing of the source image

Definition at line 239 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
std::queue<IndexType> itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_IndexStack
protectedinherited

Stack used to hold the path of the iterator through the image

Definition at line 248 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage >
bool itk::ConditionalConstIterator< TImage >::m_IsAtEnd
protectedinherited

Is the iterator at the end of its walk?

Definition at line 110 of file itkConditionalConstIterator.h.

template<class TImage , class TFunction >
bool itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_IsValidIndex
protectedinherited

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

Definition at line 258 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
FunctionInputType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_LocationVector
protectedinherited

Location vector used in the flood algorithm

Definition at line 251 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
NeighborhoodIteratorType itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_NeighborhoodIterator
protectedinherited

The neighborhood iterator

Definition at line 242 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage >
RegionType itk::ConditionalConstIterator< TImage >::m_Region
protectedinherited
template<class TImage , class TFunction >
std::vector<IndexType> itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_StartIndices
protectedinherited

A list of locations to start the recursive fill

Definition at line 233 of file itkShapedFloodFilledFunctionConditionalConstIterator.h.

template<class TImage , class TFunction >
TTempImage::Pointer itk::ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_TempPtr
protectedinherited
template<class 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 47 of file itkConditionalConstIterator.h.

template<class TImage , class TFunction >
const unsigned int itk::ShapedFloodFilledImageFunctionConditionalIterator< TImage, TFunction >::NDimensions = Superclass::NDimensions
static

Dimension of the image the iterator walks. This constant is needed so 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 71 of file itkShapedFloodFilledImageFunctionConditionalIterator.h.


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

Generated at Sun May 26 2013 02:32:21 for Orfeo Toolbox with doxygen 1.8.3.1