19 #ifndef rtkJosephForwardProjectionImageFilter_h 20 #define rtkJosephForwardProjectionImageFilter_h 22 #include "rtkConfiguration.h" 42 template <
class TInput,
class TCoordRepType,
class TOutput = TInput>
56 return !(*
this != other);
61 const double itkNotUsed(stepLengthInVoxel),
62 const TCoordRepType 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>>
196 #ifdef itkOverrideGetNameOfClassMacro 204 TInterpolationWeightMultiplication &
207 return m_InterpolationWeightMultiplication;
209 const TInterpolationWeightMultiplication &
212 return m_InterpolationWeightMultiplication;
217 if (m_InterpolationWeightMultiplication != _arg)
219 m_InterpolationWeightMultiplication = _arg;
227 TProjectedValueAccumulation &
230 return m_ProjectedValueAccumulation;
232 const TProjectedValueAccumulation &
235 return m_ProjectedValueAccumulation;
240 if (m_ProjectedValueAccumulation != _arg)
242 m_ProjectedValueAccumulation = _arg;
252 return m_SumAlongRay;
257 return m_SumAlongRay;
262 if (m_SumAlongRay != _arg)
264 m_SumAlongRay = _arg;
277 this->SetInput(
"InferiorClipImage", const_cast<TClipImageType *>(inferiorClipImage));
279 typename TClipImageType::ConstPointer
293 this->SetInput(
"SuperiorClipImage", const_cast<TClipImageType *>(superiorClipImage));
295 typename TClipImageType::ConstPointer
305 itkGetMacro(InferiorClip,
double);
307 itkGetMacro(SuperiorClip,
double);
317 GenerateInputRequestedRegion()
override;
320 ThreadedGenerateData(
const OutputImageRegionType & outputRegionForThread,
ThreadIdType threadId)
override;
325 VerifyInputInformation()
const override;
327 inline OutputPixelType
329 const double stepLengthInVoxel,
330 const InputPixelType * pxiyi,
331 const InputPixelType * pxsyi,
332 const InputPixelType * pxiys,
333 const InputPixelType * pxsys,
339 inline OutputPixelType
340 BilinearInterpolationOnBorders(
const ThreadIdType threadId,
341 const double stepLengthInVoxel,
342 const InputPixelType * pxiyi,
343 const InputPixelType * pxsyi,
344 const InputPixelType * pxiys,
345 const InputPixelType * pxsys,
360 double m_InferiorClip{ 0. };
361 double m_SuperiorClip{ 1. };
366 #ifndef ITK_MANUAL_INSTANTIATION 367 # include "rtkJosephForwardProjectionImageFilter.hxx" void SetInterpolationWeightMultiplication(const TInterpolationWeightMultiplication &_arg)
Base class for forward projection, i.e. accumulation along x-ray lines.
TProjectedValueAccumulation & GetProjectedValueAccumulation()
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
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
TOutput operator()(const ThreadIdType, const double, const TCoordRepType weight, const TInput *p, const int i) const
bool operator==(const InterpolationWeightMultiplication &other) const
Function to multiply the interpolation weights with the projected volume values.
typename OutputImageType::RegionType OutputImageRegionType
const TSumAlongRay & GetSumAlongRay() const
void SetProjectedValueAccumulation(const TProjectedValueAccumulation &_arg)
TInterpolationWeightMultiplication m_InterpolationWeightMultiplication
void SetSumAlongRay(const TSumAlongRay &_arg)
typename TClipImageType::Pointer TClipImagePointer
void SetSuperiorClipImage(const TClipImageType *superiorClipImage)
TSumAlongRay & GetSumAlongRay()
bool operator==(const ProjectedValueAccumulation &other) const
DataObject * GetInput(const DataObjectIdentifierType &key)
TProjectedValueAccumulation m_ProjectedValueAccumulation
bool operator!=(const InterpolationWeightMultiplication &) const
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)