RTK  2.0.1
Reconstruction Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
rtk::FieldOfViewImageFilter< TInputImage, TOutputImage > Class Template Reference

#include <rtkFieldOfViewImageFilter.h>

+ Inheritance diagram for rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >:
+ Collaboration diagram for rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >:

Public Types

using ConstPointer = itk::SmartPointer< const Self >
 
using FOVRadiusType = enum{RADIUSINF, RADIUSSUP, RADIUSBOTH}
 
using GeometryConstPointer = typename GeometryType::ConstPointer
 
using GeometryType = rtk::ThreeDCircularProjectionGeometry
 
using OutputImageRegionType = typename TOutputImage::RegionType
 
using Pointer = itk::SmartPointer< Self >
 
using ProjectionsStackPointer = typename ProjectionsStackType::Pointer
 
using ProjectionsStackType = typename TInputImage::Superclass
 
using Self = FieldOfViewImageFilter
 
using Superclass = itk::ImageToImageFilter< TInputImage, TOutputImage >
 

Public Member Functions

void AddCollimationConstraints (const FOVRadiusType type, _lprec *lp)
 
virtual bool ComputeFOVRadius (const FOVRadiusType type, double &x, double &z, double &r)
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
virtual const GeometryTypeGetGeometry () const
 
virtual void SetGeometry (const GeometryType *_arg)
 
virtual bool GetMask ()
 
virtual void SetMask (bool _arg)
 
virtual ProjectionsStackPointer GetProjectionsStack ()
 
virtual void SetProjectionsStack (ProjectionsStackType *_arg)
 
virtual bool GetDisplacedDetector ()
 
virtual void SetDisplacedDetector (bool _arg)
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

void BeforeThreadedGenerateData () override
 
 FieldOfViewImageFilter ()
 
 ~FieldOfViewImageFilter () override=default
 
void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
 

Private Attributes

double m_CenterX {0.}
 
double m_CenterZ {0.}
 
bool m_DisplacedDetector {false}
 
GeometryConstPointer m_Geometry {nullptr}
 
double m_HatHeightInf
 
double m_HatHeightSup
 
double m_HatTangentInf
 
double m_HatTangentSup
 
bool m_Mask {false}
 
ProjectionsStackPointer m_ProjectionsStack
 
double m_Radius {-1}
 

Detailed Description

template<class TInputImage, class TOutputImage>
class rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >

Computes the field of view mask for circular 3D geometry.

Masks out the regions that are not included in our field of view or creates the mask if m_Mask is true. Note that the 3 angle parameters are assumed to be 0. in the circular geometry: GantryAngle, OutOfPlaneAngle and InPlaneAngle. The rest is accounted for but the fov is assumed to be cylindrical.

Test:
rtkfovtest.cxx, rtkfdktest.cxx, rtkmotioncompensatedfdktest.cxx
Author
Marc Vila

Definition at line 48 of file rtkFieldOfViewImageFilter.h.

Member Typedef Documentation

template<class TInputImage , class TOutputImage >
using rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::ConstPointer = itk::SmartPointer<const Self>

Definition at line 58 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
using rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::FOVRadiusType = enum {RADIUSINF,RADIUSSUP,RADIUSBOTH}

Definition at line 65 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
using rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::GeometryConstPointer = typename GeometryType::ConstPointer

Definition at line 64 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
using rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::GeometryType = rtk::ThreeDCircularProjectionGeometry

Definition at line 63 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
using rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::OutputImageRegionType = typename TOutputImage::RegionType

Definition at line 60 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
using rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::Pointer = itk::SmartPointer<Self>

Definition at line 57 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
using rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::ProjectionsStackPointer = typename ProjectionsStackType::Pointer

Definition at line 62 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
using rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::ProjectionsStackType = typename TInputImage::Superclass

Definition at line 61 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
using rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::Self = FieldOfViewImageFilter

Standard class type alias.

Definition at line 55 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
using rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::Superclass = itk::ImageToImageFilter<TInputImage,TOutputImage>

Definition at line 56 of file rtkFieldOfViewImageFilter.h.

Constructor & Destructor Documentation

template<class TInputImage , class TOutputImage >
rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::FieldOfViewImageFilter ( )
protected
template<class TInputImage , class TOutputImage >
rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::~FieldOfViewImageFilter ( )
overrideprotecteddefault

Member Function Documentation

template<class TInputImage , class TOutputImage >
void rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::AddCollimationConstraints ( const FOVRadiusType  type,
_lprec *  lp 
)

