#include <itkShapedNeighborhoodIterator.h>
Inheritance diagram for itk::ShapedNeighborhoodIterator:
Public Types | |
typedef TImage::InternalPixelType | InternalPixelType |
typedef TImage::PixelType | PixelType |
typedef ShapedNeighborhoodIterator | Self |
typedef ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition > | Superclass |
typedef Superclass::OffsetType | OffsetType |
typedef OffsetType::OffsetValueType | OffsetValueType |
typedef Superclass::RadiusType | RadiusType |
typedef Superclass::SizeType | SizeType |
typedef Superclass::SizeValueType | SizeValueType |
typedef Superclass::ConstIterator | ConstIterator |
typedef Superclass::IndexListType | IndexListType |
typedef Superclass::BoundaryConditionType | BoundaryConditionType |
typedef Superclass::ImageBoundaryConditionPointerType | ImageBoundaryConditionPointerType |
typedef TImage | ImageType |
typedef TImage::RegionType | RegionType |
typedef Index< itkGetStaticConstMacro(Dimension) | IndexType ) |
typedef IndexType::IndexValueType | IndexValueType |
typedef Neighborhood< PixelType, itkGetStaticConstMacro(Dimension) | NeighborhoodType ) |
Public Methods | |
itkStaticConstMacro (Dimension, unsigned int, TImage::ImageDimension) | |
Self & | operator= (const Self &orig) |
virtual void | PrintSelf (std::ostream &, Indent) const |
const ConstIterator & | End () const |
void | ClearActiveList () |
ShapedNeighborhoodIterator () | |
virtual | ~ShapedNeighborhoodIterator () |
ShapedNeighborhoodIterator (const ShapedNeighborhoodIterator &) | |
ShapedNeighborhoodIterator (const SizeType &radius, const ImageType *ptr, const RegionType ®ion) | |
Iterator & | Begin () |
Iterator & | End () |
Protected Methods | |
void | ActivateIndex (const unsigned int n) |
void | DeactivateIndex (const unsigned int n) |
Protected Attributes | |
Iterator | m_EndIterator |
Iterator | m_BeginIterator |
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::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 138 of file itkShapedNeighborhoodIterator.h. |
|
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. |
|
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. |
|
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. |
|
Default constructor |
|
Virtual destructor Definition at line 176 of file itkShapedNeighborhoodIterator.h. |
|
Copy constructor |
|
Constructor which establishes the region size, neighborhood, and image over which to walk. Definition at line 183 of file itkShapedNeighborhoodIterator.h. References HardConnectedComponentImageFilter::RegionType. |
|
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 225 of file itkShapedNeighborhoodIterator.h. |
|
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 208 of file itkShapedNeighborhoodIterator.h. |
|
Removes all active pixels from this neighborhood. Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. Definition at line 217 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 232 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 214 of file itkShapedNeighborhoodIterator.h. |
|
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 209 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 200 of file itkShapedNeighborhoodIterator.h. |
|
Standard itk print method Reimplemented from itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >. |
|
Definition at line 241 of file itkShapedNeighborhoodIterator.h. |
|
Definition at line 240 of file itkShapedNeighborhoodIterator.h. |