ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtk::ProjectionsRegionConstIteratorRayBased< TImage > Class Template Referenceabstract

#include <rtkProjectionsRegionConstIteratorRayBased.h>

Detailed Description

template<typename TImage>
class rtk::ProjectionsRegionConstIteratorRayBased< TImage >

Iterate over a projection stack with corresponding ray information.

Base class for iterating over the pixels of projection images with the and having at the same time the geometry information for the corresponding source to pixel ray, defined by a 3D source position and a 3D pixel position. The iterator provides this information in mm, unless a 3D matrix is provided to convert the mm value of the coordinates of the two points to some other coordinate system. A typical example is the mm to voxel matrix to work in voxel coordinates. The iterator only works with the ThreeDCircularProjectionGeometry is purely virtual because this geometry can handle parallel geometry with flat panels and cone-beam geometries with flat and curved detectors.

Author
Simon Rit

Definition at line 54 of file rtkProjectionsRegionConstIteratorRayBased.h.

+ Inheritance diagram for rtk::ProjectionsRegionConstIteratorRayBased< TImage >:
+ Collaboration diagram for rtk::ProjectionsRegionConstIteratorRayBased< TImage >:

Public Types

using HomogeneousMatrixType = itk::Matrix<double, 4, 4>
 
using IndexValueType = typename Superclass::IndexValueType
 
using MatrixType = itk::Matrix<double, 3, 4>
 
using OffsetValueType = typename Superclass::OffsetValueType
 
using PointType = typename itk::Point<double, 3>
 
using RegionType = typename Superclass::RegionType
 
using Self = ProjectionsRegionConstIteratorRayBased
 
using Superclass = itk::ImageConstIteratorWithIndex<TImage>
 
using VectorType = typename itk::Vector<double, 3>
 
- Public Types inherited from itk::ImageConstIteratorWithIndex< TImage >
using Self = ImageConstIteratorWithIndex
 
using Superclass = ImageIteratorWithIndex<std::add_const_t<TImage>>
 
- Public Types inherited from itk::ImageIteratorWithIndex< std::add_const_t< TImage > >
using AccessorFunctorType
 
using AccessorType
 
using ImageType
 
using IndexType
 
using IndexValueType
 
using InternalPixelType
 
using OffsetType
 
using OffsetValueType
 
using PixelContainer
 
using PixelContainerPointer
 
using PixelType
 
using RegionType
 
using Self
 
using SizeType
 
using SizeValueType
 

Public Member Functions

VectorType GetDirection ()
 
const PointType & GetPixelPosition ()
 
const PointType & GetSourcePosition ()
 
const VectorType & GetSourceToPixel ()
 
void Next ()
 
Self & operator++ ()
 
 ProjectionsRegionConstIteratorRayBased (const TImage *ptr, const RegionType &region, const ThreeDCircularProjectionGeometry *geometry, const MatrixType &postMat)
 
- Public Member Functions inherited from itk::ImageConstIteratorWithIndex< TImage >
 ImageConstIteratorWithIndex ()=default
 
 ImageConstIteratorWithIndex (const Superclass &it)
 
- Public Member Functions inherited from itk::ImageIteratorWithIndex< std::add_const_t< TImage > >
PixelType Get () const
 
PixelType Get () const
 
const IndexType & GetIndex () const
 
const IndexType & GetIndex () const
 
const RegionType & GetRegion () const
 
const RegionType & GetRegion () const
 
void GoToBegin ()
 
void GoToBegin ()
 
void GoToReverseBegin ()
 
void GoToReverseBegin ()
 
 ImageIteratorWithIndex ()=default
 
 ImageIteratorWithIndex ()=default
 
 ImageIteratorWithIndex (const ImageIteratorWithIndex< TOtherImage > &it)
 
 ImageIteratorWithIndex (const ImageIteratorWithIndex< TOtherImage > &it)
 
 ImageIteratorWithIndex (const Self &)=default
 
 ImageIteratorWithIndex (const Self &)=default
 
 ImageIteratorWithIndex (TImage *ptr, const RegionType &region)
 
 ImageIteratorWithIndex (TImage *ptr, const RegionType &region)
 
bool IsAtEnd () const
 
bool IsAtEnd () const
 
bool IsAtReverseEnd () const
 
bool IsAtReverseEnd () const
 
