The Physiologist's Friend Simulation API

ch.unizh.ini.friend.simulation.cells
Class ColorPhotoreceptor

java.lang.Object
  extended by ch.unizh.ini.friend.simulation.AbstractAcceptsInput
      extended by ch.unizh.ini.friend.simulation.cells.AbstractCell
          extended by ch.unizh.ini.friend.simulation.cells.Photoreceptor
              extended by ch.unizh.ini.friend.simulation.cells.ColorPhotoreceptor
All Implemented Interfaces:
AcceptsInput, GradedCell, ServesOutput, Updateable, Retinotopic, Serializable

public class ColorPhotoreceptor
extends Photoreceptor

A color-selective photoreceptor. The receptor is either sensitive to L, M, or S stimuli depending on it's cone type.

Version:
$Revision: 1.2 $
Author:
Johann Gyger
See Also:
Serialized Form

Field Summary
static int L_CONE
          Red selective (L cone) photoreceptor type.
static int M_CONE
          Green selective (M cone) photoreceptor type.
static int NUM_CONES
          Total number of cone types.
static int S_CONE
          Blue selective (S cone) photoreceptor type.
 
Fields inherited from class ch.unizh.ini.friend.simulation.cells.Photoreceptor
ADAPTATION_TIME_CONSTANT, gain, highPass, shape, stimulus, TRANSIENT_GAIN
 
Fields inherited from class ch.unizh.ini.friend.simulation.cells.AbstractCell
newValue, value
 
Fields inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput
inputs
 
Constructor Summary
ColorPhotoreceptor(ConvexPolygon shape, ColorStimulus stimulus, int type)
          Creates a new color-selective photoreceptor.
 
Method Summary
 float excitation()
          Overridden to support color-specific excitation.
static ArrayList[] getHexagonalArrayLists(int a, float r, float spacing, ColorStimulus stimulus, Collection shapes)
          This method does almost the same as Photoreceptor#getHexagonalArrayListInstance.
 
Methods inherited from class ch.unizh.ini.friend.simulation.cells.Photoreceptor
compute, getGradedOutput, getHexagonalArrayListInstance, getRetinotopicLocation, setRetinotopicLocation
 
Methods inherited from class ch.unizh.ini.friend.simulation.cells.AbstractCell
output, update
 
Methods inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput
averageInputs, cloneObject, connectOneToAll, connectOneToOne, getCollectionInstance, getInput, getInputs, integrateInputs, setInput, setInputs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

L_CONE

public static final int L_CONE
Red selective (L cone) photoreceptor type.

See Also:
Constant Field Values

M_CONE

public static final int M_CONE
Green selective (M cone) photoreceptor type.

See Also:
Constant Field Values

S_CONE

public static final int S_CONE
Blue selective (S cone) photoreceptor type.

See Also:
Constant Field Values

NUM_CONES

public static final int NUM_CONES
Total number of cone types.

See Also:
Constant Field Values
Constructor Detail

ColorPhotoreceptor

public ColorPhotoreceptor(ConvexPolygon shape,
                          ColorStimulus stimulus,
                          int type)
Creates a new color-selective photoreceptor.

Parameters:
shape - the shape of this photoreceptor
stimulus - the stimulus used to stimulate this photoreceptor
type - the cone type.
Method Detail

excitation

public float excitation()
Overridden to support color-specific excitation.

Overrides:
excitation in class Photoreceptor
Returns:
the excitation

getHexagonalArrayLists

public static ArrayList[] getHexagonalArrayLists(int a,
                                                 float r,
                                                 float spacing,
                                                 ColorStimulus stimulus,
                                                 Collection shapes)
This method does almost the same as Photoreceptor#getHexagonalArrayListInstance. But instead of returning an ArrayList it returns an array of ArrayLists, one for each cone type. For each shape, a color-selective photoreceptor of each cone type is created which means that they overlap.

Parameters:
a - the number of shapes making one side
r - the radius of the enclosing circle arround one photoreceptor
spacing - the additional distance between the photoreceptors
stimulus - the stimulus to attach to the photoreceptors
shapes - a collection the shapes of the photoreceptors are added to
Returns:
an array of lists with color-selective photoreceptors

http://www.ini.unizh.ch/~tobi/friend