19 #ifndef rtkMechlemOneStepSpectralReconstructionFilter_h 20 #define rtkMechlemOneStepSpectralReconstructionFilter_h 152 template <
typename TOutputImage,
typename TPhotonCounts,
typename TSpectrum>
168 #ifdef itkOverrideGetNameOfClassMacro 176 static constexpr
unsigned int nBins = TPhotonCounts::PixelType::Dimension;
177 static constexpr
unsigned int nMaterials = TOutputImage::PixelType::Dimension;
178 using dataType =
typename TOutputImage::PixelType::ValueType;
184 typename std::conditional<std::is_same<TOutputImage, CPUOutputImageType>::value,
186 itk::CudaImage<itk::Vector<dataType, nMaterials * nMaterials>,
189 typename std::conditional<std::is_same<TOutputImage, CPUOutputImageType>::value,
198 #if !defined(ITK_WRAPPING_PARSER) 200 typedef typename std::conditional<std::is_same<TOutputImage, CPUOutputImageType>::value,
202 CudaWeidingerForwardModelImageFilter<TOutputImage, TPhotonCounts, TSpectrum>>::type
205 typename std::conditional<std::is_same<TOutputImage, CPUOutputImageType>::value,
207 CudaForwardProjectionImageFilter<SingleComponentImageType, SingleComponentImageType>>::
209 typedef typename std::conditional<std::is_same<TOutputImage, CPUOutputImageType>::value,
211 CudaBackProjectionImageFilter<HessiansImageType>>::type
225 #if !defined(ITK_WRAPPING_PARSER) 252 itkGetMacro(NumberOfIterations,
int);
256 itkGetMacro(NumberOfSubsets,
int);
263 itkGetMacro(ResetNesterovEvery,
int);
268 SetInputMaterialVolumes(
const TOutputImage * materialVolumes);
270 SetInputPhotonCounts(
const TPhotonCounts * photonCounts);
272 SetInputSpectrum(
const TSpectrum * spectrum);
282 itkSetMacro(RegularizationWeights,
typename TOutputImage::PixelType);
283 itkGetMacro(RegularizationWeights,
typename TOutputImage::PixelType);
287 itkSetMacro(RegularizationRadius,
typename TOutputImage::RegionType::SizeType);
288 itkGetMacro(RegularizationRadius,
typename TOutputImage::RegionType::SizeType);
307 VerifyPreconditions()
const override;
311 GenerateData()
override;
313 #if !defined(ITK_WRAPPING_PARSER) 349 GenerateInputRequestedRegion()
override;
351 GenerateOutputInformation()
override;
355 typename TOutputImage::ConstPointer
356 GetInputMaterialVolumes();
357 typename TPhotonCounts::ConstPointer
358 GetInputPhotonCounts();
359 typename TSpectrum::ConstPointer
361 typename SingleComponentImageType::ConstPointer
363 typename SingleComponentImageType::ConstPointer
364 GetSpatialRegularizationWeights();
365 typename SingleComponentImageType::ConstPointer
366 GetProjectionWeights();
369 #if !defined(ITK_WRAPPING_PARSER) 372 typename SingleComponentForwardProjectionFilterType::Pointer
373 InstantiateSingleComponentForwardProjectionFilter(
int fwtype);
374 typename HessiansBackProjectionFilterType::Pointer
375 InstantiateHessiansBackProjectionFilter(
int bptype);
394 #ifndef ITK_MANUAL_INSTANTIATION 395 # include "rtkMechlemOneStepSpectralReconstructionFilter.hxx" typename itk::Image< dataType, TOutputImage::ImageDimension > SingleComponentImageType
typename Superclass::ForwardProjectionType ForwardProjectionType
WeidingerForwardModelType::Pointer m_WeidingerForward
ExtractPhotonCountsFilterType::Pointer m_ExtractPhotonCountsFilter
Base class for forward projection, i.e. accumulation along x-ray lines.
TOutputImage::PixelType m_RegularizationWeights
HessiansBackProjectionFilterType::Pointer m_HessiansBackProjectionFilter
NesterovFilterType::Pointer m_NesterovFilter
Applies Nesterov's momentum technique.
Generate an n-dimensional image with constant pixel values.
AddMatrixAndDiagonalFilterType::Pointer m_AddHessians
ForwardProjectionFilterType::Pointer m_ForwardProjectionFilter
int m_NumberOfProjectionsPerSubset
HessiansSourceType::Pointer m_HessiansSource
vnl_matrix< dataType > BinnedDetectorResponseType
ReorderProjectionsFilterProjectionsWeightsType::Pointer m_ReorderProjectionsWeightsFilter
vnl_matrix< dataType > MaterialAttenuationsType
typename itk::Image< itk::Vector< dataType, nMaterials *nMaterials >, TOutputImage::ImageDimension > HessiansImageType
ReorderProjectionsFilterPhotonCountsType::Pointer m_ReorderPhotonCountsFilter
ThreeDCircularProjectionGeometry::ConstPointer m_Geometry
Projection geometry for a source and a 2-D flat panel.
MaterialProjectionsSourceType::Pointer m_ProjectionsSource
#define itkSetMacro(name, type)
MultiplyGradientFilterType::Pointer m_MultiplyRegulGradientsFilter
Computes update from gradient and Hessian in Newton's method.
SQSRegularizationType::Pointer m_SQSRegul
NewtonFilterType::Pointer m_NewtonFilter
SingleComponentImageSourceType::Pointer m_SingleComponentVolumeSource
SingleComponentImageSourceType::Pointer m_SingleComponentProjectionsSource
MultiplyGradientFilterType::Pointer m_MultiplyGradientToBeBackprojectedFilter
Performs intermediate computations in Weidinger2016.
GradientsSourceType::Pointer m_GradientsSource
typename itk::Image< typename TOutputImage::PixelType, TOutputImage::ImageDimension > CPUOutputImageType
MultiplyFilterType::Pointer m_MultiplySupportFilter
int m_NumberOfProjections
For each vector-valued pixel, adds a vector to the diagonal of a matrix.
For one-step inversion of spectral CT data by the method Mechlem2017, computes regularization term's ...
Mother class for cone beam reconstruction filters which need runtime selection of their forward and b...
Joseph forward projection.
Implements the one-step spectral CT inversion method described by Mechlem et al.
itk::AddImageFilter< GradientsImageType > AddFilterType
typename Superclass::BackProjectionType BackProjectionType
std::vector< int > m_NumberOfProjectionsInSubset
void VerifyInputInformation() const override
GradientsBackProjectionFilterType::Pointer m_GradientsBackProjectionFilter
MultiplyGradientFilterType::Pointer m_MultiplyRegulHessiansFilter
TOutputImage GradientsImageType
Sorts or shuffle projections and geometry inputs.
SingleComponentForwardProjectionFilterType::Pointer m_SingleComponentForwardProjectionFilter
typename TOutputImage::PixelType::ValueType dataType
AddFilterType::Pointer m_AddGradients
TOutputImage::RegionType::SizeType m_RegularizationRadius