#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.
|
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. Referenced by itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::Iterator::Iterator(). |
|
Typedef for generic boundary condition pointer Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 168 of file itkShapedNeighborhoodIterator.h. |
|
Typedef support for common objects Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 171 of file itkShapedNeighborhoodIterator.h. Referenced by itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::ShapedNeighborhoodIterator(). |
|
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. |
|
Typedef support for common objects Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 170 of file itkShapedNeighborhoodIterator.h. |
|
Typedef support for common objects 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. |
|
Typedef support for common objects 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. |
|
External support for pixel type. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 150 of file itkShapedNeighborhoodIterator.h. |
|
Radius typedef support. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 162 of file itkShapedNeighborhoodIterator.h. |
|
Typedef support for common objects Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 172 of file itkShapedNeighborhoodIterator.h. Referenced by itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::ShapedNeighborhoodIterator(). |
|
Standard class typedefs. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 156 of file itkShapedNeighborhoodIterator.h. Referenced by itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::Iterator::Iterator(). |
|
Size and value typedef support. 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. Referenced by itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::ShapedNeighborhoodIterator(). |
|
Default constructor Definition at line 196 of file itkShapedNeighborhoodIterator.h. |
|
Virtual destructor Definition at line 205 of file itkShapedNeighborhoodIterator.h. |
|
Constructor which establishes the region size, neighborhood, and image over which to walk. Definition at line 209 of file itkShapedNeighborhoodIterator.h. References itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::ImageType, itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::RegionType, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::Superclass. |
|
Copy constructor |
|
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 265 of file itkShapedNeighborhoodIterator.h. |
|
Returns a const iterator for the neighborhood which points to the first pixel in the neighborhood. Reimplemented from itk::Neighborhood< TPixel, VDimension, TAllocator >. Definition at line 242 of file itkShapedNeighborhoodIterator.h. |
|
Removes all active pixels from this neighborhood. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 251 of file itkShapedNeighborhoodIterator.h. |
|
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 272 of file itkShapedNeighborhoodIterator.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. |
|
Returns a const iterator for the neighborhood which points to the first pixel in the neighborhood. Reimplemented from itk::Neighborhood< TPixel, VDimension, TAllocator >. Definition at line 243 of file itkShapedNeighborhoodIterator.h. |
|
Save the image dimension. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. |
|
Assignment operator Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 227 of file itkShapedNeighborhoodIterator.h. |
|
Standard itk print method Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. |
|
Definition at line 281 of file itkShapedNeighborhoodIterator.h. |
|
Definition at line 280 of file itkShapedNeighborhoodIterator.h. |