RTK  1.4.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  * 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 rtkExtractPhaseImageFilter_h
20 #define rtkExtractPhaseImageFilter_h
21 
22 #include <itkInPlaceImageFilter.h>
23 
24 namespace rtk
25 {
46 template<class TImage>
47 class ITK_EXPORT ExtractPhaseImageFilter :
48  public itk::InPlaceImageFilter<TImage>
49 {
50 public:
56 
58  typedef typename TImage::SizeType::SizeValueType KernelSizeType;
59  typedef std::vector<int> PositionsListType;
60  typedef enum {LOCAL_PHASE=0,
62  LINEAR_BETWEEN_MAXIMA} ModelType;
63 
65  itkNewMacro(Self);
66 
69 
72  itkSetMacro(MovingAverageSize, KernelSizeType)
73  itkGetMacro(MovingAverageSize, KernelSizeType)
74 
79  itkSetMacro(UnsharpMaskSize, KernelSizeType)
80  itkGetMacro(UnsharpMaskSize, KernelSizeType)
81 
84  itkGetMacro(MinimaPositions, PositionsListType)
85  itkGetMacro(MaximaPositions, PositionsListType)
86 
94  itkSetMacro(Model, ModelType)
95  itkGetMacro(Model, ModelType)
96 
97 protected:
99  virtual ~ExtractPhaseImageFilter() ITK_OVERRIDE {}
100 
101  void GenerateData() ITK_OVERRIDE;
102 
103 private:
104  ExtractPhaseImageFilter(const Self&); //purposely not implemented
105  void operator=(const Self&); //purposely not implemented
106 
107  void ComputeLinearPhaseBetweenPositions(const PositionsListType & positions);
108 
109  KernelSizeType m_MovingAverageSize;
110  KernelSizeType m_UnsharpMaskSize;
111  PositionsListType m_MinimaPositions;
112  PositionsListType m_MaximaPositions;
113  ModelType m_Model;
114 }; // end of class
115 
116 } // end of namespace rtk
117 
118 #ifndef ITK_MANUAL_INSTANTIATION
119 #include "rtkExtractPhaseImageFilter.hxx"
120 #endif
121 
122 #endif
Extracts the phase of a 1D signal.
itk::InPlaceImageFilter< TImage > Superclass
TImage::SizeType::SizeValueType KernelSizeType
#define itkSetMacro(name, type)
itk::SmartPointer< const Self > ConstPointer