RTK  2.5.0
Reconstruction Toolkit
rtkExtractPhaseImageFilter.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 rtkExtractPhaseImageFilter_h
20 #define rtkExtractPhaseImageFilter_h
21 
22 #include <itkInPlaceImageFilter.h>
23 
24 namespace rtk
25 {
46 template <class TImage>
47 class ITK_TEMPLATE_EXPORT ExtractPhaseImageFilter : public itk::InPlaceImageFilter<TImage>
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_MOVE(ExtractPhaseImageFilter);
51 
57 
59  using KernelSizeType = typename TImage::SizeType::SizeValueType;
60  using PositionsListType = std::vector<int>;
61  typedef enum
62  {
63  LOCAL_PHASE = 0,
65  LINEAR_BETWEEN_MAXIMA
66  } ModelType;
67 
69  itkNewMacro(Self);
70 
72 #ifdef itkOverrideGetNameOfClassMacro
73  itkOverrideGetNameOfClassMacro(ExtractPhaseImageFilter);
74 #else
76 #endif
77 
78 
81  itkSetMacro(MovingAverageSize, KernelSizeType);
82  itkGetMacro(MovingAverageSize, KernelSizeType);
84 
89  itkSetMacro(UnsharpMaskSize, KernelSizeType);
90  itkGetMacro(UnsharpMaskSize, KernelSizeType);
92 
95  itkGetMacro(MinimaPositions, PositionsListType);
96  itkGetMacro(MaximaPositions, PositionsListType);
98 
106  itkSetMacro(Model, ModelType);
107  itkGetMacro(Model, ModelType);
109 
110 protected:
112  ~ExtractPhaseImageFilter() override = default;
113 
114  void
115  GenerateData() override;
116 
117 private:
118  void
119  ComputeLinearPhaseBetweenPositions(const PositionsListType & positions);
120 
126 }; // end of class
127 
128 } // end of namespace rtk
129 
130 #ifndef ITK_MANUAL_INSTANTIATION
131 # include "rtkExtractPhaseImageFilter.hxx"
132 #endif
133 
134 #endif
typename TImage::SizeType::SizeValueType KernelSizeType
Extracts the phase of a 1D signal.
#define itkSetMacro(name, type)