ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Attributes | List of all members
itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction > Class Template Referenceabstract

#include <itkFloodFilledFunctionConditionalConstIterator.h>

Detailed Description

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

Iterates over a flood-filled spatial function.

Definition at line 39 of file itkFloodFilledFunctionConditionalConstIterator.h.

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

Public Types

using FunctionInputType = typename TFunction::InputType
 
using FunctionType = TFunction
 
using ImageType = TImage
 
using IndexType = typename TImage::IndexType
 
using InternalPixelType = typename TImage::InternalPixelType
 
using PixelType = typename TImage::PixelType
 
using RegionType = typename TImage::RegionType
 
using SeedsContainerType = typename std::vector< IndexType >
 
using Self = FloodFilledFunctionConditionalConstIterator
 
using SizeType = typename TImage::SizeType
 
- Public Types inherited from itk::ConditionalConstIterator< TImage >
using ImageType = TImage
 
using IndexType = typename TImage::IndexType
 
using InternalPixelType = typename TImage::InternalPixelType
 
using PixelType = typename TImage::PixelType
 
using RegionType = typename TImage::RegionType
 
using Self = ConditionalConstIterator
 
using SizeType = typename TImage::SizeType
 

Public Member Functions

void AddSeed (const IndexType &seed)
 
void ClearSeeds ()
 
void DoFloodStep ()
 
void FindSeedPixel ()
 
void FindSeedPixels ()
 
 FloodFilledFunctionConditionalConstIterator (const ImageType *imagePtr, FunctionType *fnPtr)
 
 FloodFilledFunctionConditionalConstIterator (const ImageType *imagePtr, FunctionType *fnPtr, IndexType startIndex)
 
 FloodFilledFunctionConditionalConstIterator (const ImageType *imagePtr, FunctionType *fnPtr, std::vector< IndexType > &startIndex)
 
const PixelType Get () const override
 
virtual SmartPointer< FunctionTypeGetFunction () const
 
const IndexType GetIndex () override
 
virtual const SeedsContainerTypeGetSeeds () const
 
void GoToBegin ()
 
void InitializeIterator ()
 
bool IsAtEnd () const override
 
bool IsPixelIncluded (const IndexType &index) const override=0
 
void operator++ () override
 
 ~FloodFilledFunctionConditionalConstIterator () override=default
 
Selfoperator= (const Self &it)
 
- Public Member Functions inherited from itk::ConditionalConstIterator< TImage >
 ConditionalConstIterator ()=default
 
Selfoperator= (const Self &it)
 
virtual ~ConditionalConstIterator ()=default
 

Static Public Member Functions

static unsigned int GetIteratorDimension ()
 
- Static Public Member Functions inherited from itk::ConditionalConstIterator< TImage >
static unsigned int GetIteratorDimension ()
 

Static Public Attributes

static constexpr unsigned int NDimensions = TImage::ImageDimension
 
- Static Public Attributes inherited from itk::ConditionalConstIterator< TImage >
static constexpr unsigned int NDimension = TImage::ImageDimension
 

Protected Types

using TTempImage = Image< unsigned char, Self::NDimensions >
 

Protected Attributes

bool m_FoundUncheckedNeighbor {}
 
SmartPointer< FunctionTypem_Function {}
 
ImageType::PointType m_ImageOrigin {}
 
RegionType m_ImageRegion {}
 
ImageType::SpacingType m_ImageSpacing {}
 
std::queue< IndexTypem_IndexStack {}
 
bool m_IsValidIndex {}
 
FunctionInputType m_LocationVector {}
 
SeedsContainerType m_Seeds {}
 
TTempImage::Pointer m_TemporaryPointer {}
 
- Protected Attributes inherited from itk::ConditionalConstIterator< TImage >
ImageType::ConstWeakPointer m_Image {}
 
bool m_IsAtEnd { false }
 
RegionType m_Region {}
 

Member Typedef Documentation

◆ FunctionInputType

template<typename TImage , typename TFunction >
using itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::FunctionInputType = typename TFunction::InputType

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

Definition at line 50 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ FunctionType

template<typename TImage , typename TFunction >
using itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::FunctionType = TFunction

Type of function

Definition at line 47 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ ImageType

template<typename TImage , typename TFunction >
using itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::ImageType = TImage

Image type alias support.

Definition at line 65 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ IndexType

template<typename TImage , typename TFunction >
using itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::IndexType = typename TImage::IndexType

Index type alias support.

Definition at line 53 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ InternalPixelType

template<typename TImage , typename TFunction >
using itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::InternalPixelType = typename TImage::InternalPixelType

Internal Pixel Type

Definition at line 68 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ PixelType

template<typename TImage , typename TFunction >
using itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::PixelType = typename TImage::PixelType

External Pixel Type

Definition at line 71 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ RegionType

template<typename TImage , typename TFunction >
using itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::RegionType = typename TImage::RegionType

Region type alias support

Definition at line 62 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ SeedsContainerType

template<typename TImage , typename TFunction >
using itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::SeedsContainerType = typename std::vector<IndexType>

Index ContainerType

Definition at line 56 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ Self

template<typename TImage , typename TFunction >
using itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::Self = FloodFilledFunctionConditionalConstIterator

Standard class type aliases.

Definition at line 44 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ SizeType

template<typename TImage , typename TFunction >
using itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::SizeType = typename TImage::SizeType

Size type alias support.

