StimMakerParam.H

Go to the documentation of this file.
00001 /*!@file Psycho/StimMakerParam.H make different kind of visual test stimuli
00002  */
00003 
00004 // //////////////////////////////////////////////////////////////////// //
00005 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2001 by the //
00006 // University of Southern California (USC) and the iLab at USC.         //
00007 // See http://iLab.usc.edu for information about this project.          //
00008 // //////////////////////////////////////////////////////////////////// //
00009 // Major portions of the iLab Neuromorphic Vision Toolkit are protected //
00010 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency //
00011 // in Visual Environments, and Applications'' by Christof Koch and      //
00012 // Laurent Itti, California Institute of Technology, 2001 (patent       //
00013 // pending; application number 09/912,225 filed July 23, 2001; see      //
00014 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status).     //
00015 // //////////////////////////////////////////////////////////////////// //
00016 // This file is part of the iLab Neuromorphic Vision C++ Toolkit.       //
00017 //                                                                      //
00018 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can   //
00019 // redistribute it and/or modify it under the terms of the GNU General  //
00020 // Public License as published by the Free Software Foundation; either  //
00021 // version 2 of the License, or (at your option) any later version.     //
00022 //                                                                      //
00023 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope  //
00024 // that it will be useful, but WITHOUT ANY WARRANTY; without even the   //
00025 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
00026 // PURPOSE.  See the GNU General Public License for more details.       //
00027 //                                                                      //
00028 // You should have received a copy of the GNU General Public License    //
00029 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write   //
00030 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,   //
00031 // Boston, MA 02111-1307 USA.                                           //
00032 // //////////////////////////////////////////////////////////////////// //
00033 //
00034 // Primary maintainer for this file: T. Nathan Mundhenk <mundhenk@usc.edu>
00035 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Psycho/StimMakerParam.H $
00036 // $Id: StimMakerParam.H 6347 2006-03-06 15:18:42Z rjpeters $
00037 //
00038 
00039 #ifndef STIM_MAKER_PARAM_H_DEFINED
00040 #define STIM_MAKER_PARAM_H_DEFINED
00041 
00042 // Shape types
00043 #define SM_STIM_RAND  0
00044 #define SM_STIM_DISK  1
00045 #define SM_STIM_RECT  2
00046 #define SM_STIM_LINE  3
00047 #define SM_STIM_CROSS 4
00048 #define SM_STIM_PATCH 5
00049 #define SM_STIM_ARROW 6
00050 #define SM_STIM_CIRC  7
00051 
00052 #define SM_SHAPES     7
00053 
00054 // color types
00055 #define SM_COLOR_RAND   0
00056 #define SM_COLOR_RED    1
00057 #define SM_COLOR_ORANGE 2
00058 #define SM_COLOR_YELLOW 3
00059 #define SM_COLOR_GREEN  4
00060 #define SM_COLOR_BLUE   5
00061 #define SM_COLOR_PURPLE 6
00062 #define SM_COLOR_BLACK  7
00063 #define SM_COLOR_WHITE  8
00064 #define SM_COLOR_CUSTOM 9
00065 
00066 #define SM_COLORS       8
00067 
00068 // rates
00069 #define SM_SLOW_RATE 10
00070 #define SM_FAST_RATE 4
00071 #define SM_STOP_RATE 0
00072 
00073 // rate to accelerate or decelerate if needed
00074 #define SM_SMOOTH_ACCEL 2
00075 
00076 // rate types
00077 #define SM_FAST_STIM 0
00078 #define SM_SLOW_STIM 1
00079 #define SM_NSPD_STIM 2
00080 
00081 // state types
00082 #define SM_STATE_STEADY 0
00083 #define SM_STATE_STOP   1
00084 #define SM_STATE_START  2
00085 
00086 // define to use a random start time
00087 #define SM_NO_USE_RANDOM_START 0
00088 #define SM_USE_RANDOM_START    1
00089 
00090 // define the type of rate change to use
00091 #define SM_NO_USE_SMOOTH_RATE_CHANGE 0
00092 #define SM_USE_SMOOTH_RATE_CHANGE    1
00093 
00094 // define if we should use a hexagonal lattice
00095 #define SM_NO_USE_HEXAGON            0
00096 #define SM_USE_HEXAGON               1
00097 
00098 #include "GUI/XWindow.H"
00099 #include "Raster/Raster.H"
00100 #include "Util/Assert.H"
00101 #include "Util/Timer.H"
00102 #include "Util/log.H"
00103 #include "Image/Image.H"
00104 #include "Image/Pixels.H"
00105 #include "Image/DrawOps.H"
00106 
00107 #include <fstream>
00108 #include <iostream>
00109 #include <math.h>
00110 #include <string>
00111 #include <vector>
00112 
00113 //! holder class for parameters used in StimMaker
00114 class StimMakerParam
00115 {
00116 public:
00117   //! should the distractors be on (visible) at start
00118   bool           SMP_distOn;
00119   //! should the target be on (visible) at the start
00120   bool           SMP_targetOn;
00121   //! the width of the distractors in pixels (if zero then random)
00122   unsigned char  SMP_distSizeX;
00123   //! the height of the distractors in pixels (if zero then random)
00124   unsigned char  SMP_distSizeY;
00125   //! the color of the distractors from the table , 0 for random
00126   unsigned char  SMP_distColor;
00127   //! the shape of the distractors from the table , 0 for random
00128   unsigned char  SMP_distShape;
00129   //! the rate of blink for distractors from the table
00130   unsigned char  SMP_distRate;
00131   //! the state change to the distractor from the table
00132   unsigned char  SMP_distState;
00133   //! the width of the target in pixels (if zero then random)
00134   unsigned char  SMP_targetSizeX;
00135   //! the height of the target in pixels (if zero then random)
00136   unsigned char  SMP_targetSizeY;
00137   //! the color of the target from the table in, 0 for random
00138   unsigned char  SMP_targetColor;
00139   //! the shape of the target from the table in , 0 for random
00140   unsigned char  SMP_targetShape;
00141   //! the rate of blink for target from the table in
00142   unsigned char  SMP_targetRate;
00143   //! the state change to the target from the table in
00144   unsigned char  SMP_targetState;
00145   //! should the start "on" times be randomized
00146   unsigned char  SMP_useRandomStart;
00147   //! should we change rates gradually
00148   unsigned char  SMP_useSmoothRateChange;
00149   //! what kind of latice should we use
00150   unsigned char  SMP_useHexagon;
00151   //! the targets position row item number (not pixels in rows)
00152   unsigned short SMP_targetPosI;
00153   //! the targets position column item number (not pixels in column)
00154   unsigned short SMP_targetPosJ;
00155   //! the number of distractors per row
00156   unsigned short SMP_distPerRow;
00157   //! the number of distractors per column
00158   unsigned short SMP_distPerCol;
00159   //! random number seed to use, if 0 then ignore
00160   unsigned int   SMP_randomSeed;
00161   //! orientation of the distractors in radians 0.0F for no rotation
00162   float          SMP_distOri;
00163   //! orientation of the target in radians 0.0F for no rotation
00164   float          SMP_targetOri;
00165   //! jitter the position of objects in the video by this much
00166   float          SMP_shapePositionJitter;
00167   //! jitter the orientation of objects in the video by this much
00168   float          SMP_shapeOrientationJitter;
00169   //! jitter the position of objects in the video by this much
00170   float          SMP_shapePositionJitterStatic;
00171   //! jitter the orientation of objects in the video by this much
00172   float          SMP_shapeOrientationJitterStatic;
00173   //! default constructor
00174   StimMakerParam();
00175   //! default destructor
00176   ~StimMakerParam();
00177   //! set values for a nice default demo
00178   void setDemoParams1();
00179   //! set values for a nice default demo
00180   void setDemoParams2();
00181   //! set values for a nice default demo
00182   void setDemoParams3();
00183   //! set values for a nice default demo
00184   void setDemoParams4();
00185   //! set values for a nice default, some basics
00186   void setBasicParams1();
00187 };
00188 
00189 #endif // STIM_MAKER_PARAM_H_DEFINED
Generated on Sun May 8 08:41:13 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3