ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkReconstructImageFilter.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
19#ifndef rtkReconstructImageFilter_h
20#define rtkReconstructImageFilter_h
21
22// Includes
24#include <itkMacro.h>
26
29
30namespace rtk
31{
32
122template <class TImage>
123class ITK_TEMPLATE_EXPORT ReconstructImageFilter : public itk::ImageToImageFilter<TImage, TImage>
124{
125public:
126 ITK_DISALLOW_COPY_AND_MOVE(ReconstructImageFilter);
127
133
135 itkNewMacro(Self);
136
138 itkOverrideGetNameOfClassMacro(ReconstructImageFilter);
139
141 static constexpr unsigned int ImageDimension = TImage::ImageDimension;
142
149 using PixelType = typename TImage::PixelType;
150 using InternalPixelType = typename TImage::InternalPixelType;
151
156
158 virtual void
159 SetNumberOfLevels(unsigned int levels)
160 {
161 this->m_NumberOfLevels = levels;
163 }
164
166 virtual unsigned int
168 {
169 return this->m_NumberOfLevels;
170 }
171
176 void
178
179
182 void
184
188 void
189 VerifyInputInformation() const override
190 {}
191
192 void
193 SetSizes(typename InputImageType::SizeType * sizesVector)
194 {
195 m_Sizes = sizesVector;
196 }
197
198 void
199 SetIndices(typename InputImageType::IndexType * indicesVector)
200 {
201 m_Indices = indicesVector;
202 }
203
205 itkGetMacro(Order, unsigned int);
206 itkSetMacro(Order, unsigned int);
207
208protected:
210 ~ReconstructImageFilter() override = default;
211
212 void
213 PrintSelf(std::ostream & os, itk::Indent indent) const override;
214
218 void
220
222 void
223 GenerateData() override;
224
226 virtual unsigned int
228
230 void
232
233private:
234 unsigned int m_NumberOfLevels{ 5 }; // Holds the number of Reconstruction levels
235 unsigned int m_Order{ 3 }; // Holds the order of the wavelet filters
237 false
238 }; // Filters instantiated by GenerateOutputInformation() should be instantiated only once
239
240 typename InputImageType::SizeType * m_Sizes; // Holds the size of sub-images at each level
241 typename InputImageType::IndexType * m_Indices; // Holds the size of sub-images at each level
242 typename std::vector<typename AddFilterType::Pointer> m_AddFilters; // Holds a vector of add filters
243 typename std::vector<typename ConvolutionFilterType::Pointer>
244 m_ConvolutionFilters; // Holds a vector of convolution filters
245 typename std::vector<typename UpsampleImageFilterType::Pointer>
246 m_UpsampleFilters; // Holds a vector of Upsample filters
247 // Holds a vector of PassVectors. A PassVector has Dimension components, each one storing either "High" or "Low"
248 typename std::vector<typename ConvolutionFilterType::PassVector> m_PassVectors;
249};
250
251} // namespace rtk
252
253// Include CXX
254#ifndef rtk_MANUAL_INSTANTIATION
255# include "rtkReconstructImageFilter.hxx"
256#endif
257
258#endif
TOutputImage OutputImageType
typename OutputImageType::Pointer OutputImagePointer
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition itkIndent.h:53
Pixel-wise addition of N images.
Implements transparent reference counting.
Creates a Daubechies wavelets kernel image with the requested attributes (order, type,...
virtual void SetNumberOfLevels(unsigned int levels)
itk::ImageToImageFilter< InputImageType, InputImageType > Superclass
typename Superclass::InputImagePointer InputImagePointer
typename Superclass::OutputImagePointer OutputImagePointer
std::vector< typename ConvolutionFilterType::Pointer > m_ConvolutionFilters
void GenerateOutputInformation() override
rtk::UpsampleImageFilter< InputImageType > UpsampleImageFilterType
std::vector< typename UpsampleImageFilterType::Pointer > m_UpsampleFilters
void GenerateData() override
typename InputImageType::InternalPixelType InternalPixelType
typename Superclass::InputImageConstPointer InputImageConstPointer
void SetSizes(typename InputImageType::SizeType *sizesVector)
std::vector< typename ConvolutionFilterType::PassVector > m_PassVectors
void SetIndices(typename InputImageType::IndexType *indicesVector)
itk::NaryAddImageFilter< InputImageType, InputImageType > AddFilterType
virtual unsigned int CalculateNumberOfInputs()
~ReconstructImageFilter() override=default
void PrintSelf(std::ostream &os, itk::Indent indent) const override
rtk::DaubechiesWaveletsConvolutionImageFilter< InputImageType > ConvolutionFilterType
void VerifyInputInformation() const override
void GenerateInputRequestedRegion() override
std::vector< typename AddFilterType::Pointer > m_AddFilters
typename Superclass::OutputImageType OutputImageType
Upsamples an image by the given factor for each dimension.
#define itkSetMacro(name, type)