RTK  2.0.1
Reconstruction Toolkit
rtkSubSelectImageFilter.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 #ifndef rtkSubSelectImageFilter_h
19 #define rtkSubSelectImageFilter_h
20 
21 #include <itkPasteImageFilter.h>
22 #include <itkExtractImageFilter.h>
23 #include "rtkConstantImageSource.h"
25 
26 namespace rtk
27 {
28 
63 template< typename ProjectionStackType>
64 class SubSelectImageFilter : public itk::ImageToImageFilter<ProjectionStackType, ProjectionStackType>
65 {
66 public:
67  ITK_DISALLOW_COPY_AND_ASSIGN(SubSelectImageFilter);
68 
73 
76 
77 
78  void SetInputProjectionStack(const ProjectionStackType* Projections);
79  typename ProjectionStackType::ConstPointer GetInputProjectionStack();
81 
86 
87  itkSetObjectMacro(InputGeometry, GeometryType)
88  itkGetModifiableObjectMacro(InputGeometry, GeometryType)
89 
90  itkGetMacro(SelectedProjections, std::vector<bool>)
91 
93 
94 protected:
96  ~SubSelectImageFilter() override = default;
97 
98  void GenerateInputRequestedRegion() override;
99 
100  void GenerateOutputInformation() override;
101 
103  void GenerateData() override;
104 
108  std::vector<bool> m_SelectedProjections;
110 
111 private:
115 };
116 } //namespace ITK
117 
118 
119 #ifndef ITK_MANUAL_INSTANTIATION
120 #include "rtkSubSelectImageFilter.hxx"
121 #endif
122 
123 #endif
ProjectionStackType::ConstPointer GetInputProjectionStack()
GeometryType::Pointer m_InputGeometry
ExtractFilterType::Pointer m_ExtractFilter
Generate an n-dimensional image with constant pixel values.
Subselects projections from a stack of projections.
void GenerateInputRequestedRegion() override
std::vector< bool > m_SelectedProjections
PasteFilterType::Pointer m_PasteFilter
Projection geometry for a source and a 2-D flat panel.
~SubSelectImageFilter() override=default
GeometryType::Pointer m_OutputGeometry
void GenerateData() override
EmptyProjectionStackSourceType::Pointer m_EmptyProjectionStackSource
GeometryType::Pointer GetOutputGeometry()
void SetInputProjectionStack(const ProjectionStackType *Projections)
void GenerateOutputInformation() override