RTK  2.0.1
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:
49  ITK_DISALLOW_COPY_AND_ASSIGN(ReorderProjectionsImageFilter);
50 
53 
57 
59  using InputImageType = TInputImage;
60  using OutputImageType = TOutputImage;
61  using OutputImageRegionType = typename OutputImageType::RegionType;
62  using PermutationType = enum {NONE=0, SORT=1, SHUFFLE=2};
63 
66 
68  itkNewMacro(Self);
69 
72 
74  itkGetModifiableObjectMacro(OutputGeometry, GeometryType);
75  itkSetObjectMacro(InputGeometry, GeometryType);
77 
79  itkGetMacro(Permutation, PermutationType);
80  itkSetMacro(Permutation, PermutationType);
82 
84  void SetInputSignal(const std::vector<double> signal);
85  std::vector<double> GetOutputSignal();
87 
88 protected:
90 
91  ~ReorderProjectionsImageFilter() override = default;
92 
93  void GenerateData() override;
94 
95 private:
99 
101  std::vector<double> m_InputSignal;
102  std::vector<double> m_OutputSignal;
103 
106 
107 }; // end of class
108 
109 } // end namespace rtk
110 
111 #ifndef ITK_MANUAL_INSTANTIATION
112 #include "rtkReorderProjectionsImageFilter.hxx"
113 #endif
114 
115 #endif
TInputImage InputImageType
Projection geometry for a source and a 2-D flat panel.
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
enum{NONE=0, SORT=1, SHUFFLE=2} PermutationType
Sorts or shuffle projections and geometry inputs.
#define itkSetMacro(name, type)