19 #ifndef rtkMechlemOneStepSpectralReconstructionFilter_h 20 #define rtkMechlemOneStepSpectralReconstructionFilter_h 154 template <
typename TOutputImage,
typename TMeasuredProjections,
typename TInc
identSpectrum>
173 static constexpr
unsigned int nBins = TMeasuredProjections::PixelType::Dimension;
174 static constexpr
unsigned int nMaterials = TOutputImage::PixelType::Dimension;
175 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<
201 std::is_same<TOutputImage, CPUOutputImageType>::value,
203 CudaWeidingerForwardModelImageFilter<TOutputImage, TMeasuredProjections, TIncidentSpectrum>>::type
206 typename std::conditional<std::is_same<TOutputImage, CPUOutputImageType>::value,
208 CudaForwardProjectionImageFilter<SingleComponentImageType, SingleComponentImageType>>::
210 typedef typename std::conditional<std::is_same<TOutputImage, CPUOutputImageType>::value,
212 CudaBackProjectionImageFilter<HessiansImageType>>::type
227 #if !defined(ITK_WRAPPING_PARSER) 256 itkGetMacro(NumberOfIterations,
int);
260 itkGetMacro(NumberOfSubsets,
int);
267 itkGetMacro(ResetNesterovEvery,
int);
272 SetInputMaterialVolumes(
const TOutputImage * materialVolumes);
276 SetInputMeasuredProjections(
const TMeasuredProjections * measuredProjections);
278 SetInputMeasuredProjections(
const VectorImageType * measuredProjections);
280 SetInputIncidentSpectrum(
const TIncidentSpectrum * incidentSpectrum);
281 #ifndef ITK_FUTURE_LEGACY_REMOVE 283 SetInputPhotonCounts(
const TMeasuredProjections * measuredProjections);
285 SetInputSpectrum(
const TIncidentSpectrum * incidentSpectrum);
296 itkSetMacro(RegularizationWeights,
typename TOutputImage::PixelType);
297 itkGetMacro(RegularizationWeights,
typename TOutputImage::PixelType);
301 itkSetMacro(RegularizationRadius,
typename TOutputImage::RegionType::SizeType);
302 itkGetMacro(RegularizationRadius,
typename TOutputImage::RegionType::SizeType);
321 VerifyPreconditions()
const override;
325 GenerateData()
override;
327 #if !defined(ITK_WRAPPING_PARSER) 365 GenerateInputRequestedRegion()
override;
367 GenerateOutputInformation()
override;
371 typename TOutputImage::ConstPointer
372 GetInputMaterialVolumes();
373 typename TMeasuredProjections::ConstPointer
374 GetInputMeasuredProjections();
375 typename TIncidentSpectrum::ConstPointer
376 GetInputIncidentSpectrum();
377 #ifndef ITK_FUTURE_LEGACY_REMOVE 378 typename TMeasuredProjections::ConstPointer
379 GetInputPhotonCounts();
380 typename TIncidentSpectrum::ConstPointer
383 typename SingleComponentImageType::ConstPointer
385 typename SingleComponentImageType::ConstPointer
386 GetSpatialRegularizationWeights();
387 typename SingleComponentImageType::ConstPointer
388 GetProjectionWeights();
391 #if !defined(ITK_WRAPPING_PARSER) 394 typename SingleComponentForwardProjectionFilterType::Pointer
395 InstantiateSingleComponentForwardProjectionFilter(
int fwtype);
396 typename HessiansBackProjectionFilterType::Pointer
397 InstantiateHessiansBackProjectionFilter(
int bptype);
416 #ifndef ITK_MANUAL_INSTANTIATION 417 # include "rtkMechlemOneStepSpectralReconstructionFilter.hxx"
SingleComponentImageSourceType::Pointer m_SingleComponentVolumeSource
NesterovFilterType::Pointer m_NesterovFilter
MultiplyGradientFilterType::Pointer m_MultiplyRegulGradientsFilter
ReorderProjectionsWeightsFilterType::Pointer m_ReorderProjectionsWeightsFilter
Base class for forward projection, i.e. accumulation along x-ray lines.
TOutputImage GradientsImageType
CastMeasuredProjectionsFilterType::Pointer m_CastMeasuredProjectionsFilter
Applies Nesterov's momentum technique.
ThreeDCircularProjectionGeometry::ConstPointer m_Geometry
Generate an n-dimensional image with constant pixel values.
AddFilterType::Pointer m_AddGradients
vnl_matrix< dataType > BinnedDetectorResponseType
typename TOutputImage::PixelType::ValueType dataType
vnl_matrix< dataType > MaterialAttenuationsType
void VerifyInputInformation() const override
HessiansBackProjectionFilterType::Pointer m_HessiansBackProjectionFilter
typename itk::VectorImage< dataType, TOutputImage::ImageDimension > VectorImageType
int m_NumberOfProjectionsPerSubset
AddMatrixAndDiagonalFilterType::Pointer m_AddHessians
WeidingerForwardModelType::Pointer m_WeidingerForward
ForwardProjectionFilterType::Pointer m_ForwardProjectionFilter
MaterialProjectionsSourceType::Pointer m_ProjectionsSource
Projection geometry for a source and a 2-D flat panel.
#define itkSetMacro(name, type)
SQSRegularizationType::Pointer m_SQSRegul
Computes update from gradient and Hessian in Newton's method.
itk::AddImageFilter< GradientsImageType > AddFilterType
int m_NumberOfProjections
SingleComponentImageSourceType::Pointer m_SingleComponentProjectionsSource
MultiplyFilterType::Pointer m_MultiplySupportFilter
MultiplyGradientFilterType::Pointer m_MultiplyRegulHessiansFilter
ExtractMeasuredProjectionsFilterType::Pointer m_ExtractMeasuredProjectionsFilter
std::vector< int > m_NumberOfProjectionsInSubset
Performs intermediate computations in Weidinger2016.
ReorderMeasuredProjectionsFilterType::Pointer m_ReorderMeasuredProjectionsFilter
TOutputImage::RegionType::SizeType m_RegularizationRadius
MultiplyGradientFilterType::Pointer m_MultiplyGradientToBeBackprojectedFilter
NewtonFilterType::Pointer m_NewtonFilter
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...
typename Superclass::BackProjectionType BackProjectionType
typename itk::Image< dataType, TOutputImage::ImageDimension > SingleComponentImageType
Joseph forward projection.
Implements the one-step spectral CT inversion method described by Mechlem et al.
GradientsSourceType::Pointer m_GradientsSource
typename itk::Image< typename TOutputImage::PixelType, TOutputImage::ImageDimension > CPUOutputImageType
typename Superclass::ForwardProjectionType ForwardProjectionType
SingleComponentForwardProjectionFilterType::Pointer m_SingleComponentForwardProjectionFilter
CastMaterialVolumesFilterType::Pointer m_CastMaterialVolumesFilter
HessiansSourceType::Pointer m_HessiansSource
GradientsBackProjectionFilterType::Pointer m_GradientsBackProjectionFilter
typename itk::Image< itk::Vector< dataType, nMaterials *nMaterials >, TOutputImage::ImageDimension > HessiansImageType
Sorts or shuffle projections and geometry inputs.
TOutputImage::PixelType m_RegularizationWeights