forked from RTKConsortium/PCT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpctDDParkerShortScanImageFilter.h
More file actions
80 lines (62 loc) · 2.59 KB
/
Copy pathpctDDParkerShortScanImageFilter.h
File metadata and controls
80 lines (62 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#ifndef __pctDDParkerShortScanImageFilter_h
#define __pctDDParkerShortScanImageFilter_h
#include <itkInPlaceImageFilter.h>
#include <rtkThreeDCircularProjectionGeometry.h>
#include "rtkConfiguration.h"
/** \class DDParkerShortScanImageFilter
*
* Weighting of image projections to handle off-centered panels
* in tomography reconstruction. Based on [Wang, Med Phys, 2002].
*
* Note that the filter does nothing if the panel shift is less than 10%
* of its size. Otherwise, it does the weighting described in the publication
* and zero pads the data on the nearest side to the center.
*
* \author Simon Rit
*/
namespace pct
{
template<class TInputImage, class TOutputImage=TInputImage>
class ITK_EXPORT DDParkerShortScanImageFilter :
public itk::InPlaceImageFilter<TInputImage, TOutputImage>
{
public:
/** Standard class typedefs. */
typedef DDParkerShortScanImageFilter Self;
typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Some convenient typedefs. */
typedef TInputImage InputImageType;
typedef TOutputImage OutputImageType;
typedef typename OutputImageType::RegionType OutputImageRegionType;
typedef itk::Image<typename TOutputImage::PixelType, 1> WeightImageType;
typedef rtk::ThreeDCircularProjectionGeometry GeometryType;
typedef GeometryType::Pointer GeometryPointer;
/** Standard New method. */
itkNewMacro(Self);
/** Runtime information support. */
itkTypeMacro(DDParkerShortScanImageFilter, itk::ImageToImageFilter);
/** Get / Set the object pointer to projection geometry */
itkGetMacro(Geometry, GeometryPointer);
itkSetMacro(Geometry, GeometryPointer);
protected:
DDParkerShortScanImageFilter(){ this->SetInPlace(true); }
~DDParkerShortScanImageFilter(){}
virtual void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) ITK_OVERRIDE;
private:
DDParkerShortScanImageFilter(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
/** RTK geometry object */
GeometryPointer m_Geometry;
/** Superior and inferior position of the detector along the weighting direction, i.e. x.
* The computed value account for the x projection offset of the geometry.
*/
double m_InferiorCorner;
double m_SuperiorCorner;
}; // end of class
} // end namespace pct
#ifndef ITK_MANUAL_INSTANTIATION
#include "pctDDParkerShortScanImageFilter.txx"
#endif
#endif