Filter Library | Camera | Interface Physics |
00001 /* 00002 * ScanFilterSwapQuadrants.h - swap quadrants. 00003 * 00004 * This file is part of the Camera Filter Library. 00005 * Computer Aided Measurement Environment for Realtime Atomic imaging (Camera) 00006 * 00007 * Copyright (C) 2004-2005, Leiden Probe Microscopy. 00008 * Copyright (C) 2004-2005, Universiteit Leiden. 00009 * 00010 * Authors: M. Seynen (original), Martin J. Moene 00011 * 00012 * $Id: ScanFilterSwapQuadrants.h 240 2005-06-27 14:45:17Z moene $ 00013 */ 00014 00015 #ifndef CFL_SCANFILTERSWAPQUADRANTS_H 00016 #define CFL_SCANFILTERSWAPQUADRANTS_H 00017 00018 #if _MSC_VER > 1000 00019 #pragma once 00020 #endif // _MSC_VER > 1000 00021 00022 #include <cfl/ScanFilter.h> // for base class 00023 #include <cfl/ScanBaseBuffer.h> // for ValueType 00024 00025 /** 00026 * \addtogroup cfl_filterswapquadrants Swap Quadrants Filter 00027 * \brief swap quadrants filter. 00028 * 00029 00030 <h3>Purpose</h3> 00031 00032 Swap quadrants Q1, Q3 and Q2, Q4 after a FFT-Correlate-IFFT operation. 00033 00034 <h3>Description</h3> 00035 00036 <h3>Algorithm</h3> 00037 00038 00039 \f[ 00040 \textrm{B} = \textrm{A} 00041 \f] 00042 00043 <h3>Examples</h3> 00044 Try to find some interesting pictures for most filters. 00045 00046 <h3>Contact</h3> 00047 Dipl.phys. M.J. Rost<br> 00048 Huygens Laboratorium<br> 00049 Universiteit Leiden<br> 00050 Niels Bohrweg 2<br> 00051 2333 CA Leiden, The Netherlands<br> 00052 <br> 00053 Tel: +31 71 5275600<br> 00054 Fax: +31 71 5275404<br> 00055 <br> 00056 E-mail: rost@physics.LeidenUniv.nl<br> 00057 Web: http://www.geocities.com/marcel_rost/<br> 00058 00059 * 00060 * @{ 00061 */ 00062 00063 DECLARE_CLASS( CScanFilterSwapQuadrants ); // create various types 00064 00065 /** 00066 * \brief swap quadrants Q1,Q3 and Q2,Q4 after FFT--Correlate--IFFT. 00067 */ 00068 class CScanFilterSwapQuadrants : public CScanFilter 00069 { 00070 public: 00071 /** 00072 * the parent class. 00073 */ 00074 typedef CScanFilter Super; 00075 00076 /** 00077 * the size type. 00078 */ 00079 typedef CScanBaseBuffer::SizeType SizeType; 00080 00081 /** 00082 * the value type. 00083 */ 00084 typedef CScanBaseBuffer::ValueType ValueType; 00085 00086 /** 00087 * the pointer type. 00088 */ 00089 typedef ValueType* Pointer; 00090 00091 /** 00092 * the const pointer type. 00093 */ 00094 typedef const ValueType* ConstPointer; 00095 00096 /// 00097 /// \name Construction 00098 /// @{ 00099 00100 /** 00101 * default constructor. 00102 */ 00103 CScanFilterSwapQuadrants(); 00104 00105 /** 00106 * destructor. 00107 */ 00108 virtual ~CScanFilterSwapQuadrants(); 00109 00110 /// @} 00111 /// \name Camera--Filter Interface 00112 /// @{ 00113 00114 /** 00115 * no dialog. 00116 */ 00117 virtual BOOL CanDoDialogEntry() const; 00118 00119 // /** 00120 // * \brief configure filter with settings as provided by the application on the 00121 // * filterlist window (e.g. via registry); see also CScanFilterNull::ReadFilterSettings(). 00122 // */ 00123 // virtual void ReadFilterSettings( ); 00124 // 00125 // /** 00126 // * \brief save filter settings e.g. for use with the filterlist window (e.g. via registry); 00127 // * see also ReadFilterSettings(). 00128 // */ 00129 // virtual void WriteFilterSettings( ) const; 00130 // 00131 /** 00132 * no parameters; see also CScanFilterNull::GetParameters(). 00133 */ 00134 virtual LPCTSTR GetParameters() const; 00135 00136 /** 00137 * no parameters; see also CScanFilterNull::SetParameters(). 00138 */ 00139 virtual BOOL SetParameters( LPCTSTR lpParameters ); 00140 00141 // /** 00142 // * start filter dialog to edit parameters; no filter operations; 00143 // * see also CScanFilterNull::EditModeless(). 00144 // */ 00145 // virtual BOOL EditModeless( CWnd *pParentWnd ); 00146 // 00147 // /** 00148 // * create filter dialog and prepare filter for Apply(); 00149 // * see also CScanFilterNull::RunModeless(). 00150 // */ 00151 // virtual BOOL RunModeless( CWnd *pParentWnd, CDocument *pDoc ); 00152 00153 /** 00154 * check parameters, take care of a properly sized output buffer, 00155 * set its name and copy filter parameters and process; 00156 * see also CScanFilterNull::ApplyCore(). 00157 */ 00158 virtual BOOL Apply(); 00159 00160 /// @} 00161 /// \name Predicates 00162 /// @{ 00163 00164 /// @} 00165 /// \name Accessors 00166 /// @{ 00167 00168 /// @} 00169 /// \name Mutators 00170 /// @{ 00171 00172 /// @} 00173 00174 public: 00175 /** 00176 * the filter name. 00177 */ 00178 static LPCTSTR m_lpcsFilterName; 00179 00180 /** 00181 * the class short filtername. 00182 */ 00183 static LPCTSTR m_lpcsShortFilterName; 00184 00185 protected: 00186 /** 00187 * store or retrieve the object's settings. 00188 */ 00189 virtual void Serialize(CArchive& ar); 00190 DECLARE_SERIAL(CScanFilterSwapQuadrants) 00191 00192 /** 00193 * called by working thread 00194 */ 00195 BOOL Compute(); 00196 00197 /** 00198 * copy a frame. 00199 */ 00200 void CopyPart( ConstPointer pIn, Pointer pOut, SizeType elements ); 00201 00202 /** 00203 * compute a frame in-place. 00204 */ 00205 void ComputePart( Pointer pFrame, const SizeType& nrow, const SizeType& ncol ); 00206 }; 00207 00208 /// @} cfl_filterinversefft 00209 00210 #endif // CFL_SCANFILTERSWAPQUADRANTS_H 00211 00212 /* 00213 * end of file 00214 */ 00215