Definition at line 59 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ TTempImage

template<typename TImage , typename TFunction >
using itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::TTempImage = Image<unsigned char, Self::NDimensions>
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 251 of file itkFloodFilledFunctionConditionalConstIterator.h.

Constructor & Destructor Documentation

◆ FloodFilledFunctionConditionalConstIterator() [1/3]

template<typename TImage , typename TFunction >
itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::FloodFilledFunctionConditionalConstIterator ( 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"

◆ FloodFilledFunctionConditionalConstIterator() [2/3]

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

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

◆ FloodFilledFunctionConditionalConstIterator() [3/3]

template<typename TImage , typename TFunction >
itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::FloodFilledFunctionConditionalConstIterator ( 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

◆ ~FloodFilledFunctionConditionalConstIterator()

template<typename TImage , typename TFunction >
itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::~FloodFilledFunctionConditionalConstIterator ( )
overridedefault

Default Destructor.

Member Function Documentation

◆ AddSeed()

template<typename TImage , typename TFunction >
void itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::AddSeed ( const IndexType seed)
inline

Put more seeds on the list

Definition at line 175 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ ClearSeeds()

template<typename TImage , typename TFunction >
void itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::ClearSeeds ( )
inline

Clear all the seeds

Definition at line 189 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ DoFloodStep()

template<typename TImage , typename TFunction >
void itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::DoFloodStep ( )

◆ FindSeedPixel()

template<typename TImage , typename TFunction >
void itk::FloodFilledFunctionConditionalConstIterator< 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.

◆ FindSeedPixels()

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

Automatically find all seed pixels.

◆ Get()

template<typename TImage , typename TFunction >
const PixelType itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::Get ( ) const
inlineoverridevirtual

◆ GetFunction()

template<typename TImage , typename TFunction >
virtual SmartPointer<FunctionType> itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GetFunction ( ) const
inlinevirtual

◆ GetIndex()

template<typename TImage , typename TFunction >
const IndexType itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GetIndex ( )
inlineoverridevirtual

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 154 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ GetIteratorDimension()

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

Get the dimension (size) of the index.

Definition at line 144 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ GetSeeds()

template<typename TImage , typename TFunction >
virtual const SeedsContainerType& itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GetSeeds ( ) const
inlinevirtual

get the seed container

Definition at line 182 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ GoToBegin()

template<typename TImage , typename TFunction >
void itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::GoToBegin ( )
inline

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

Definition at line 197 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ InitializeIterator()

template<typename TImage , typename TFunction >
void itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::InitializeIterator ( )

Initializes the iterator, called from constructor

◆ IsAtEnd()

template<typename TImage , typename TFunction >
bool itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::IsAtEnd ( ) const
inlineoverridevirtual

Is the iterator at the end of the region?

Implements itk::ConditionalConstIterator< TImage >.

Definition at line 168 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ IsPixelIncluded()

template<typename TImage , typename TFunction >
bool itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::IsPixelIncluded ( const IndexType index) const
overridepure virtual

◆ operator++()

template<typename TImage , typename TFunction >
void itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::operator++ ( )
inlineoverridevirtual

Walk forward one index

Implements itk::ConditionalConstIterator< TImage >.

Definition at line 228 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ operator=()

template<typename TImage , typename TFunction >
Self& itk::FloodFilledFunctionConditionalConstIterator< 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 121 of file itkFloodFilledFunctionConditionalConstIterator.h.

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

Member Data Documentation

◆ m_FoundUncheckedNeighbor

template<typename TImage , typename TFunction >
bool itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_FoundUncheckedNeighbor {}
protected

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

Definition at line 274 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ m_Function

template<typename TImage , typename TFunction >
SmartPointer<FunctionType> itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_Function {}
protected

Smart pointer to the function we're evaluating

Definition at line 244 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ m_ImageOrigin

template<typename TImage , typename TFunction >
ImageType::PointType itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_ImageOrigin {}
protected

The origin of the source image

Definition at line 258 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ m_ImageRegion

template<typename TImage , typename TFunction >
RegionType itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_ImageRegion {}
protected

Region of the source image

Definition at line 264 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ m_ImageSpacing

template<typename TImage , typename TFunction >
ImageType::SpacingType itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_ImageSpacing {}
protected

The spacing of the source image

Definition at line 261 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ m_IndexStack

template<typename TImage , typename TFunction >
std::queue<IndexType> itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_IndexStack {}
protected

◆ m_IsValidIndex

template<typename TImage , typename TFunction >
bool itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_IsValidIndex {}
protected

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

Definition at line 277 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ m_LocationVector

template<typename TImage , typename TFunction >
FunctionInputType itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_LocationVector {}
protected

Location vector used in the flood algorithm

Definition at line 270 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ m_Seeds

template<typename TImage , typename TFunction >
SeedsContainerType itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_Seeds {}
protected

A list of locations to start the recursive fill

Definition at line 255 of file itkFloodFilledFunctionConditionalConstIterator.h.

◆ m_TemporaryPointer

template<typename TImage , typename TFunction >
TTempImage::Pointer itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::m_TemporaryPointer {}
protected

◆ NDimensions

template<typename TImage , typename TFunction >
constexpr unsigned int itk::FloodFilledFunctionConditionalConstIterator< TImage, TFunction >::NDimensions = TImage::ImageDimension
staticconstexpr

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 77 of file itkFloodFilledFunctionConditionalConstIterator.h.


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