SimulationViewerNerdCam Class Reference

This class provides interface with vision and NerdCam. More...

#include <Neuro/SimulationViewerNerdCam.H>

Inheritance diagram for SimulationViewerNerdCam:
Inheritance graph
[legend]
Collaboration diagram for SimulationViewerNerdCam:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Constructors and destructors

 SimulationViewerNerdCam (OptionManager &mgr, const std::string &descrName="NerdCam Interface", const std::string &tagName="NerdCam")
 Constructor. See ModelComponent.H.
virtual ~SimulationViewerNerdCam ()
 Destructor.
virtual void reset1 ()
 Reset SimulationViewerNerdCam.
void init (const ushort baseSizeX, const ushort baseSizeY)
 basic init method

Protected Member Functions

 SIMCALLBACK_DECLARE (SimulationViewerNerdCam, SimEventInputFrame)
 Callback for when a new input image is available.
 SIMCALLBACK_DECLARE (SimulationViewerNerdCam, SimEventClockTick)
 Callback for every clock tick.
 SIMCALLBACK_DECLARE (SimulationViewerNerdCam, SimEventWTAwinner)
 Callback for when a new attention shift occurs.
 SIMCALLBACK_DECLARE (SimulationViewerNerdCam, SimEventSaveOutput)
 Callback for every time we should save our outputs.
virtual void save1 (const ModelComponentSaveInfo &sinfo)
 Save our various results.
Image< PixRGB< byte > > getTraj (SimEventQueue &q)
 Get the attention/eye/head trajectory image.
void saveResults (const nub::ref< FrameOstream > &ofs, SimEventQueue &q)
 Called by saveOutput().
virtual void start2 ()
 Get started:
void writeStatusPage () const
 write a basic status page out
void writeChannelPage () const
 write a basic status page out
void drawTime (Image< PixRGB< byte > > &image) const
 Draw current time onto given image.
void lockFile (const std::string fileName, int &fd, struct flock &fl) const
 apply an advisory lock on a file
void unlockFile (const std::string fileName, const int fd, struct flock &fl) const
 remove an advisory lock on a file
void nlog (const std::string logData) const
 log data to standard log file
void drawDateTime (Image< PixRGB< byte > > &image) const
 Draw the date and time onto an image.
void drawFOA ()
 Draw the focus of covert attention.
void linkFOAs ()
 Link previous focus of attention to current one.
Image< PixRGB< byte > > drawMegaCombo (SimEventQueue &q) const
 draw the mega combo
void drawMaskOutline (Image< PixRGB< byte > > &traj, const Image< byte > mask, const PixRGB< byte > &col, const int thick, const Point2D< int > &pos, const int radius) const
 Draw outline of a mask (used by drawFOA).

Protected Attributes

nub::ref< SpatialMetricsitsMetrics
 metrics that depend on the input size:
NModelParam< PixRGB< byte > > itsColorBoring
 drawing color selection parameter
NModelParam< PixRGB< byte > > itsColorLink
 drawing color selection parameter
NModelParam< PixRGB< byte > > itsColorNormal
 drawing color selection parameter
OModelParam< std::stringitsConfigFile
 config file to open
OModelParam< DimsitsCropFOA
OModelParam< bool > itsDisplayAdditive
OModelParam< bool > itsDisplayBoring
OModelParam< bool > itsDisplayFOA
OModelParam< bool > itsDisplayFOALinks
OModelParam< bool > itsDisplayHighlights
OModelParam< bool > itsDisplayPatch
OModelParam< bool > itsDisplaySMmodulate
OModelParam< bool > itsDisplayTime
NModelParam< int > itsFOApsiz
 half-size of (filled square) FOA patch
NModelParam< int > itsFOAthick
 line thickness for FOA outline
NModelParam< int > itsFOAlinkThick
 line thickness for links bewteen FOAs
OModelParam< bool > itsMegaCombo
NModelParam< float > itsWarp3Dpitch
NModelParam< float > itsWarp3Dyaw
NModelParam< float > itsWarp3DpitchRate
NModelParam< float > itsWarp3DyawRate
NModelParam< float > itsWarp3DpitchMax
NModelParam< float > itsWarp3DyawMax
OModelParam< bool > itsUseLargerDrawings
 use larger drawings?

Detailed Description

This class provides interface with vision and NerdCam.

This simulation viewer is designed to take brain and VisualCortex information and process it for use with the nerd cam web page. For instance we can control file locking, motion noticing and file saving. We use a SimulationViewer to standardize its workings with ezvision.

Definition at line 74 of file SimulationViewerNerdCam.H.


Constructor & Destructor Documentation

SimulationViewerNerdCam::SimulationViewerNerdCam ( OptionManager mgr,
const std::string descrName = "NerdCam Interface",
const std::string tagName = "NerdCam" 
)

Constructor. See ModelComponent.H.

Parameters:
mgr our ModelManager (see ModelManager.H)
descrName descriptive name for human usage
tagName name for ParamMap usage

Definition at line 74 of file SimulationViewerNerdCam.C.

References ModelComponent::addSubComponent(), itsMetrics, and nlog().

SimulationViewerNerdCam::~SimulationViewerNerdCam (  )  [virtual]

Destructor.

Definition at line 124 of file SimulationViewerNerdCam.C.

References nlog().


Member Function Documentation

void SimulationViewerNerdCam::drawDateTime ( Image< PixRGB< byte > > &  image  )  const [protected]

Draw the date and time onto an image.

Definition at line 957 of file SimulationViewerNerdCam.C.

References image, and writeText().

void SimulationViewerNerdCam::drawFOA (  )  [protected]
void SimulationViewerNerdCam::drawMaskOutline ( Image< PixRGB< byte > > &  traj,
const Image< byte mask,
const PixRGB< byte > &  col,
const int  thick,
const Point2D< int > &  pos,
const int  radius 
) const [protected]

Draw outline of a mask (used by drawFOA).

Definition at line 1133 of file SimulationViewerNerdCam.C.

References contour2D(), drawDisk(), Image< T >::getVal(), Point2D< T >::i, and inplaceLowThresh().

Referenced by drawFOA().

Image< PixRGB< byte > > SimulationViewerNerdCam::drawMegaCombo ( SimEventQueue q  )  const [protected]
void SimulationViewerNerdCam::drawTime ( Image< PixRGB< byte > > &  image  )  const [protected]

Draw current time onto given image.

Definition at line 884 of file SimulationViewerNerdCam.C.

References image, SimTime::msecs(), and writeText().

Referenced by getTraj().

Image< PixRGB< byte > > SimulationViewerNerdCam::getTraj ( SimEventQueue q  )  [protected]
void SimulationViewerNerdCam::init ( const ushort  baseSizeX,
const ushort  baseSizeY 
)
void SimulationViewerNerdCam::linkFOAs (  )  [protected]

Link previous focus of attention to current one.

Definition at line 984 of file SimulationViewerNerdCam.C.

References Point2D< T >::distance(), drawArrow(), NModelParam< T >::getVal(), WTAwinner::isValid(), itsColorLink, itsFOAlinkThick, and WTAwinner::p.

void SimulationViewerNerdCam::lockFile ( const std::string  fileName,
int &  fd,
struct flock &  fl 
) const [protected]

apply an advisory lock on a file

Definition at line 891 of file SimulationViewerNerdCam.C.

Referenced by nlog(), saveResults(), writeChannelPage(), and writeStatusPage().

void SimulationViewerNerdCam::nlog ( const std::string  logData  )  const [protected]

log data to standard log file

Definition at line 941 of file SimulationViewerNerdCam.C.

References lockFile(), and unlockFile().

Referenced by init(), reset1(), saveResults(), SimulationViewerNerdCam(), and ~SimulationViewerNerdCam().

void SimulationViewerNerdCam::reset1 (  )  [virtual]

Reset SimulationViewerNerdCam.

See the base function in ModelComponent.H for info.

Reimplemented from ModelComponent.

Definition at line 174 of file SimulationViewerNerdCam.C.

References Image< T >::freeMem(), nlog(), ImageSet< T >::reset(), and SimTime::ZERO().

void SimulationViewerNerdCam::save1 ( const ModelComponentSaveInfo sinfo  )  [protected, virtual]

Save our various results.

Reimplemented from ModelComponent.

Definition at line 477 of file SimulationViewerNerdCam.C.

References saveResults().

void SimulationViewerNerdCam::saveResults ( const nub::ref< FrameOstream > &  ofs,
SimEventQueue q 
) [protected]
SimulationViewerNerdCam::SIMCALLBACK_DECLARE ( SimulationViewerNerdCam  ,
SimEventSaveOutput   
) [protected]

Callback for every time we should save our outputs.

SimulationViewerNerdCam::SIMCALLBACK_DECLARE ( SimulationViewerNerdCam  ,
SimEventWTAwinner   
) [protected]

Callback for when a new attention shift occurs.

SimulationViewerNerdCam::SIMCALLBACK_DECLARE ( SimulationViewerNerdCam  ,
SimEventClockTick   
) [protected]

Callback for every clock tick.

Note: this is only being used by warp3d right now and should go away.

SimulationViewerNerdCam::SIMCALLBACK_DECLARE ( SimulationViewerNerdCam  ,
SimEventInputFrame   
) [protected]

Callback for when a new input image is available.

void SimulationViewerNerdCam::start2 (  )  [protected, virtual]

Get started:

Reimplemented from ModelComponent.

Definition at line 193 of file SimulationViewerNerdCam.C.

References OModelParam< T >::getVal(), itsFOApsiz, itsUseLargerDrawings, and NModelParam< T >::setVal().

void SimulationViewerNerdCam::unlockFile ( const std::string  fileName,
const int  fd,
struct flock &  fl 
) const [protected]

remove an advisory lock on a file

Definition at line 924 of file SimulationViewerNerdCam.C.

Referenced by nlog(), saveResults(), writeChannelPage(), and writeStatusPage().

void SimulationViewerNerdCam::writeChannelPage (  )  const [protected]

write a basic status page out

Definition at line 613 of file SimulationViewerNerdCam.C.

References in, lockFile(), and unlockFile().

Referenced by saveResults().

void SimulationViewerNerdCam::writeStatusPage (  )  const [protected]

write a basic status page out

Definition at line 491 of file SimulationViewerNerdCam.C.

References findMax(), findMin(), findPeaks(), getMinMaxAvg(), Image< T >::getWidth(), Point2D< T >::i, in, lockFile(), stdev(), and unlockFile().

Referenced by saveResults().


Member Data Documentation

drawing color selection parameter

Definition at line 157 of file SimulationViewerNerdCam.H.

Referenced by drawFOA().

drawing color selection parameter

Definition at line 159 of file SimulationViewerNerdCam.H.

Referenced by linkFOAs().

drawing color selection parameter

Definition at line 161 of file SimulationViewerNerdCam.H.

Referenced by drawFOA(), and saveResults().

config file to open

Definition at line 163 of file SimulationViewerNerdCam.H.

Referenced by init().

line thickness for links bewteen FOAs

Definition at line 181 of file SimulationViewerNerdCam.H.

Referenced by linkFOAs().

half-size of (filled square) FOA patch

Definition at line 177 of file SimulationViewerNerdCam.H.

Referenced by drawFOA(), and start2().

line thickness for FOA outline

Definition at line 179 of file SimulationViewerNerdCam.H.

Referenced by drawFOA().

metrics that depend on the input size:

Definition at line 154 of file SimulationViewerNerdCam.H.

Referenced by drawFOA(), and SimulationViewerNerdCam().

use larger drawings?

Definition at line 190 of file SimulationViewerNerdCam.H.

Referenced by start2().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:25:33 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3