ITK
5.2.0
Insight Toolkit
|
#include <itkShapedImageNeighborhoodRange.h>
Classes | |
class | CheckPolicy |
struct | EmptyPixelAccessParameter |
struct | OptionalPixelAccessParameter |
struct | OptionalPixelAccessParameter< TPolicy, false > |
class | PixelProxy |
class | PixelProxy< false, TDummy > |
class | PixelProxy< true, TDummy > |
class | QualifiedIterator |
struct | RegionData |
Public Types | |
using | const_iterator = QualifiedIterator< true > |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
using | iterator = QualifiedIterator< IsImageTypeConst > |
using | reverse_iterator = std::reverse_iterator< iterator > |
Public Member Functions | |
ShapedImageNeighborhoodRange ()=default | |
ShapedImageNeighborhoodRange (ImageType &image, const IndexType &location, const OffsetType *const shapeOffsets, const std::vcl_size_t numberOfNeigborhoodPixels, const OptionalPixelAccessParameterType optionalPixelAccessParameter={}) | |
template<typename TContainerOfOffsets > | |
ShapedImageNeighborhoodRange (ImageType &image, const IndexType &location, const TContainerOfOffsets &shapeOffsets, const OptionalPixelAccessParameterType optionalPixelAccessParameter={}) | |
iterator | begin () const noexcept |
iterator | end () const noexcept |
const_iterator | cbegin () const noexcept |
const_iterator | cend () const noexcept |
reverse_iterator | rbegin () const noexcept |
reverse_iterator | rend () const noexcept |
const_reverse_iterator | crbegin () const noexcept |
const_reverse_iterator | crend () const noexcept |
std::vcl_size_t | size () const noexcept |
bool | empty () const noexcept |
QualifiedIterator< false >::reference | operator[] (const std::vcl_size_t n) const noexcept |
void | SetLocation (const IndexType &location) noexcept |
Private Types | |
using | ImageDimensionType = typename TImage::ImageDimensionType |
using | ImageRegionType = typename TImage::RegionType |
using | ImageSizeType = typename TImage::SizeType |
using | ImageSizeValueType = typename TImage::SizeValueType |
using | ImageType = TImage |
using | IndexType = typename TImage::IndexType |
using | IndexValueType = typename TImage::IndexValueType |
using | InternalPixelType = typename TImage::InternalPixelType |
using | NeighborhoodAccessorFunctorType = typename TImage::NeighborhoodAccessorFunctorType |
using | OffsetType = Offset< ImageDimension > |
using | OptionalPixelAccessParameterType = typename OptionalPixelAccessParameter< TImageNeighborhoodPixelAccessPolicy >::Type |
using | PixelType = typename TImage::PixelType |
using | QualifiedInternalPixelType = typename std::conditional< IsImageTypeConst, const InternalPixelType, InternalPixelType >::type |
Private Member Functions | |
void | SubtractIndex (IndexType &index1, const IndexType &index2) |
Private Attributes | |
RegionData | m_BufferedRegionData {} |
QualifiedInternalPixelType * | m_ImageBufferPointer { nullptr } |
NeighborhoodAccessorFunctorType | m_NeighborhoodAccessor {} |
std::vcl_size_t | m_NumberOfNeighborhoodPixels { 0 } |
OffsetType | m_OffsetTable { {} } |
OptionalPixelAccessParameterType | m_OptionalPixelAccessParameter {} |
IndexType | m_RelativeLocation { {} } |
const OffsetType * | m_ShapeOffsets { nullptr } |
Static Private Attributes | |
static constexpr ImageDimensionType | ImageDimension = TImage::ImageDimension |
static constexpr bool | IsImageTypeConst = std::is_const<TImage>::value |
Modern C++11 range to iterate over a neighborhood of pixels. Designed to conform to Standard C++ Iterator requirements, so that it can be used in range-based for loop, and passed to Standard C++ algorithms.
The following example creates a 3 x 5 neighborhood around pixel [10, 20] and adds 42 to each neighborhood pixel, using a range-based for loop:
The following example prints the values of the neighborhood pixels:
The inner product of the neighborhood with a kernel can be produced with std::inner_product (from the Standard C++ header "numeric"), as follows:
Definition at line 94 of file itkShapedImageNeighborhoodRange.h.
using itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::const_iterator = QualifiedIterator<true> |
Definition at line 650 of file itkShapedImageNeighborhoodRange.h.
using itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 653 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 141 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 144 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 142 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 143 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 140 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 149 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 150 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 146 of file itkShapedImageNeighborhoodRange.h.
using itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::iterator = QualifiedIterator<IsImageTypeConst> |
Definition at line 651 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 147 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 151 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 153 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 145 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 596 of file itkShapedImageNeighborhoodRange.h.
using itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::reverse_iterator = std::reverse_iterator<iterator> |
Definition at line 652 of file itkShapedImageNeighborhoodRange.h.
|
default |
Explicitly-defaulted default-constructor. Constructs an empty range.
|
inline |
Specifies a range for the neighborhood of a pixel at the specified location. The shape of the neighborhood is specified by a pointer to a contiguous sequence of offsets, relative to the location index.
Definition at line 669 of file itkShapedImageNeighborhoodRange.h.
|
inline |
Specifies a range for the neighborhood of a pixel at the specified location. The shape of the neighborhood is specified by a container of offsets, relative to the location index. This container of offsets must be a contiguous container, for example std::vector<OffsetType> or std::array<OffsetType>.
Definition at line 706 of file itkShapedImageNeighborhoodRange.h.
|
inlinenoexcept |
Returns an iterator to the first neighborhood pixel.
Definition at line 720 of file itkShapedImageNeighborhoodRange.h.
References itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_BufferedRegionData, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_ImageBufferPointer, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_NeighborhoodAccessor, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_OffsetTable, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_OptionalPixelAccessParameter, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_RelativeLocation, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_ShapeOffsets, and itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::RegionData::m_Size.
Referenced by itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::cbegin(), itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::operator[](), and itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::rend().
|
inlinenoexcept |
Returns a const iterator to the first neighborhood pixel. Provides only read-only access to the pixel data.
Definition at line 742 of file itkShapedImageNeighborhoodRange.h.
References itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::begin().
|
inlinenoexcept |
Returns a const 'end iterator' for this range.
Definition at line 749 of file itkShapedImageNeighborhoodRange.h.
References itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::end().
|
inlinenoexcept |
Returns a const reverse 'begin iterator' for this range.
Definition at line 770 of file itkShapedImageNeighborhoodRange.h.
References itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::rbegin().
|
inlinenoexcept |
Returns a const reverse 'end iterator' for this range.
Definition at line 777 of file itkShapedImageNeighborhoodRange.h.
References itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::rend().
|
inlinenoexcept |
Tells whether the range is empty.
Definition at line 793 of file itkShapedImageNeighborhoodRange.h.
|
inlinenoexcept |
Returns an 'end iterator' for this range.
Definition at line 728 of file itkShapedImageNeighborhoodRange.h.
References itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_BufferedRegionData, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_ImageBufferPointer, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_NeighborhoodAccessor, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_NumberOfNeighborhoodPixels, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_OffsetTable, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_OptionalPixelAccessParameter, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_RelativeLocation, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_ShapeOffsets, and itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::RegionData::m_Size.
Referenced by itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::cend(), and itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::rbegin().
|
inlinenoexcept |
Subscript operator. Allows random access, to the nth neighbor pixel.
Definition at line 804 of file itkShapedImageNeighborhoodRange.h.
References itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::begin(), and itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::size().
|
inlinenoexcept |
Returns a reverse 'begin iterator' for this range.
Definition at line 756 of file itkShapedImageNeighborhoodRange.h.
References itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::end().
Referenced by itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::crbegin().
|
inlinenoexcept |
Returns a reverse 'end iterator' for this range.
Definition at line 763 of file itkShapedImageNeighborhoodRange.h.
References itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::begin().
Referenced by itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::crend().
|
inlinenoexcept |
Sets the location of this neighborhood by specifying its pixel index. Typically, this is the index of the center pixel of the neighborhood.
Definition at line 818 of file itkShapedImageNeighborhoodRange.h.
References itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_BufferedRegionData, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::RegionData::m_Index, itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::m_RelativeLocation, and itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::SubtractIndex().
|
inlinenoexcept |
Returns the size of the range, that is the number of neighborhood pixels.
Definition at line 785 of file itkShapedImageNeighborhoodRange.h.
Referenced by itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::operator[]().
|
inlineprivate |
Definition at line 615 of file itkShapedImageNeighborhoodRange.h.
Referenced by itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::SetLocation().
|
staticconstexprprivate |
Definition at line 148 of file itkShapedImageNeighborhoodRange.h.
Referenced by itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::SubtractIndex().
|
staticconstexprprivate |
Definition at line 593 of file itkShapedImageNeighborhoodRange.h.
|
private |
Definition at line 629 of file itkShapedImageNeighborhoodRange.h.
Referenced by itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::begin(), itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::end(), and itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::SetLocation().
|
private |
Definition at line 626 of file itkShapedImageNeighborhoodRange.h.
Referenced by itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::begin(), itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::end(), itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::PixelProxy< true, TDummy >::operator PixelType(), itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::PixelProxy< false, TDummy >::operator PixelType(), and itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::PixelProxy< false, TDummy >::operator=().
|
private |
|
private |
Definition at line 645 of file itkShapedImageNeighborhoodRange.h.
Referenced by itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::empty(), itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::end(), and itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::size().
|
private |
|
private |
|
private |
Definition at line 639 of file itkShapedImageNeighborhoodRange.h.
Referenced by itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::begin(), itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::end(), and itk::Experimental::ShapedImageNeighborhoodRange< TImage, TImageNeighborhoodPixelAccessPolicy >::SetLocation().
|
private |