StimMaker.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef STIM_MAKER_H_DEFINED
00040 #define STIM_MAKER_H_DEFINED
00041
00042 #include "Psycho/StimMakerParam.H"
00043
00044
00045 class StimMaker
00046 {
00047 public:
00048
00049 StimMaker(const unsigned short ImageSizeX,
00050 const unsigned short ImageSizeY,
00051 const unsigned short frameCount,
00052 const char bgColor);
00053
00054 ~StimMaker();
00055
00056
00057 void SM_init(const char bgColor);
00058
00059 void SM_setStandardBackGround(const unsigned char bgColor);
00060
00061 void SM_overRideRates(const unsigned char slowRate,
00062 const unsigned char fastRate,
00063 const unsigned char stopRate);
00064
00065 void SM_setCustomColors(const PixRGB<float> BGcolor,
00066 const PixRGB<float> TargetColor,
00067 const PixRGB<float> DistColor);
00068
00069 inline ushort SM_speedUpCheck(ushort currBlinkRate,
00070 const ushort frame,
00071 const ushort changeFrame,
00072 const unsigned char stimRate,
00073 const unsigned char useSmoothRateChange) const;
00074
00075 inline ushort SM_speedDownCheck(ushort currBlinkRate,
00076 const ushort frame,
00077 const ushort changeFrame,
00078 const unsigned char stimRate,
00079 const unsigned char useSmoothRateChange) const;
00080
00081 inline void SM_drawGroundTruth(const ushort frame,
00082 const unsigned char stimSizeX,
00083 const unsigned char stimSizeY,
00084 const ushort PosX,
00085 const ushort PosY,
00086 const bool targetOn);
00087
00088
00089 inline void SM_drawSingleTarget(const ushort frame,
00090 const unsigned char stimShape,
00091 const unsigned char stimColor,
00092 const unsigned char stimSizeX,
00093 const unsigned char stimSizeY,
00094 const ushort PosX,
00095 const ushort PosY,
00096 const float stimOri,
00097 const float shapePositionJitter,
00098 const float shapeOrientationJitter,
00099 const bool target);
00100
00101
00102
00103
00104
00105
00106
00107 void SM_makeUniformStim(const StimMakerParam &stim);
00108
00109 std::vector<Image<PixRGB<float> > > SM_getStim() const;
00110
00111 std::vector<Image<PixRGB<float> > > SM_getGroundTruth() const;
00112 private:
00113 bool itsUseCustomColors;
00114 unsigned char itsBGcolor;
00115 unsigned char itsSlowRate;
00116 unsigned char itsFastRate;
00117 unsigned char itsStopRate;
00118 unsigned short itsSizeX;
00119 unsigned short itsSizeY;
00120 unsigned short itsFrameCount;
00121 unsigned int itsRandomSeed;
00122 PixRGB<float> itsRed;
00123 PixRGB<float> itsOrange;
00124 PixRGB<float> itsYellow;
00125 PixRGB<float> itsGreen;
00126 PixRGB<float> itsBlue;
00127 PixRGB<float> itsPurple;
00128 PixRGB<float> itsBlack;
00129 PixRGB<float> itsWhite;
00130 PixRGB<float> itsCustomBG;
00131 PixRGB<float> itsCustomTarg;
00132 PixRGB<float> itsCustomDist;
00133 PixRGB<float> itsGTtargetColor;
00134 PixRGB<float> itsGTtargetColorPatch1;
00135 PixRGB<float> itsGTtargetColorPatch2;
00136 PixRGB<float> itsGTtargetColorPatch1off;
00137 PixRGB<float> itsGTtargetColorPatch2off;
00138 PixRGB<float> itsGTdistColor;
00139 std::vector<PixRGB<float> > itsColorVec;
00140 std::vector<Image<PixRGB<float> > > itsFrames;
00141 std::vector<Image<PixRGB<float> > > itsGroundTruth;
00142 };
00143
00144 #endif // STIM_MAKER_H_DEFINED