bool operator!= (const ImageIteratorWithIndex< TOtherImage > &it) const
 
bool operator!= (const ImageIteratorWithIndex< TOtherImage > &it) const
 
bool operator< (const ImageIteratorWithIndex< TOtherImage > &it) const
 
bool operator< (const ImageIteratorWithIndex< TOtherImage > &it) const
 
bool operator<= (const ImageIteratorWithIndex< TOtherImage > &it) const
 
bool operator<= (const ImageIteratorWithIndex< TOtherImage > &it) const
 
Self & operator= (const Self &)=default
 
Self & operator= (const Self &)=default
 
bool operator== (const ImageIteratorWithIndex< TOtherImage > &it) const
 
bool operator== (const ImageIteratorWithIndex< TOtherImage > &it) const
 
bool operator> (const ImageIteratorWithIndex< TOtherImage > &it) const
 
bool operator> (const ImageIteratorWithIndex< TOtherImage > &it) const
 
bool operator>= (const ImageIteratorWithIndex< TOtherImage > &it) const
 
bool operator>= (const ImageIteratorWithIndex< TOtherImage > &it) const
 
bool Remaining ()
 
bool Remaining ()
 
void Set (const PixelType &value) const
 
void Set (const PixelType &value) const
 
void SetIndex (const IndexType &ind)
 
void SetIndex (const IndexType &ind)
 
PixelType & Value ()
 
PixelType & Value ()
 
const PixelType & Value () const
 
const PixelType & Value () const
 
virtual ~ImageIteratorWithIndex ()=default
 
virtual ~ImageIteratorWithIndex ()=default
 

Static Public Member Functions

static Self * New (const TImage *ptr, const RegionType &region, const ThreeDCircularProjectionGeometry *geometry)
 
static Self * New (const TImage *ptr, const RegionType &region, const ThreeDCircularProjectionGeometry *geometry, const HomogeneousMatrixType &postMat)
 
static Self * New (const TImage *ptr, const RegionType &region, const ThreeDCircularProjectionGeometry *geometry, const MatrixType &postMat)
 
- Static Public Member Functions inherited from itk::ImageIteratorWithIndex< std::add_const_t< TImage > >
static constexpr unsigned int GetImageDimension ()
 
static constexpr unsigned int GetImageDimension ()
 

Protected Member Functions

virtual void NewPixel ()=0
 
virtual void NewProjection ()=0
 

Protected Attributes

ThreeDCircularProjectionGeometry::ConstPointer m_Geometry
 
PointType m_PixelPosition {}
 
MatrixType m_PostMultiplyMatrix
 
PointType m_SourcePosition {}
 
VectorType m_SourceToPixel {}
 
- Protected Attributes inherited from itk::ImageIteratorWithIndex< std::add_const_t< TImage > >
QualifiedInternalPixelType * m_Begin
 
QualifiedInternalPixelType * m_Begin
 
IndexType m_BeginIndex
 
IndexType m_BeginIndex
 
QualifiedInternalPixelType * m_End
 
QualifiedInternalPixelType * m_End
 
IndexType m_EndIndex
 
IndexType m_EndIndex
 
WeakPointer< TImage > m_Image
 
WeakPointer< TImage > m_Image
 
OffsetValueType m_OffsetTable [ImageDimension+1]
 
OffsetValueType m_OffsetTable [ImageDimension+1]
 
AccessorType m_PixelAccessor
 
AccessorType m_PixelAccessor
 
AccessorFunctorType m_PixelAccessorFunctor
 
AccessorFunctorType m_PixelAccessorFunctor
 
QualifiedInternalPixelType * m_Position
 
QualifiedInternalPixelType * m_Position
 
IndexType m_PositionIndex
 
IndexType m_PositionIndex
 
RegionType m_Region
 
RegionType m_Region
 
bool m_Remaining
 
bool m_Remaining
 

Additional Inherited Members

- Static Public Attributes inherited from itk::ImageIteratorWithIndex< std::add_const_t< TImage > >
static constexpr unsigned int ImageDimension
 
static constexpr unsigned int ImageDimension
 
static constexpr unsigned int ImageIteratorDimension
 
static constexpr unsigned int ImageIteratorDimension
 
- Protected Types inherited from itk::ImageIteratorWithIndex< std::add_const_t< TImage > >
using QualifiedInternalPixelType
 

