19 #ifndef rtkJosephBackAttenuatedProjectionImageFilter_h 20 #define rtkJosephBackAttenuatedProjectionImageFilter_h 22 #include "rtkConfiguration.h" 38 template <
class TInput,
class TCoordRepType,
class TOutput = TInput>
54 return !(*
this != other);
58 operator()(
const double stepLengthInVoxel,
const TCoordRepType 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 TCoordRepType,
class TOutput = TCoordRepType>
168 return !(*
this != other);
174 const double stepLengthInVoxel,
175 const double itkNotUsed(voxelSize),
176 const TCoordRepType 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;
241 #ifdef itkOverrideGetNameOfClassMacro 254 GenerateInputRequestedRegion()
override;
259 VerifyInputInformation()
const override;
262 GenerateData()
override;
269 #ifndef ITK_MANUAL_INSTANTIATION 270 # include "rtkJosephBackAttenuatedProjectionImageFilter.hxx" typename TOutputImage::PixelType OutputPixelType
TInput m_AttenuationPixel
Function to multiply the interpolation weights with the projected volume values and attenuation map...
Attenuated Joseph back projection.
std::ptrdiff_t m_AttenuationMinusEmissionMapsPtrDiff
TInput * m_AttenuationPixel
bool operator!=(const InterpolationWeightMultiplicationAttenuatedBackProjection &) const
TOutput operator()(const double stepLengthInVoxel, const TCoordRepType weight, const TInput *p, const int i)
typename TInputImage::PixelType InputPixelType
void SetAttenuationMinusEmissionMapsPtrDiff(std::ptrdiff_t pd)
TOutput operator()(const TInput rayValue, const TInput attenuationRay, const VectorType &stepInMM, bool &isNewRay)
typename TPixelType::ValueType ValueType
Projection geometry for a source and a 2-D flat panel.
bool operator==(const SplatWeightMultiplicationAttenuated &other) const
TOutput * GetAttenuationPixel()
bool operator==(const ComputeAttenuationCorrectionBackProjection &other) const
typename OutputImageType::RegionType OutputImageRegionType
Function to compute the attenuation correction on the projection.
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.
InterpolationWeightMultiplicationAttenuatedBackProjection()
ComputeAttenuationCorrectionBackProjection()
bool operator!=(const SplatWeightMultiplicationAttenuated &) const
void operator()(const TInput &rayValue, TOutput &output, const double stepLengthInVoxel, const double, const TCoordRepType weight) const