19 #ifndef rtkJosephBackAttenuatedProjectionImageFilter_h 20 #define rtkJosephBackAttenuatedProjectionImageFilter_h 22 #include "rtkConfiguration.h" 38 template <
class TInput,
class TCoordinateType,
class TOutput = TInput>
54 return !(*
this != other);
58 operator()(
const double stepLengthInVoxel,
const TCoordinateType weight,
const TInput * p,
const int i)
60 const double w = weight * stepLengthInVoxel;
62 m_AttenuationPixel += w * (p + m_AttenuationMinusEmissionMapsPtrDiff)[i];
63 return w * (p + m_AttenuationMinusEmissionMapsPtrDiff)[i];
69 m_AttenuationMinusEmissionMapsPtrDiff = pd;
74 return &m_AttenuationPixel;
89 template <
class TInput,
class TOutput>
107 return !(*
this != other);
118 TInput ex2 = exp(-attenuationRay * stepInMM.GetNorm());
120 if (*m_AttenuationPixel > 0)
122 wf = (m_Ex1 - ex2) / *m_AttenuationPixel;
126 wf = m_Ex1 * stepInMM.GetNorm();
130 *m_AttenuationPixel = 0;
131 return wf * rayValue;
137 m_AttenuationPixel = attenuationPixel;
153 template <
class TInput,
class TCoordinateType,
class TOutput = TCoordinateType>
168 return !(*
this != other);
174 const double stepLengthInVoxel,
175 const double itkNotUsed(voxelSize),
176 const TCoordinateType weight)
const 178 output += rayValue * weight * stepLengthInVoxel;
200 class TInterpolationWeightMultiplication = Functor::InterpolationWeightMultiplicationAttenuatedBackProjection<
201 typename TInputImage::PixelType,
203 class TSplatWeightMultiplication = Functor::
204 SplatWeightMultiplicationAttenuated<typename TInputImage::PixelType, double, typename TOutputImage::PixelType>,
205 class TSumAlongRay = Functor::ComputeAttenuationCorrectionBackProjection<
typename TInputImage::PixelType,
206 typename TOutputImage::PixelType>>
210 TInterpolationWeightMultiplication,
211 TSplatWeightMultiplication,
221 TInterpolationWeightMultiplication,
222 TSplatWeightMultiplication,
235 static constexpr
unsigned int InputImageDimension = TInputImage::ImageDimension;
249 GenerateInputRequestedRegion()
override;
254 VerifyInputInformation()
const override;
257 GenerateData()
override;
264 #ifndef ITK_MANUAL_INSTANTIATION 265 # include "rtkJosephBackAttenuatedProjectionImageFilter.hxx" typename TOutputImage::PixelType OutputPixelType
bool operator!=(const SplatWeightMultiplicationAttenuated &) const
Function to multiply the interpolation weights with the projected volume values and attenuation map...
Attenuated Joseph back projection.
TInput * m_AttenuationPixel
InterpolationWeightMultiplicationAttenuatedBackProjection()
void operator()(const TInput &rayValue, TOutput &output, const double stepLengthInVoxel, const double, const TCoordinateType weight) const
bool operator==(const SplatWeightMultiplicationAttenuated &other) const
TOutput operator()(const double stepLengthInVoxel, const TCoordinateType weight, const TInput *p, const int i)
TOutput * GetAttenuationPixel()
typename TInputImage::PixelType InputPixelType
TOutput operator()(const TInput rayValue, const TInput attenuationRay, const VectorType &stepInMM, bool &isNewRay)
TInput m_AttenuationPixel
typename TPixelType::ValueType ValueType
Projection geometry for a source and a 2-D flat panel.
bool operator==(const ComputeAttenuationCorrectionBackProjection &other) const
typename OutputImageType::RegionType OutputImageRegionType
Function to compute the attenuation correction on the projection.
std::ptrdiff_t m_AttenuationMinusEmissionMapsPtrDiff
void SetAttenuationMinusEmissionMapsPtrDiff(std::ptrdiff_t pd)
bool operator==(const InterpolationWeightMultiplicationAttenuatedBackProjection &other) const
bool operator!=(const ComputeAttenuationCorrectionBackProjection &) const
typename GeometryType::Pointer GeometryPointer
void SetAttenuationPixel(TInput *attenuationPixel)
Function to multiply the interpolation weights with the projection values.
bool operator!=(const InterpolationWeightMultiplicationAttenuatedBackProjection &) const
ComputeAttenuationCorrectionBackProjection()