Filter Library Camera Interface Physics

ScanFilterTest.h

00001 /*
00002  * ScanFilterTest.h -
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: ScanFilterTest.h 236 2005-06-27 09:03:17Z moene $
00013  */
00014 
00015 #ifndef CFL_SCANFILTERTEST_H
00016 #define CFL_SCANFILTERTEST_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_filtertest Test Filter
00027  * \brief test filter.
00028  *
00029 
00030 <h3>Purpose</h3>
00031 
00032 Generate test patterns or copy or negate input buffer.
00033 
00034 <h3>Description</h3>
00035 
00036 This filter lets you create several data patterns.
00037 
00038 <h3>Algorithm</h3>
00039 
00040 \f[
00041    \textrm{B} = \textrm{A}
00042 \f]
00043 
00044 <h3>Examples</h3>
00045 Try to find some interesting pictures for most filters.
00046 
00047 <h3>Contact</h3>
00048 Dipl.phys. M.J. Rost<br>
00049 Huygens Laboratorium<br>
00050 Universiteit Leiden<br>
00051 Niels Bohrweg 2<br>
00052 2333 CA Leiden, The Netherlands<br>
00053 <br>
00054 Tel: +31 71 5275600<br>
00055 Fax: +31 71 5275404<br>
00056 <br>
00057 E-mail: rost@physics.LeidenUniv.nl<br>
00058 Web: http://www.geocities.com/marcel_rost/<br>
00059 
00060  *
00061  * @{
00062  */
00063 
00064 DECLARE_CLASS( CScanFilterTest );         // create various types
00065 
00066 /**
00067  * \brief test filter.
00068  *
00069  */
00070 class CScanFilterTest : public CScanFilter
00071 {
00072    /**
00073     * its dialog class.
00074     */
00075    friend class CFilterDlg_Test;
00076 
00077 public:
00078    /**
00079     * the various test patterns.
00080     */
00081    enum ModeType
00082    {
00083       MODE_SIN,         ///< create sine pattern
00084       MODE_SAW,         ///< create saw pattern
00085       MODE_RAMP,        ///< create ramp pattern
00086       MODE_ZERO,        ///< empty buffer
00087       MODE_NEG,         ///< negate input buffer
00088       MODE_COPY,        ///< copy input buffer
00089       MODE_BOX,         ///< create box pattern
00090       MODE_RIPPLE,      ///< create ripple pattern
00091       MODE_NOISE        ///< create noise pattern
00092    };
00093 
00094    ///
00095    /// \name Construction
00096    /// @{
00097 
00098    /**
00099     * default constructor.
00100     */
00101    CScanFilterTest();
00102 
00103    /**
00104     * destructor.
00105     */
00106    virtual ~CScanFilterTest();
00107 
00108    /**
00109     * can do partial data (in this case meaning?).
00110     */
00111    virtual BOOL CanDoPartialData() const { return TRUE; };
00112 
00113    /// @}
00114    /// \name Camera--Filter Interface
00115    /// @{
00116 
00117    /**
00118     * \brief configure filter with settings as provided by the application on the
00119     * filterlist window (e.g. via registry); see also CScanFilterNull::ReadFilterSettings().
00120     */
00121    virtual void ReadFilterSettings( );
00122 
00123    /**
00124     * \brief save filter settings e.g. for use with the filterlist window (e.g. via registry);
00125     * see also ReadFilterSettings().
00126     */
00127    virtual void WriteFilterSettings( ) const;
00128 
00129    /**
00130     * provide current filter parameter(s) for filter-scripting capture
00131     * in the main application;
00132     * see also CScanFilterNull::GetParameters().
00133     */
00134    virtual LPCTSTR GetParameters() const;
00135 
00136    /**
00137     * set parameters for filter-script execution of filter;
00138     * see also CScanFilterNull::SetParameters().
00139     */
00140    virtual BOOL SetParameters( LPCTSTR lpParameters );
00141 
00142    /**
00143     * start filter dialog to edit parameters; no filter operations;
00144     * see also CScanFilterNull::EditModeless().
00145     */
00146 //   virtual BOOL EditModeless( CWnd *pParentWnd );
00147 
00148    /**
00149     * create filter dialog and pre Apply() filter to view result;
00150     * see also CScanFilterNull::RunModeless().
00151     */
00152    virtual BOOL RunModeless( CWnd *pParentWnd, CDocument *pDoc );
00153 
00154    /**
00155     * check parameters, take care of a properly sized output buffer,
00156     * set its name and copy filter parameters and process;
00157     * see also CScanFilterNull::ApplyCore().
00158     */
00159    virtual BOOL Apply();
00160 
00161 public:
00162    /**
00163     * the filter name.
00164     */
00165    static LPCTSTR m_lpcsFilterName;
00166 
00167    /**
00168     * the class short filtername.
00169     */
00170    static LPCTSTR m_lpcsShortFilterName;
00171 
00172 protected:
00173    /**
00174     * store or retrieve the object's settings.
00175     */
00176    virtual void Serialize(CArchive& ar);
00177    DECLARE_SERIAL(CScanFilterTest)
00178 
00179 protected:
00180    /**
00181     * the left to right mode.
00182     */
00183    ModeType m_eModeL2R;
00184 
00185    /**
00186     * the right to left mode.
00187     */
00188    ModeType m_eModeR2L;
00189 };
00190 
00191 // @} cfl_filtertest
00192 
00193 #endif // CFL_SCANFILTERTEST_H
00194 
00195 /*
00196  * end of file
00197  */
00198 

Camera Filter Library documentation © 2004-2007 by Leiden Probe Microscopy