#include <itkShapedNeighborhoodIterator.h>
Inheritance diagram for itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >:


typedef Image<float, 3> ImageType; ShapedNeighborhoodIterator<ImageType> it(radius, image, region); ShapedNeighborhoodIterator<ImageType>::OffsetType offset = {{0,0,0}}; it.ActivateOffset(offset);
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.
typedef Image<float, 3> ImageType; ShapedNeighborhoodIterator<ImageType> it(radius, image, region); . . . it.ActivateOffset(offset1); it.ActivateOffset(offset2); it.ActivateOffset(offset3); etc.. . . . ShapedNeighborhoodIterator<ImageType>::Iterator i; for (i = it.Begin(); ! i.IsAtEnd(); i++) { i.Set(i.Get() + 1.0); } \\ you may also use i != i.End(), but IsAtEnd() may be slightly faster.
You can also iterate backward through the neighbohood active list.
i = it.End();
i--;
while (i != it.Begin())
{
i.Set(i.Get() + 1.0);
i--;
}
i.Set(i.Get() + 1.0);
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.
ConstShapedNeighborhoodIterator
CorrespondenceDataStructureIterator
FloodFilledFunctionConditionalConstIterator
FloodFilledImageFunctionConditionalConstIterator
FloodFilledImageFunctionConditionalIterator
FloodFilledSpatialFunctionConditionalConstIterator
FloodFilledSpatialFunctionConditionalIterator
ImageLinearConstIteratorWithIndex
ImageRandomConstIteratorWithIndex
ImageRegionConstIteratorWithIndex
ImageRegionExclusionConstIteratorWithIndex
ImageRegionExclusionIteratorWithIndex
ImageRegionReverseConstIterator
Definition at line 144 of file itkShapedNeighborhoodIterator.h.
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 | |
| const ConstIterator & | Begin () const |
| Returns a const iterator for the neighborhood which points to the first *pixel in the neighborhood *Iterator & | Begin () |
| void | ClearActiveList () |
| virtual void | DeactivateOffset (const OffsetType &off) |
| const ConstIterator & | End () const |
| Iterator & | End () |
| const IndexListType & | GetActiveIndexList () const |
| IndexListType::size_type | GetActiveIndexListSize () const |
| itkStaticConstMacro (Dimension, unsigned int, TImage::ImageDimension) | |
| 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.*/virtual void ActivateOffset(const OffsetType &off) |
| Assignment | operator */Self &operator= (const Self &orig) |
| Self & | operator++ () |
| Self & | operator+= (const OffsetType &) |
| Self & | operator-- () |
| Self & | operator-= (const OffsetType &) |
| Self & | operator= (const Self &orig) |
| virtual void | PrintSelf (std::ostream &, Indent) const |
| Constructor which establishes the region and image *over which to walk * | ShapedNeighborhoodIterator (const SizeType &radius, const ImageType *ptr, const RegionType ®ion) |
| Default constructor * | ShapedNeighborhoodIterator () |
| virtual | ~ShapedNeighborhoodIterator () |
Public Attributes | |
| Constructor which establishes the region | neighborhood |
| Constructor which establishes the region | size |
Protected Member Functions | |
| void | ActivateIndex (const unsigned int n) |
| void | DeactivateIndex (const unsigned int n) |
| ShapedNeighborhoodIterator (const ShapedNeighborhoodIterator &o) | |
Protected Attributes | |
| 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 |
| IndexListType | m_ActiveIndexList |
| Iterator | m_BeginIterator |
| bool | m_CenterIsActive |
| ConstIterator | m_ConstBeginIterator |
| ConstIterator | m_ConstEndIterator |
| Iterator | m_EndIterator |
Classes | |
| struct | Iterator |
|
|||||
|
Typedef for boundary condition type. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 167 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 165 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Typedef for generic boundary condition pointer Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 168 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 171 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
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 166 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 170 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 173 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Extract image type information. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 149 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 169 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Inherit typedefs from superclass Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 160 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 161 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 150 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 162 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 172 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Standard class typedefs. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 156 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 163 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 164 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 157 of file itkShapedNeighborhoodIterator.h. |
|
|||||||||
|
Definition at line 196 of file itkShapedNeighborhoodIterator.h. |
|
|||||||||
|
Virtual destructor Definition at line 205 of file itkShapedNeighborhoodIterator.h. |
|
||||||||||||||||||||
|
Definition at line 209 of file itkShapedNeighborhoodIterator.h. |
|
||||||||||
|
Copy constructor |
|
||||||||||
|
Class is protected here so that it is not publicly accessible, but can be accessed by subclasses.. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 265 of file itkShapedNeighborhoodIterator.h. |
|
|||||||||
|
Returns a const iterator for the neighborhood which points to the first pixel in the neighborhood. Definition at line 201 of file itkConstShapedNeighborhoodIterator.h. |
|
||||||||||
|
Definition at line 242 of file itkShapedNeighborhoodIterator.h. |
|
|||||||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 251 of file itkShapedNeighborhoodIterator.h. |
|
||||||||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 272 of file itkShapedNeighborhoodIterator.h. |
|
||||||||||
|
Definition at line 291 of file itkConstShapedNeighborhoodIterator.h. |
|
||||||||||
|
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 248 of file itkShapedNeighborhoodIterator.h. |
|
||||||||||
|
Definition at line 243 of file itkShapedNeighborhoodIterator.h. |
|
|||||||||
|
Returns the list of active indicies in the neighborhood Definition at line 306 of file itkConstShapedNeighborhoodIterator.h. |
|
|||||||||
|
Returns the size of the list of active neighborhood indicies. Definition at line 310 of file itkConstShapedNeighborhoodIterator.h. |
|
||||||||||||||||||||
|
Save the image dimension. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. |
|
||||||||||
|
Definition at line 286 of file itkConstShapedNeighborhoodIterator.h. |
|
||||||||||
|
Reimplemented from itk::NeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 270 of file itkConstShapedNeighborhoodIterator.h. References itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::m_ActiveIndexList, and itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::m_CenterIsActive. |
|
|||||||||
|
Reimplements the operator++ method so that only active pixel locations are updataed. |
|
||||||||||
|
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. |
|
|||||||||
|
Reimplements the operator-- method so that only active pixel locations are updataed. |
|
||||||||||
|
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. |
|
||||||||||
|
Assignment operator Definition at line 227 of file itkShapedNeighborhoodIterator.h. |
|
||||||||||||||||
|
Standard itk print method Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. |
|
|||||
|
Class is protected here so that it is not publicly accessible, but can be accessed by subclasses.. Definition at line 351 of file itkConstShapedNeighborhoodIterator.h. |
|
|||||
|
Definition at line 357 of file itkConstShapedNeighborhoodIterator.h. Referenced by itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::operator */Self &operator=(). |
|
|||||
|
Definition at line 281 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Definition at line 356 of file itkConstShapedNeighborhoodIterator.h. Referenced by itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::operator */Self &operator=(). |
|
|||||
|
Definition at line 359 of file itkConstShapedNeighborhoodIterator.h. |
|
|||||
|
Definition at line 358 of file itkConstShapedNeighborhoodIterator.h. |
|
|||||
|
Definition at line 280 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 207 of file itkShapedNeighborhoodIterator.h. |
|
|||||
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 207 of file itkShapedNeighborhoodIterator.h. |
1.4.2 written by Dimitri van Heesch,
© 1997-2000