ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkFourDROOSTERConeBeamReconstructionFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright RTK Consortium
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef rtkFourDROOSTERConeBeamReconstructionFilter_h
19#define rtkFourDROOSTERConeBeamReconstructionFilter_h
20
23#ifdef RTK_USE_CUDA
26#else
29#endif
35
36#include <itkAddImageFilter.h>
39
43
44
45namespace rtk
46{
205
206template <typename VolumeSeriesType, typename ProjectionStackType>
208 : public rtk::IterativeConeBeamReconstructionFilter<VolumeSeriesType, ProjectionStackType>
209{
210public:
211 ITK_DISALLOW_COPY_AND_MOVE(FourDROOSTERConeBeamReconstructionFilter);
212
217 using VolumeType = ProjectionStackType;
219 itk::CovariantVector<typename VolumeSeriesType::ValueType, VolumeSeriesType::ImageDimension - 1>;
224
226 typename VolumeSeriesType::template RebindImageType<CovariantVectorForSpatialGradient,
227 VolumeSeriesType::ImageDimension>;
229 typename VolumeSeriesType::template RebindImageType<CovariantVectorForTemporalGradient,
230 VolumeSeriesType::ImageDimension>;
231
233 typename VolumeSeriesType::template RebindImageType<DVFVectorType, VolumeSeriesType::ImageDimension>;
235 typename VolumeSeriesType::template RebindImageType<DVFVectorType, VolumeSeriesType::ImageDimension - 1>;
236
237#ifdef RTK_USE_CUDA
238 using AverageOutOfROIFilterType = std::conditional_t<std::is_same_v<VolumeSeriesType, CPUVolumeSeriesType>,
240 CudaAverageOutOfROIImageFilter>;
242 std::conditional_t<std::is_same_v<VolumeSeriesType, CPUVolumeSeriesType>,
244 CudaLastDimensionTVDenoisingImageFilter>;
245#else
249#endif
250
252 itkNewMacro(Self);
253
255 itkOverrideGetNameOfClassMacro(FourDROOSTERConeBeamReconstructionFilter);
256
258 void
259 SetInputVolumeSeries(const VolumeSeriesType * VolumeSeries);
260 typename VolumeSeriesType::ConstPointer
262
264 void
265 SetInputProjectionStack(const ProjectionStackType * Projection);
266 typename ProjectionStackType::Pointer
268
270 void
272 typename VolumeType::Pointer
274
276 void
278 void
280 typename DVFSequenceImageType::Pointer
282 typename DVFSequenceImageType::Pointer
284
300
303
305 virtual void
307
309 itkSetMacro(DisableDisplacedDetectorFilter, bool);
310 itkGetMacro(DisableDisplacedDetectorFilter, bool);
311
312 // Regularization steps to perform
313 itkSetMacro(PerformPositivity, bool);
314 itkGetMacro(PerformPositivity, bool);
315 itkSetMacro(PerformMotionMask, bool);
316 itkGetMacro(PerformMotionMask, bool);
317 itkSetMacro(PerformTVSpatialDenoising, bool);
318 itkGetMacro(PerformTVSpatialDenoising, bool);
319 itkSetMacro(PerformWaveletsSpatialDenoising, bool);
320 itkGetMacro(PerformWaveletsSpatialDenoising, bool);
321 itkSetMacro(PerformWarping, bool);
322 itkGetMacro(PerformWarping, bool);
323 itkSetMacro(PerformTVTemporalDenoising, bool);
324 itkGetMacro(PerformTVTemporalDenoising, bool);
325 itkSetMacro(PerformL0TemporalDenoising, bool);
326 itkGetMacro(PerformL0TemporalDenoising, bool);
327 itkSetMacro(PerformTNVDenoising, bool);
328 itkGetMacro(PerformTNVDenoising, bool);
329 itkSetMacro(ComputeInverseWarpingByConjugateGradient, bool);
330 itkGetMacro(ComputeInverseWarpingByConjugateGradient, bool);
331 itkSetMacro(UseNearestNeighborInterpolationInWarping, bool);
332 itkGetMacro(UseNearestNeighborInterpolationInWarping, bool);
333 itkGetMacro(CudaConjugateGradient, bool);
334 itkSetMacro(CudaConjugateGradient, bool);
335
337 itkSetMacro(UseCudaCyclicDeformation, bool);
338 itkGetMacro(UseCudaCyclicDeformation, bool);
339
340 // Regularization parameters
341 itkSetMacro(GammaTVSpace, float);
342 itkGetMacro(GammaTVSpace, float);
343 itkSetMacro(GammaTVTime, float);
344 itkGetMacro(GammaTVTime, float);
345 itkSetMacro(GammaTNV, float);
346 itkGetMacro(GammaTNV, float);
347 itkSetMacro(LambdaL0Time, float);
348 itkGetMacro(LambdaL0Time, float);
349 itkSetMacro(SoftThresholdWavelets, float);
350 itkGetMacro(SoftThresholdWavelets, float);
351 itkSetMacro(PhaseShift, float);
352 itkGetMacro(PhaseShift, float);
353
355 itkGetMacro(NumberOfLevels, unsigned int);
356 itkSetMacro(NumberOfLevels, unsigned int);
357
359 itkGetMacro(Order, unsigned int);
360 itkSetMacro(Order, unsigned int);
361
362 // Iterations
363 itkSetMacro(MainLoop_iterations, int);
364 itkGetMacro(MainLoop_iterations, int);
365 itkSetMacro(CG_iterations, int);
366 itkGetMacro(CG_iterations, int);
367 itkSetMacro(TV_iterations, int);
368 itkGetMacro(TV_iterations, int);
369 itkSetMacro(L0_iterations, int);
370 itkGetMacro(L0_iterations, int);
371
372 // Geometry
373 itkSetConstObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
374 itkGetConstObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
375
377 virtual void
378 SetSignal(const std::vector<double> & signal);
379
380protected:
383
385 void
386 VerifyPreconditions() const override;
387
389 void
390 GenerateData() override;
391
392 void
394
395 void
397
398 // Inputs are not supposed to occupy the same physical space,
399 // so there is nothing to verify
400 void
401 VerifyInputInformation() const override
402 {}
403
419
420 // Booleans :
421 // should warping be performed ?
422 // should conjugate gradient be performed on GPU ?
423 // should wavelets replace TV in spatial denoising ?
433 bool m_UseNearestNeighborInterpolationInWarping; // Default is false, linear interpolation is used instead
437
438 // Regularization parameters
445 bool m_DimensionsProcessedForTVSpace[VolumeSeriesType::ImageDimension];
446 bool m_DimensionsProcessedForTVTime[VolumeSeriesType::ImageDimension];
447
449
451 unsigned int m_Order;
452 unsigned int m_NumberOfLevels;
453
454 // Iterations
459
460 // Geometry
462
463 // Signal
464 std::vector<double> m_Signal;
465};
466} // namespace rtk
467
468
469#ifndef ITK_MANUAL_INSTANTIATION
470# include "rtkFourDROOSTERConeBeamReconstructionFilter.hxx"
471#endif
472
473#endif
Pixel-wise addition of two images.
Array2D class representing a 2D array.
Definition itkArray2D.h:43
A templated class holding a n-Dimensional covariant vector.
Templated n-dimensional image class.
Definition itkImage.h:89
Resample an image via a coordinate transform.
Implements transparent reference counting.
Pixel-wise subtraction of two images.
Set image values to a user-specified value if they are below, above, or outside threshold values.
Averages along the last dimension if the pixel is outside ROI.
Applies 3D Daubechies wavelets denoising to a 3D + time sequence of images.
DVFSequenceImageType::Pointer GetInverseDisplacementField()
typename VolumeSeriesType::template RebindImageType< CovariantVectorForTemporalGradient, VolumeSeriesType::ImageDimension > TemporalGradientImageType
rtk::LastDimensionL0GradientDenoisingImageFilter< VolumeSeriesType > TemporalL0DenoisingFilterType
typename VolumeSeriesType::template RebindImageType< CovariantVectorForSpatialGradient, VolumeSeriesType::ImageDimension > SpatialGradientImageType
void SetDisplacementField(const DVFSequenceImageType *DVFs)
typename itk::Image< typename VolumeSeriesType::PixelType, VolumeSeriesType::ImageDimension > CPUVolumeSeriesType
itk::CovariantVector< typename VolumeSeriesType::ValueType, 1 > CovariantVectorForTemporalGradient
rtk::DaubechiesWaveletsDenoiseSequenceImageFilter< VolumeSeriesType > SpatialWaveletsDenoisingFilterType
~FourDROOSTERConeBeamReconstructionFilter() override=default
rtk::WarpSequenceImageFilter< VolumeSeriesType, DVFSequenceImageType, VolumeType, DVFImageType > WarpSequenceFilterType
itk::ImageToImageFilter< VolumeSeriesType, VolumeSeriesType >::Pointer m_DownstreamFilter
rtk::TotalNuclearVariationDenoisingBPDQImageFilter< VolumeSeriesType, SpatialGradientImageType > TNVDenoisingFilterType
void VerifyInputInformation() const override
Verifies that the inputs meta-data is consistent and valid for continued execution of the pipeline,...
ProjectionStackType::Pointer GetInputProjectionStack()
void SetInputProjectionStack(const ProjectionStackType *Projection)
rtk::IterativeConeBeamReconstructionFilter< VolumeSeriesType, ProjectionStackType > Superclass
rtk::TotalVariationDenoiseSequenceImageFilter< VolumeSeriesType > SpatialTVDenoisingFilterType
itk::AddImageFilter< VolumeSeriesType, VolumeSeriesType > AddFilterType
rtk::FourDConjugateGradientConeBeamReconstructionFilter< VolumeSeriesType, ProjectionStackType > FourDCGFilterType
void SetInputVolumeSeries(const VolumeSeriesType *VolumeSeries)
void SetMotionMask(const VolumeType *mask)
itk::CovariantVector< typename VolumeSeriesType::ValueType, VolumeSeriesType::ImageDimension - 1 > CovariantVectorForSpatialGradient
rtk::UnwarpSequenceImageFilter< VolumeSeriesType, DVFSequenceImageType, VolumeType, DVFImageType > UnwarpSequenceFilterType
typename VolumeSeriesType::template RebindImageType< DVFVectorType, VolumeSeriesType::ImageDimension - 1 > DVFImageType
virtual void SetSignal(const std::vector< double > &signal)
virtual void SetWeights(itk::Array2D< float > _arg)
void SetInverseDisplacementField(const DVFSequenceImageType *DVFs)
rtk::TotalVariationDenoisingBPDQImageFilter< VolumeSeriesType, TemporalGradientImageType > TemporalTVDenoisingFilterType
rtk::AverageOutOfROIImageFilter< VolumeSeriesType, VolumeType > AverageOutOfROIFilterType
typename VolumeSeriesType::template RebindImageType< DVFVectorType, VolumeSeriesType::ImageDimension > DVFSequenceImageType
itk::SubtractImageFilter< VolumeSeriesType, VolumeSeriesType > SubtractFilterType
VolumeSeriesType::ConstPointer GetInputVolumeSeries()
itk::ResampleImageFilter< VolumeType, VolumeType > ResampleFilterType
DVFSequenceImageType::Pointer GetDisplacementField()
rtk::ThreeDCircularProjectionGeometry::ConstPointer m_Geometry
Mother class for cone beam reconstruction filters which need runtime selection of their forward and b...
enum { FP_JOSEPH=0, FP_CUDARAYCAST=2, FP_JOSEPHATTENUATED=3, FP_ZENG=4, FP_CUDAWARP=5, FP_CUDAZENG=6 } ForwardProjectionType
enum { BP_VOXELBASED=0, BP_JOSEPH=1, BP_CUDAVOXELBASED=2, BP_CUDARAYCAST=4, BP_JOSEPHATTENUATED=5, BP_ZENG=6, BP_CUDAWARP=7, BP_CUDAZENG=8 } BackProjectionType
Denoises along the last dimension, reducing the L0 norm of the gradient.
Projection geometry for a source and a 2-D flat panel.
Applies 3D total variation denoising to a 3D + time sequence of images.
Applies a total variation denoising, only alm_SingularValueThresholdFilterong the dimensions specifie...
Finds the image sequence that, once warped, equals the input image sequence.
Applies an N-D + time Motion Vector Field to an N-D + time sequence of images.
#define itkSetMacro(name, type)