![]() |
Orfeo Toolbox
3.16
|
A neighborhood iterator which can take on an arbitrary shape. More...
#include <itkShapedNeighborhoodIterator.h>
Inheritance diagram for itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >:
Collaboration diagram for itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >:Classes | |
| struct | Iterator |
Public Types | |
| typedef Superclass::BoundaryConditionType | BoundaryConditionType |
| typedef Superclass::ConstIterator | ConstIterator |
| typedef Superclass::ImageBoundaryConditionPointerType | ImageBoundaryConditionPointerType |
| typedef Superclass::ImageType | ImageType |
| typedef Superclass::IndexListType | IndexListType |
| typedef Superclass::IndexType | IndexType |
| typedef Superclass::IndexValueType | IndexValueType |
| typedef TImage::InternalPixelType | InternalPixelType |
| typedef Superclass::NeighborhoodType | NeighborhoodType |
| typedef Superclass::OffsetType | OffsetType |
| typedef OffsetType::OffsetValueType | OffsetValueType |
| typedef TImage::PixelType | PixelType |
| typedef Superclass::RadiusType | RadiusType |
| typedef Superclass::RegionType | RegionType |
| typedef ShapedNeighborhoodIterator | Self |
| typedef Superclass::SizeType | SizeType |
| typedef Superclass::SizeValueType | SizeValueType |
| typedef ConstShapedNeighborhoodIterator < TImage, TBoundaryCondition > | Superclass |
Public Member Functions | |
| ShapedNeighborhoodIterator () | |
| ShapedNeighborhoodIterator (const SizeType &radius, const ImageType *ptr, const RegionType ®ion) | |
| virtual | ~ShapedNeighborhoodIterator () |
| virtual void | ActivateOffset (const OffsetType &off) |
| const ConstIterator & | Begin () const |
| Iterator & | Begin () |
| void | ClearActiveList () |
| virtual void | DeactivateOffset (const OffsetType &off) |
| Iterator & | End () |
| const ConstIterator & | End () const |
| const IndexListType & | GetActiveIndexList () const |
| IndexListType::size_type | GetActiveIndexListSize () const |
| Self & | operator++ () |
| Self & | operator+= (const OffsetType &) |
| Self & | operator-- () |
| Self & | operator-= (const OffsetType &) |
| Self & | operator= (const Self &orig) |
| virtual void | PrintSelf (std::ostream &, Indent) const |
Static Public Attributes | |
| static const unsigned int | Dimension = TImage::ImageDimension |
Protected Member Functions | |
| ShapedNeighborhoodIterator (const ShapedNeighborhoodIterator &o) | |
| void | ActivateIndex (const unsigned int n) |
| void | DeactivateIndex (const unsigned int n) |
Protected Attributes | |
| IndexListType | m_ActiveIndexList |
| Iterator | m_BeginIterator |
| bool | m_CenterIsActive |
| ConstIterator | m_ConstBeginIterator |
| ConstIterator | m_ConstEndIterator |
| Iterator | m_EndIterator |
A neighborhood iterator which can take on an arbitrary shape.
where radius, image, and region are as described in NeighborhoodIterator.
Once a neighborhood location has been activated, iteration (operator++, operator–, operator+=, operator-=) will update the value at the active location. Note that values at inactive locations will NOT be valid if queried.
A second way to access active shaped neighborhood values is through a ShapedNeighborhoodIterator::Iterator or ConstShapedNeighborhoodIterator::ConstIterator. The following example demonstrates the use of these iterators.
You can also iterate backward through the neighbohood active list.
The Get() Set() syntax was chosen versus defining operator* for these iterators because lvalue vs. rvalue context information is needed to determine whether bounds checking must take place.
Definition at line 144 of file itkShapedNeighborhoodIterator.h.
| typedef Superclass::BoundaryConditionType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::BoundaryConditionType |
Typedef for boundary condition type.
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 168 of file itkShapedNeighborhoodIterator.h.
| typedef Superclass::ConstIterator itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::ConstIterator |
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 166 of file itkShapedNeighborhoodIterator.h.
| typedef Superclass::ImageBoundaryConditionPointerType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::ImageBoundaryConditionPointerType |
Typedef for generic boundary condition pointer
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 170 of file itkShapedNeighborhoodIterator.h.
| typedef Superclass::ImageType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::ImageType |
Typedef support for common objects
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 173 of file itkShapedNeighborhoodIterator.h.
| typedef Superclass::IndexListType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::IndexListType |
An stl storage container type that can be sorted. The type used for the list of active offsets in the neighborhood.
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 167 of file itkShapedNeighborhoodIterator.h.
| typedef Superclass::IndexType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::IndexType |
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 172 of file itkShapedNeighborhoodIterator.h.
| typedef Superclass::IndexValueType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::IndexValueType |
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 175 of file itkShapedNeighborhoodIterator.h.
| typedef TImage::InternalPixelType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::InternalPixelType |
Extract image type information.
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 149 of file itkShapedNeighborhoodIterator.h.
| typedef Superclass::NeighborhoodType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::NeighborhoodType |
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 171 of file itkShapedNeighborhoodIterator.h.
| typedef Superclass::OffsetType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::OffsetType |
Inherit typedefs from superclass
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 161 of file itkShapedNeighborhoodIterator.h.
| typedef OffsetType::OffsetValueType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::OffsetValueType |
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 162 of file itkShapedNeighborhoodIterator.h.
| typedef TImage::PixelType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::PixelType |
External support for pixel type.
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 150 of file itkShapedNeighborhoodIterator.h.
| typedef Superclass::RadiusType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::RadiusType |
Radius typedef support.
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 163 of file itkShapedNeighborhoodIterator.h.
| typedef Superclass::RegionType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::RegionType |
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 174 of file itkShapedNeighborhoodIterator.h.
| typedef ShapedNeighborhoodIterator itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::Self |
Standard class typedefs.
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 156 of file itkShapedNeighborhoodIterator.h.
| typedef Superclass::SizeType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::SizeType |
Size and value typedef support.
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 164 of file itkShapedNeighborhoodIterator.h.
| typedef Superclass::SizeValueType itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::SizeValueType |
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 165 of file itkShapedNeighborhoodIterator.h.
| typedef ConstShapedNeighborhoodIterator<TImage, TBoundaryCondition> itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::Superclass |
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 158 of file itkShapedNeighborhoodIterator.h.
|
inline |
Default constructor
Definition at line 197 of file itkShapedNeighborhoodIterator.h.
|
inlinevirtual |
Virtual destructor
Definition at line 205 of file itkShapedNeighborhoodIterator.h.
|
inline |
Constructor which establishes the region size, neighborhood, and image over which to walk.
Definition at line 209 of file itkShapedNeighborhoodIterator.h.
|
protected |
Copy constructor
|
inlineprotectedvirtual |
Class is protected here so that it is not publicly accessible, but can be accessed by subclasses.. Add/Remove a neighborhood index to/from the active. Locations in the active list are the only accessible elements in the neighborhood. The argument is an index location calculated as an offset into a linear array which represents the image region defined by the radius of this iterator, with the smallest dimension as the fastest increasing index.
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 263 of file itkShapedNeighborhoodIterator.h.
|
inlinevirtualinherited |
Add/Remove a neighborhood offset (from the center of the neighborhood) to/from the active list. Active list offsets are the only locations updated and accessible through the iterator.
Definition at line 284 of file itkConstShapedNeighborhoodIterator.h.
Referenced by itk::Statistics::ImageToCooccurrenceListAdaptor< TImage >::Compute(), otb::LocalRxDetectorNonThreadFilter< TInputImage, TOutputImage >::GenerateData(), and otb::LocalRxDetectorFilter< TInputImage, TOutputImage >::ThreadedGenerateData().
|
inlineinherited |
Returns a const iterator for the neighborhood which points to the first pixel in the neighborhood.
Reimplemented from itk::Neighborhood< TImage::InternalPixelType *,::itk::GetImageDimension< TImage >::ImageDimension >.
Definition at line 199 of file itkConstShapedNeighborhoodIterator.h.
Referenced by otb::LocalRxDetectorNonThreadFilter< TInputImage, TOutputImage >::GenerateData(), itk::ValuedRegionalExtremaImageFilter< TInputImage, TOutputImage, TFunction1, TFunction2 >::GenerateData(), and otb::LocalRxDetectorFilter< TInputImage, TOutputImage >::ThreadedGenerateData().
|
inline |
Returns a const iterator for the neighborhood which points to the first pixel in the neighborhood.
Reimplemented from itk::Neighborhood< TImage::InternalPixelType *,::itk::GetImageDimension< TImage >::ImageDimension >.
Definition at line 241 of file itkShapedNeighborhoodIterator.h.
Referenced by itk::Statistics::ImageToCooccurrenceListAdaptor< TImage >::Compute(), itk::ReconstructionImageFilter< TInputImage, TOutputImage, TCompare >::GenerateData(), and itk::ValuedRegionalExtremaImageFilter< TInputImage, TOutputImage, TFunction1, TFunction2 >::GenerateData().
|
inlinevirtual |
Removes all active pixels from this neighborhood.
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 249 of file itkShapedNeighborhoodIterator.h.
|
inlineprotectedvirtual |
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 270 of file itkShapedNeighborhoodIterator.h.
|
inlinevirtualinherited |
Definition at line 286 of file itkConstShapedNeighborhoodIterator.h.
|
inline |
STL-style iterator support.
Reimplemented from itk::Neighborhood< TImage::InternalPixelType *,::itk::GetImageDimension< TImage >::ImageDimension >.
Definition at line 242 of file itkShapedNeighborhoodIterator.h.
Referenced by itk::Statistics::ImageToCooccurrenceListAdaptor< TImage >::Compute().
|
inline |
Returns a const iterator for the neighborhood which points to the last pixel in the neighborhood.
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 246 of file itkShapedNeighborhoodIterator.h.
|
inlineinherited |
Returns the list of active indicies in the neighborhood
Definition at line 299 of file itkConstShapedNeighborhoodIterator.h.
Referenced by itk::ReconstructionImageFilter< TInputImage, TOutputImage, TCompare >::GenerateData(), and itk::ValuedRegionalExtremaImageFilter< TInputImage, TOutputImage, TFunction1, TFunction2 >::GenerateData().
|
inlineinherited |
Returns the size of the list of active neighborhood indicies.
Definition at line 303 of file itkConstShapedNeighborhoodIterator.h.
|
inherited |
Reimplements the operator++ method so that only active pixel locations are updated.
Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 133 of file itkConstShapedNeighborhoodIterator.txx.
References itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::operator++().
|
inherited |
Addition of an itk::Offset. Note that this method does not do any bounds checking. Adding an offset that moves the iterator out of its assigned region will produce undefined results.
Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 258 of file itkConstShapedNeighborhoodIterator.txx.
References itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::operator+=().
|
inherited |
Reimplements the operator– method so that only active pixel locations are updated.
Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 194 of file itkConstShapedNeighborhoodIterator.txx.
References itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::operator--().
|
inherited |
Subtraction of an itk::Offset. Note that this method does not do any bounds checking. Subtracting an offset that moves the iterator out of its assigned region will produce undefined results.
Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 316 of file itkConstShapedNeighborhoodIterator.txx.
References itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::operator-=().
|
inline |
Assignment operator
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 226 of file itkShapedNeighborhoodIterator.h.
|
virtual |
Standard itk print method
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 26 of file itkShapedNeighborhoodIterator.txx.
References itk::Indent::GetNextIndent().
|
static |
Save the image dimension.
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
Definition at line 153 of file itkShapedNeighborhoodIterator.h.
|
protectedinherited |
Definition at line 349 of file itkConstShapedNeighborhoodIterator.h.
|
protected |
Definition at line 277 of file itkShapedNeighborhoodIterator.h.
|
protectedinherited |
Definition at line 348 of file itkConstShapedNeighborhoodIterator.h.
|
protectedinherited |
Definition at line 351 of file itkConstShapedNeighborhoodIterator.h.
|
protectedinherited |
Definition at line 350 of file itkConstShapedNeighborhoodIterator.h.
|
protected |
Definition at line 276 of file itkShapedNeighborhoodIterator.h.