Add collimation constraints. This function is always called from ComputeFOVRadius but it has an effect only if the geometry has the m_CollimationUInf or m_CollimationUSup which are non infinity (default).

template<class TInputImage , class TOutputImage >
void rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData ( )
overrideprotected
template<class TInputImage , class TOutputImage >
virtual bool rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::ComputeFOVRadius ( const FOVRadiusType  type,
double &  x,
double &  z,
double &  r 
)
virtual

Computes the radius r and the center (x,z) of the disk perpendicular to the y-axis that is covered by:

  • if RADIUSINF: the half plane defined by the line from the source to the two inferior x index corners which cover the opposite two corners.
  • if RADIUSSUP: the half plane defined by the line from the source to the two superior x index corners which cover the opposite two corners.
  • if RADIUSBOTH: the fan defined by the pairs of half planes. Returns true if it managed to find such a disk and false otherwise. The function may be called without out computing the output, but m_Geometry and ProjectionsStack must be set.
template<class TInputImage , class TOutputImage >
virtual::itk::LightObject::Pointer rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::CreateAnother ( ) const
template<class TInputImage , class TOutputImage >
virtual bool rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::GetDisplacedDetector ( )
virtual

Assume that a displaced detector image filter, e.g., rtk::DisplacedDetectorImageFilter, has been used.

template<class TInputImage , class TOutputImage >
virtual const GeometryType* rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::GetGeometry ( ) const
virtual

Get / Set the object pointer to projection geometry

template<class TInputImage , class TOutputImage >
virtual bool rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::GetMask ( )
virtual

Get / Set of the member Mask. If set, all the pixels in the field of view are set to 1. The data value is kept otherwise. Pixels outside the mask are set to 0 in any case.

template<class TInputImage , class TOutputImage >
virtual const char* rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::InPlaceImageFilter< TInputImage, TOutputImage >.

template<class TInputImage , class TOutputImage >
virtual ProjectionsStackPointer rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::GetProjectionsStack ( )
virtual

Get / Set the region of projection images, required to determine the FOV radius. Note that only the geometric information is required, the data are therefore not updated.

template<class TInputImage , class TOutputImage >
static Pointer rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::New ( )
static

Method for creation through the object factory.

template<class TInputImage , class TOutputImage >
virtual void rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::SetDisplacedDetector ( bool  _arg)
virtual

Assume that a displaced detector image filter, e.g., rtk::DisplacedDetectorImageFilter, has been used.

template<class TInputImage , class TOutputImage >
virtual void rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::SetGeometry ( const GeometryType _arg)
virtual

Get / Set the object pointer to projection geometry

template<class TInputImage , class TOutputImage >
virtual void rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::SetMask ( bool  _arg)
virtual

Get / Set of the member Mask. If set, all the pixels in the field of view are set to 1. The data value is kept otherwise. Pixels outside the mask are set to 0 in any case.

template<class TInputImage , class TOutputImage >
virtual void rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::SetProjectionsStack ( ProjectionsStackType _arg)
virtual

Get / Set the region of projection images, required to determine the FOV radius. Note that only the geometric information is required, the data are therefore not updated.

template<class TInputImage , class TOutputImage >
void rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::ThreadedGenerateData ( const OutputImageRegionType outputRegionForThread,
ThreadIdType  threadId 
)
overrideprotected

Generates a FOV mask which is applied to the reconstruction A call to this function will assume modification of the function.

Member Data Documentation

template<class TInputImage , class TOutputImage >
double rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::m_CenterX {0.}
private

Definition at line 136 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
double rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::m_CenterZ {0.}
private

Definition at line 137 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
bool rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::m_DisplacedDetector {false}
private

Definition at line 142 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
GeometryConstPointer rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::m_Geometry {nullptr}
private

Definition at line 132 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
double rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::m_HatHeightInf
private

Definition at line 140 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
double rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::m_HatHeightSup
private

Definition at line 141 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
double rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::m_HatTangentInf
private

Definition at line 138 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
double rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::m_HatTangentSup
private

Definition at line 139 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
bool rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::m_Mask {false}
private

Definition at line 133 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
ProjectionsStackPointer rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::m_ProjectionsStack
private

Definition at line 134 of file rtkFieldOfViewImageFilter.h.

template<class TInputImage , class TOutputImage >
double rtk::FieldOfViewImageFilter< TInputImage, TOutputImage >::m_Radius {-1}
private

Definition at line 135 of file rtkFieldOfViewImageFilter.h.


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