GaussianPyramidFilter.h
1 /*
2  * Medical Image Registration ToolKit (MIRTK)
3  *
4  * Copyright 2013-2015 Imperial College London
5  * Copyright 2013-2015 Andreas Schuh
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 #ifndef MIRTK_GaussianPyramidFilter_H
21 #define MIRTK_GaussianPyramidFilter_H
22 
23 #include "mirtk/ImageToImage.h"
24 #include "mirtk/ImageFunction.h"
25 
26 
27 namespace mirtk {
28 
29 
30 /**
31  * Filter for down-/upsampling of a Gaussian pyramid image from one level to another
32  */
33 template <class TVoxel>
34 class GaussianPyramidFilter : public ImageToImage<TVoxel>
35 {
36  mirtkImageFilterMacro(GaussianPyramidFilter, TVoxel);
37 
38  /// Level of the input image
39  mirtkPublicAttributeMacro(int, InputLevel);
40 
41  /// Level of the output image
42  mirtkPublicAttributeMacro(int, OutputLevel);
43 
44 protected:
45 
46  /// Initialize the filter
47  virtual void Initialize();
48 
49  /// Downsample image by one level
50  virtual void Downsample();
51 
52  /// Upsample image by one level
53  virtual void Upsample();
54 
55 public:
56 
57  /// Constructor
58  GaussianPyramidFilter(int = 1);
59 
60  /// Constructor
61  GaussianPyramidFilter(int, int);
62 
63  /// Run the downsampling filter
64  virtual void Run();
65 
66 };
67 
68 
69 } // namespace mirtk
70 
71 #endif // MIRTK_GaussianPyramidFilter_H
GaussianPyramidFilter(int=1)
Constructor.
virtual void Upsample()
Upsample image by one level.
virtual void Run()
Run the downsampling filter.
Definition: IOConfig.h:41
virtual void Initialize()
Initialize the filter.
virtual void Downsample()
Downsample image by one level.