Member Typedef Documentation

◆ HomogeneousMatrixType

template<typename TImage>
using rtk::ProjectionsRegionConstIteratorRayBased< TImage >::HomogeneousMatrixType = itk::Matrix<double, 4, 4>

Definition at line 73 of file rtkProjectionsRegionConstIteratorRayBased.h.

◆ IndexValueType

template<typename TImage>
using rtk::ProjectionsRegionConstIteratorRayBased< TImage >::IndexValueType = typename Superclass::IndexValueType

Definition at line 70 of file rtkProjectionsRegionConstIteratorRayBased.h.

◆ MatrixType

template<typename TImage>
using rtk::ProjectionsRegionConstIteratorRayBased< TImage >::MatrixType = itk::Matrix<double, 3, 4>

Definition at line 72 of file rtkProjectionsRegionConstIteratorRayBased.h.

◆ OffsetValueType

template<typename TImage>
using rtk::ProjectionsRegionConstIteratorRayBased< TImage >::OffsetValueType = typename Superclass::OffsetValueType

Index type alias support While these were already typdef'ed in the superclass they need to be redone here for this subclass to compile properly with gcc. Types inherited from the Superclass

Definition at line 66 of file rtkProjectionsRegionConstIteratorRayBased.h.

◆ PointType

template<typename TImage>
using rtk::ProjectionsRegionConstIteratorRayBased< TImage >::PointType = typename itk::Point<double, 3>

Definition at line 69 of file rtkProjectionsRegionConstIteratorRayBased.h.

◆ RegionType

template<typename TImage>
using rtk::ProjectionsRegionConstIteratorRayBased< TImage >::RegionType = typename Superclass::RegionType

Definition at line 67 of file rtkProjectionsRegionConstIteratorRayBased.h.

◆ Self

Standard class type alias.

Definition at line 58 of file rtkProjectionsRegionConstIteratorRayBased.h.

◆ Superclass

template<typename TImage>
using rtk::ProjectionsRegionConstIteratorRayBased< TImage >::Superclass = itk::ImageConstIteratorWithIndex<TImage>

Definition at line 59 of file rtkProjectionsRegionConstIteratorRayBased.h.

◆ VectorType

template<typename TImage>
using rtk::ProjectionsRegionConstIteratorRayBased< TImage >::VectorType = typename itk::Vector<double, 3>

Definition at line 68 of file rtkProjectionsRegionConstIteratorRayBased.h.

Constructor & Destructor Documentation

◆ ProjectionsRegionConstIteratorRayBased()

template<typename TImage>
rtk::ProjectionsRegionConstIteratorRayBased< TImage >::ProjectionsRegionConstIteratorRayBased ( const TImage * ptr,
const RegionType & region,
const ThreeDCircularProjectionGeometry * geometry,
const MatrixType & postMat )

Constructor establishes an iterator to walk a particular image and a particular region of that image. Set the matrix by which the 3D coordinates of the projection can be multiplied. A typical example is the conversion from 3D physical coordinates to voxel indices in an itk Image.

Member Function Documentation

◆ GetDirection()

template<typename TImage>
VectorType rtk::ProjectionsRegionConstIteratorRayBased< TImage >::GetDirection ( )
inline

Computes and returns a unit vector pointing from the source to the current pixel, i.e., GetSourceToPixel()/||GetSourceToPixel()||.

Definition at line 143 of file rtkProjectionsRegionConstIteratorRayBased.h.

References m_SourceToPixel.

◆ GetPixelPosition()

template<typename TImage>
const PointType & rtk::ProjectionsRegionConstIteratorRayBased< TImage >::GetPixelPosition ( )
inline

Definition at line 130 of file rtkProjectionsRegionConstIteratorRayBased.h.

References m_PixelPosition.

◆ GetSourcePosition()

template<typename TImage>
const PointType & rtk::ProjectionsRegionConstIteratorRayBased< TImage >::GetSourcePosition ( )
inline

Get ray information. A ray is described by the 3D coordinates of two points, the (current) SourcePosition and the (current) PixelPosition in the projection stack. The difference, SourceToPixel, is also computed and stored for every ray.

Definition at line 125 of file rtkProjectionsRegionConstIteratorRayBased.h.

References m_SourcePosition.

