RTK  1.4.0
Reconstruction Toolkit
rtkReorderProjectionsImageFilter.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  * http://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 
19 #ifndef rtkReorderProjectionsImageFilter_h
20 #define rtkReorderProjectionsImageFilter_h
21 
22 #include <itkInPlaceImageFilter.h>
24 #include "rtkConfiguration.h"
25 
26 namespace rtk
27 {
28 
44 template<class TInputImage, class TOutputImage=TInputImage>
46  public itk::ImageToImageFilter<TInputImage, TOutputImage>
47 {
48 public:
51 
55 
57  typedef TInputImage InputImageType;
58  typedef TOutputImage OutputImageType;
59  typedef typename OutputImageType::RegionType OutputImageRegionType;
60  typedef enum {NONE=0, SORT=1, SHUFFLE=2} PermutationType;
61 
64 
66  itkNewMacro(Self);
67 
70 
72  itkGetModifiableObjectMacro(OutputGeometry, GeometryType);
73  itkSetObjectMacro(InputGeometry, GeometryType);
75 
77  itkGetMacro(Permutation, PermutationType);
78  itkSetMacro(Permutation, PermutationType);
80 
82  void SetInputSignal(const std::vector<double> signal);
83  std::vector<double> GetOutputSignal();
85 
86 protected:
88 
89  virtual ~ReorderProjectionsImageFilter() ITK_OVERRIDE {}
90 
91  void GenerateData() ITK_OVERRIDE;
92 
93 private:
94  ReorderProjectionsImageFilter(const Self&); //purposely not implemented
95  void operator=(const Self&); //purposely not implemented
96 
98  GeometryPointer m_InputGeometry;
99  GeometryPointer m_OutputGeometry;
100 
102  std::vector<double> m_InputSignal;
103  std::vector<double> m_OutputSignal;
104 
107 
108 }; // end of class
109 
110 } // end namespace rtk
111 
112 #ifndef ITK_MANUAL_INSTANTIATION
113 #include "rtkReorderProjectionsImageFilter.hxx"
114 #endif
115 
116 #endif
ThreeDCircularProjectionGeometry GeometryType
Projection geometry for a source and a 2-D flat panel.
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
Sorts or shuffle projections and geometry inputs.
#define itkSetMacro(name, type)