19 #ifndef rtkJosephForwardProjectionImageFilter_h 20 #define rtkJosephForwardProjectionImageFilter_h 22 #include "rtkConfiguration.h" 42 template <
class TInput,
class TCoordinateType,
class TOutput = TInput>
56 return !(*
this != other);
61 const double itkNotUsed(stepLengthInVoxel),
62 const TCoordinateType weight,
77 template <
class TInput,
class TOutput>
93 return !(*
this != other);
99 const TInput volumeValue,
102 sumValue +=
static_cast<TOutput
>(volumeValue);
113 template <
class TInput,
class TOutput>
129 return !(*
this != other);
134 const TInput & input,
136 const TOutput & rayCastValue,
141 const VectorType & itkNotUsed(farthestPoint))
const 143 output = input + rayCastValue * stepInMM.GetNorm();
165 template <
class TInputImage,
167 class TInterpolationWeightMultiplication = Functor::InterpolationWeightMultiplication<
168 typename TInputImage::PixelType,
170 class TProjectedValueAccumulation =
171 Functor::ProjectedValueAccumulation<typename TInputImage::PixelType, typename TOutputImage::PixelType>,
172 class TSumAlongRay = Functor::SumAlongRay<typename TInputImage::PixelType, typename TOutputImage::PixelType>>
199 TInterpolationWeightMultiplication &
202 return m_InterpolationWeightMultiplication;
204 const TInterpolationWeightMultiplication &
207 return m_InterpolationWeightMultiplication;
212 if (m_InterpolationWeightMultiplication != _arg)
214 m_InterpolationWeightMultiplication = _arg;
222 TProjectedValueAccumulation &
225 return m_ProjectedValueAccumulation;
227 const TProjectedValueAccumulation &
230 return m_ProjectedValueAccumulation;
235 if (m_ProjectedValueAccumulation != _arg)
237 m_ProjectedValueAccumulation = _arg;
247 return m_SumAlongRay;
252 return m_SumAlongRay;
257 if (m_SumAlongRay != _arg)
259 m_SumAlongRay = _arg;
272 this->SetInput(
"InferiorClipImage", const_cast<TClipImageType *>(inferiorClipImage));
274 typename TClipImageType::ConstPointer
288 this->SetInput(
"SuperiorClipImage", const_cast<TClipImageType *>(superiorClipImage));
290 typename TClipImageType::ConstPointer
300 itkGetMacro(InferiorClip,
double);
302 itkGetMacro(SuperiorClip,
double);
312 GenerateInputRequestedRegion()
override;
315 ThreadedGenerateData(
const OutputImageRegionType & outputRegionForThread,
ThreadIdType threadId)
override;
320 VerifyInputInformation()
const override;
322 inline OutputPixelType
324 const double stepLengthInVoxel,
325 const InputPixelType * pxiyi,
326 const InputPixelType * pxsyi,
327 const InputPixelType * pxiys,
328 const InputPixelType * pxsys,
334 inline OutputPixelType
335 BilinearInterpolationOnBorders(
const ThreadIdType threadId,
336 const double stepLengthInVoxel,
337 const InputPixelType * pxiyi,
338 const InputPixelType * pxsyi,
339 const InputPixelType * pxiys,
340 const InputPixelType * pxsys,
355 double m_InferiorClip{ 0. };
356 double m_SuperiorClip{ 1. };
361 #ifndef ITK_MANUAL_INSTANTIATION 362 # include "rtkJosephForwardProjectionImageFilter.hxx"
void SetInterpolationWeightMultiplication(const TInterpolationWeightMultiplication &_arg)
Base class for forward projection, i.e. accumulation along x-ray lines.
TProjectedValueAccumulation & GetProjectedValueAccumulation()
TOutput operator()(const ThreadIdType, const double, const TCoordinateType weight, const TInput *p, const int i) const
typename TInputImage::PixelType InputPixelType
void operator()(const ThreadIdType, TOutput &sumValue, const TInput volumeValue, const VectorType &)
Function to accumulate the ray casting on the projection.
const TProjectedValueAccumulation & GetProjectedValueAccumulation() const
Function to compute the attenuation correction on the projection.
bool operator==(const SumAlongRay &other) const
typename TOutputImage::PixelType OutputPixelType
DataObject * GetInput(const DataObjectIdentifierType &key)
TClipImageType::ConstPointer GetSuperiorClipImage()
const TInterpolationWeightMultiplication & GetInterpolationWeightMultiplication() const
bool operator!=(const SumAlongRay &) const
typename TPixelType::ValueType ValueType
TClipImageType::ConstPointer GetInferiorClipImage()
#define itkSetMacro(name, type)
bool operator!=(const ProjectedValueAccumulation &) const
Function to multiply the interpolation weights with the projected volume values.
typename OutputImageType::RegionType OutputImageRegionType
const TSumAlongRay & GetSumAlongRay() const
bool operator==(const InterpolationWeightMultiplication &other) const
void SetProjectedValueAccumulation(const TProjectedValueAccumulation &_arg)
TInterpolationWeightMultiplication m_InterpolationWeightMultiplication
void SetSumAlongRay(const TSumAlongRay &_arg)
bool operator!=(const InterpolationWeightMultiplication &) const
typename TClipImageType::Pointer TClipImagePointer
void SetSuperiorClipImage(const TClipImageType *superiorClipImage)
TSumAlongRay & GetSumAlongRay()
bool operator==(const ProjectedValueAccumulation &other) const
TProjectedValueAccumulation m_ProjectedValueAccumulation
TInterpolationWeightMultiplication & GetInterpolationWeightMultiplication()
TSumAlongRay m_SumAlongRay
Joseph forward projection.
unsigned int ThreadIdType
void operator()(const ThreadIdType, const TInput &input, TOutput &output, const TOutput &rayCastValue, const VectorType &stepInMM, const VectorType &, const VectorType &, const VectorType &, const VectorType &) const
void SetInferiorClipImage(const TClipImageType *inferiorClipImage)