◆ GetSourceToPixel()

template<typename TImage>
const VectorType & rtk::ProjectionsRegionConstIteratorRayBased< TImage >::GetSourceToPixel ( )
inline

Definition at line 135 of file rtkProjectionsRegionConstIteratorRayBased.h.

References m_SourceToPixel.

◆ New() [1/3]

template<typename TImage>
static Self * rtk::ProjectionsRegionConstIteratorRayBased< TImage >::New ( const TImage * ptr,
const RegionType & region,
const ThreeDCircularProjectionGeometry * geometry )
static

◆ New() [2/3]

template<typename TImage>
static Self * rtk::ProjectionsRegionConstIteratorRayBased< TImage >::New ( const TImage * ptr,
const RegionType & region,
const ThreeDCircularProjectionGeometry * geometry,
const HomogeneousMatrixType & postMat )
static

◆ New() [3/3]

template<typename TImage>
static Self * rtk::ProjectionsRegionConstIteratorRayBased< TImage >::New ( const TImage * ptr,
const RegionType & region,
const ThreeDCircularProjectionGeometry * geometry,
const MatrixType & postMat )
static

◆ NewPixel()

template<typename TImage>
virtual void rtk::ProjectionsRegionConstIteratorRayBased< TImage >::NewPixel ( )
protectedpure virtual

Init a new pixel position in a 2D projection, assuming that the NewProjection method has already been called.

Implemented in rtk::ProjectionsRegionConstIteratorRayBasedParallel< TImage >, rtk::ProjectionsRegionConstIteratorRayBasedWithCylindricalPanel< TImage >, and rtk::ProjectionsRegionConstIteratorRayBasedWithFlatPanel< TImage >.

◆ NewProjection()

template<typename TImage>
virtual void rtk::ProjectionsRegionConstIteratorRayBased< TImage >::NewProjection ( )
protectedpure virtual

◆ Next()

template<typename TImage>
void rtk::ProjectionsRegionConstIteratorRayBased< TImage >::Next ( )
inline

Go to the next pixel by simply calling the ++ operator. Should not be the ++ operator should be. The function is provided for cosmetic reasons, because pointers to these iterators will be used more than the iterator itself.

Definition at line 115 of file rtkProjectionsRegionConstIteratorRayBased.h.

◆ operator++()

template<typename TImage>
Self & rtk::ProjectionsRegionConstIteratorRayBased< TImage >::operator++ ( )

Increment (prefix) the fastest moving dimension of the iterator's index. This operator will constrain the iterator within the region (i.e. the iterator will automatically wrap from the end of the row of the region to the beginning of the next row of the region) up until the iterator tries to moves past the last pixel of the region. Here, the iterator will be set to be one pixel past the end of the region.

See also
operator--

Member Data Documentation

◆ m_Geometry

template<typename TImage>
ThreeDCircularProjectionGeometry::ConstPointer rtk::ProjectionsRegionConstIteratorRayBased< TImage >::m_Geometry
protected

Definition at line 158 of file rtkProjectionsRegionConstIteratorRayBased.h.

◆ m_PixelPosition

template<typename TImage>
PointType rtk::ProjectionsRegionConstIteratorRayBased< TImage >::m_PixelPosition {}
protected

Definition at line 161 of file rtkProjectionsRegionConstIteratorRayBased.h.

Referenced by GetPixelPosition().

◆ m_PostMultiplyMatrix

template<typename TImage>
MatrixType rtk::ProjectionsRegionConstIteratorRayBased< TImage >::m_PostMultiplyMatrix
protected

Definition at line 159 of file rtkProjectionsRegionConstIteratorRayBased.h.

◆ m_SourcePosition

template<typename TImage>
PointType rtk::ProjectionsRegionConstIteratorRayBased< TImage >::m_SourcePosition {}
protected

Definition at line 160 of file rtkProjectionsRegionConstIteratorRayBased.h.

Referenced by GetSourcePosition().

◆ m_SourceToPixel

template<typename TImage>
VectorType rtk::ProjectionsRegionConstIteratorRayBased< TImage >::m_SourceToPixel {}
protected

Definition at line 162 of file rtkProjectionsRegionConstIteratorRayBased.h.

Referenced by GetDirection(), and GetSourceToPixel().


The documentation for this class was generated from the following file: