#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.
Definition at line 117 of file itkShapedNeighborhoodIterator.h.
|
Typedef for boundary condition type. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 140 of file itkShapedNeighborhoodIterator.h. |
|
Reimplemented from itk::NeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 138 of file itkShapedNeighborhoodIterator.h. Referenced by itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::End(), and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::Iterator::Iterator(). |
|
Typedef for generic boundary condition pointer Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 142 of file itkShapedNeighborhoodIterator.h. |
|
Typedef support for common objects Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 145 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 139 of file itkShapedNeighborhoodIterator.h. |
|
Typedef support for common objects Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 147 of file itkShapedNeighborhoodIterator.h. |
|
Typedef support for common objects Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 148 of file itkShapedNeighborhoodIterator.h. |
|
Extract image type information. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 122 of file itkShapedNeighborhoodIterator.h. |
|
Typedef support for common objects Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 149 of file itkShapedNeighborhoodIterator.h. |
|
Inherit typedefs from superclass Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 133 of file itkShapedNeighborhoodIterator.h. |
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 134 of file itkShapedNeighborhoodIterator.h. |
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 123 of file itkShapedNeighborhoodIterator.h. |
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 135 of file itkShapedNeighborhoodIterator.h. |
|
Typedef support for common objects Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 146 of file itkShapedNeighborhoodIterator.h. |
|
Standard class typedefs. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 129 of file itkShapedNeighborhoodIterator.h. Referenced by itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::Iterator::Iterator(). |
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 136 of file itkShapedNeighborhoodIterator.h. |
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 137 of file itkShapedNeighborhoodIterator.h. |
|
Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 130 of file itkShapedNeighborhoodIterator.h. Referenced by itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::ShapedNeighborhoodIterator(). |
|
Default constructor Definition at line 173 of file itkShapedNeighborhoodIterator.h. |
|
Virtual destructor Definition at line 182 of file itkShapedNeighborhoodIterator.h. |
|
Constructor which establishes the region size, neighborhood, and image over which to walk. Definition at line 186 of file itkShapedNeighborhoodIterator.h. References itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::ImageType, 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 241 of file itkShapedNeighborhoodIterator.h. |
|
Returns a const iterator for the neighborhood which points to the first pixel in the neighborhood. Definition at line 218 of file itkShapedNeighborhoodIterator.h. |
|
Removes all active pixels from this neighborhood. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 227 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 248 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 224 of file itkShapedNeighborhoodIterator.h. |
|
Returns a const iterator for the neighborhood which points to the first pixel in the neighborhood. Definition at line 219 of file itkShapedNeighborhoodIterator.h. References itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::ConstIterator. |
|
Save the image dimension. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
|
|
Assignment operator Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 203 of file itkShapedNeighborhoodIterator.h. |
|
Standard itk print method Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.
|
|
Definition at line 257 of file itkShapedNeighborhoodIterator.h. |
|
Definition at line 256 of file itkShapedNeighborhoodIterator.h. |