00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CFL_SCANFILTERNCCFFT_H
00016 #define CFL_SCANFILTERNCCFFT_H
00017
00018 #if _MSC_VER > 1000
00019 #pragma once
00020 #endif // _MSC_VER > 1000
00021
00022 #include <cfl/ScanFilter.h>
00023 #include <cfl/ScanBaseBuffer.h>
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 DECLARE_CLASS( CScanFilterNCCFFTOld );
00062
00063
00064
00065
00066
00067 class CScanFilterNCCFFTOld : public CScanFilter
00068 {
00069
00070
00071
00072 friend class CFilterDlg_NCCFFTOld;
00073
00074 public:
00075
00076
00077
00078 typedef CScanBaseBuffer::ValueType ValueType;
00079
00080
00081
00082
00083 typedef ValueType InputPixelType;
00084
00085
00086
00087
00088 typedef ValueType OutputPixelType;
00089
00090
00091
00092
00093 enum NormalizationType
00094 {
00095 nmNone,
00096 nmNormal,
00097 nmPhase,
00098 nmDimension_,
00099 };
00100
00101
00102
00103
00104 enum NormalizationSubType
00105 {
00106 nsZeroMean,
00107 nsEnergy,
00108 nsPlanar,
00109 };
00110
00111
00112
00113
00114 typedef double ScaleType;
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124 CScanFilterNCCFFTOld();
00125
00126
00127
00128
00129 virtual ~CScanFilterNCCFFTOld();
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149 virtual void ReadFilterSettings( );
00150
00151
00152
00153
00154
00155 virtual void WriteFilterSettings( ) const;
00156
00157
00158
00159
00160
00161
00162 virtual LPCTSTR GetParameters() const;
00163
00164
00165
00166
00167
00168 virtual BOOL SetParameters( LPCTSTR lpParameters );
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190 virtual BOOL RunModeless( CWnd *pParentWnd, CDocument *pDoc );
00191
00192
00193
00194
00195
00196
00197 virtual BOOL Apply();
00198
00199
00200
00201
00202 virtual DWORD GetNrOfInBuffers() const;
00203
00204
00205
00206
00207 virtual CScanBaseBuffer* GetInputBuffer( UINT nNr );
00208
00209
00210
00211
00212 virtual void SetInputBuffer( UINT nNr, CScanBaseBuffer *lpsbIn );
00213
00214
00215
00216
00217
00218
00219
00220
00221 bool DoRelaxFFTSize() const
00222 {
00223 return m_relax_fft_size;
00224 }
00225
00226
00227
00228
00229
00230
00231
00232
00233 NormalizationType GetNormalizationType() const
00234 {
00235 return m_norm;
00236 }
00237
00238
00239
00240
00241 NormalizationSubType GetNormalizationSubType() const
00242 {
00243 return m_normsub;
00244 }
00245
00246
00247
00248
00249 ScaleType GetScale( NormalizationType type ) const
00250 {
00251
00252 return m_scale[ type ];
00253 }
00254
00255
00256
00257
00258
00259
00260
00261
00262 void SetNormalizationType( NormalizationType norm )
00263 {
00264 m_norm = norm;
00265 }
00266
00267
00268
00269
00270 void SetNormalizationSubType( NormalizationSubType normsub )
00271 {
00272 m_normsub = normsub;
00273 }
00274
00275
00276
00277
00278 void SetRelaxFFTSize( bool relax_fft_size )
00279 {
00280 m_relax_fft_size = relax_fft_size;
00281 }
00282
00283
00284
00285
00286 void SetScale( NormalizationType type, ScaleType scale )
00287 {
00288 m_scale[ type ] = scale;
00289 }
00290
00291
00292
00293 protected:
00294
00295
00296
00297 virtual void Serialize(CArchive& ar);
00298 DECLARE_SERIAL(CScanFilterNCCFFTOld)
00299
00300 public:
00301
00302
00303
00304 static LPCTSTR m_lpcsFilterName;
00305
00306
00307
00308
00309 static LPCTSTR m_lpcsShortFilterName;
00310
00311
00312
00313
00314 static const ScaleType m_defScale;
00315
00316 protected:
00317
00318
00319
00320 CScanBaseBuffer *m_lpsbIn2;
00321
00322
00323
00324
00325 NormalizationType m_norm;
00326
00327
00328
00329
00330 NormalizationSubType m_normsub;
00331
00332
00333
00334
00335 bool m_relax_fft_size;
00336
00337
00338
00339
00340 ScaleType m_scale[ nmDimension_ ];
00341 };
00342
00343
00344
00345 #endif // CFL_SCANFILTERNCCFFT_H
00346
00347
00348
00349
00350