Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ppm_draw.c

Go to the documentation of this file.
00001 
00008 #include "tristate.h"
00009 #include "globals.h"
00010 #include "ppm_draw.h"
00011 #include "neuralregionmap.h"
00012 
00013 
00014 
00015 /******************************************************************************/
00016 /* Defines and typedefs                                                       */
00017 /******************************************************************************/
00018 
00019 /* Possible values for cortex plot hue, etc.  (ppm_*_subplot)
00020 
00021    For activity plots, luminance (aka value) encodes activity level, but 
00022    the hue can encode other information if needed 
00023 */
00024 
00025 //#define PPM_RYW             0    
00026 //#define PPM_GRAYSCALE       1    
00027 //#define PPM_ORIENTATION     2    
00028 //#define PPM_OCULARDOMINANCE 3    
00029 //#define PPM_SINGLEHUE       4    
00030 //#define PPM_NONE            5    
00031 //#define PPM_SELECTIVITY     6    
00032 //#define PPM_MAX_SUBPLOT     6    /*  Maximum number defined above */
00033 
00034 
00035 /******************************************************************************/
00036 /* Initialization hook                                                        */
00037 /******************************************************************************/
00038 
00039 void  NeuralRegionMap::ppm_init_hook( void )
00040 {
00041   /* Constant values */
00042 //  CONST_I(PPM_RYW,            PPM_RYW,            False,
00043 //          "Subplot type where the primary plot is encoded using a special colormap.\n"
00044 //          "When using this with ppm_paper_based_colors==False, inactive units\n"
00045 //          "are colored black, moderately active units are red, strongly activated\n"
00046 //          "units are colored yellow, and maximally activated units are colored\n"
00047 //          "white.  Such a color scheme emphasizes peaks, particularly on video\n"
00048 //          "terminals.  The colors are reversed when ppm_paper_based_colors is\n"
00049 //          "true, which isn't quite as effective on paper; in that case PPM_Grayscale\n"
00050 //          "is a better choice.");
00051 //  
00052 //  CONST_I(PPM_Grayscale,      PPM_GRAYSCALE,      False,
00053 //          "Subplot type where monochrome luminance encodes value (e.g. activity).\n"
00054 //          "White represents maximum unless ppm_paper_based_colors is true.");
00055 //  
00056 //  CONST_I(PPM_Orientation,    PPM_ORIENTATION,    False,
00057 //          "Subplot type where the primary plot is represented by saturation or luminance\n"
00058 //          "(depending on whether ppm_paper_based_colors is True or False, respectively),\n"
00059 //          "while the hue encodes orientation preference.\n\n"
00060 //          
00061 //          "For retinal plots, each input pixel is colored by the nominal orientation of\n"
00062 //          "the object with the highest intensity value at that pixel.  This value is\n"
00063 //          "not guaranteed to match the actual orientation judgment of a human observer,\n"
00064 //          "since e.g. a composite object will return its own orientation, even though\n"
00065 //          "the local orientation of a subobject may differ.");
00066 //  
00067 //  CONST_I(PPM_OcularDominance,PPM_OCULARDOMINANCE,False,
00068 //          "Subplot type where the primary plot is represented by saturation or luminance\n"
00069 //          "(depending on whether ppm_paper_based_colors is True or False, respectively),\n"
00070 //          "while the hue encodes ocular dominance.");
00071 //
00072 //  CONST_I(PPM_SingleHue,      PPM_SINGLEHUE,      False,
00073 //          "Subplot type where the entire plot uses a hue specified by ppm_subplot_hue.");
00074 //  
00075 //  CONST_I(PPM_None,           PPM_NONE,           False,
00076 //          "Subplot type where, depending upon the type of plot, the primary plot is\n"
00077 //          "represented by hue or luminance at full strength.");
00078 //  
00079 //  CONST_I(PPM_Selectivity,    PPM_SELECTIVITY,    False,
00080 //          "Used for plots consisting of a primary dimension (e.g. orientation or\n"
00081 //          "ocular dominance), a selectivity associated with the primary\n"
00082 //          "dimension, and an optional level (e.g. activity or weight strength;\n"
00083 //          "assumed 1.0 if none).  The primary dimension is represented by hue,\n"
00084 //          "while the other two dimensions are represented using luminance and\n"
00085 //          "saturation.  The level effectively acts as a mask for a plot with the\n"
00086 //          "selectivity as saturation (ppm_paper_based_colors=False) or luminance\n"
00087 //          "(ppm_paper_based_colors=True).  For ppm_paper_based_colors=False, the\n"
00088 //          "mask is implemented simply by using the level as the luminance.  If\n"
00089 //          "ppm_paper_based_colors=True, the mask is implemented by using the\n"
00090 //          "level as the saturation and Max(1-scaled_level,selectivity) as the\n"
00091 //          "luminance.  Both methods should be equivalent; they differ only\n"
00092 //          "because the color-expressing properties of luminance and saturation\n"
00093 //          "are opposites.");
00094 
00095   CONST_I(PPM_WtScale_Fixed,  int(WtScale::Fixed),  False,
00096           "Scale the weights for all neurons by a constant multiplicative factor\n"
00097           "'value_scale', regardless of their values or number of connections\n"
00098           "defined or active.  This makes it simple to compare absolute weight\n"
00099           "values between different plots.  However, it obscures differences in\n"
00100           "weight levels between adjacent units except at a single set of parameter\n"
00101           "values for which the multiplier has been chosen to be optimum.");
00102 
00103 //  CONST_I(PPM_WtScale_Inhib,PPM_WTSCALE_INHIB,False,
00104 //          "Scale all weights by the number of inhibitory connections.\n"
00105 //          "This makes obvious the differences in weight strength between excitatory\n"
00106 //          "and inhibitory connections.");
00107 
00108   CONST_I(PPM_WtScale_Count,int(WtScale::Count),False,
00109           "Scale the weights for a given neuron by the number of connections defined.\n"
00110           "Depending upon the values of  ppm_weight_scale_init_count and\n"
00111           "ppm_weight_scale_max_count, this can make obvious the differences in weight\n"
00112           "value between weights to adjacent neurons or between different neurons or\n"
00113           "between the same neurons over time.");
00114 
00115   CONST_I(PPM_WtScale_Active, int(WtScale::Active), False,
00116           "Scale the weights for a given neuron by the number of active (non-dead)\n"
00117           "connections for that neuron.  This makes obvious the differences in\n"
00118           "weight levels between adjacent units, even when many units have been\n"
00119           "pruned, but obscures the increase in weight strength which pruning\n"
00120           "brings about.");
00121 
00122   CONST_I(PPM_WtScale_PeakRelative,int(WtScale::PeakRelative),  False,
00123           "Scale the weights for a given neuron so that the actual maximum value\n"
00124           "present is assigned the maximum value representable in a plot, while\n"
00125           "the minimum is set at zero.  This makes local differences in value\n"
00126           "obvious without obscuring the distinction between zero and nonzero values.");
00127 
00128   CONST_I(PPM_WtScale_Relative,int(WtScale::Relative),  False,
00129           "Scale the weights for a given neuron so that the actual maximum and minimum\n"
00130           "values present are assigned the minimum and maximum values representable in\n"
00131           "a plot.  This always makes obvious the differences between weight values to\n"
00132           "adjacent units, which means that it is easy to use, but it also makes it\n"
00133           "impossible to compare absolute or relative weight values between different\n"
00134           "plots.");
00135 
00136   
00137 //  PARAM_A(blackboard,"ppm_activity_subplot",PPM_RYW,.add_lower_bound(0).add_upper_bound(PPM_MAX_SUBPLOT),
00138 //          "Secondary plot (using e.g. the hue value) for activity plots.\n\n"
00139 //          "Possible settings (starting with PPM_):\n"
00140 //          "  RYW,Grayscale,OcularDominance,Orientation,Selectivity,SingleHue,None");
00141 //
00142 //  PARAM_A(blackboard,"ppm_activity_luminance_offset",0.0,.add_lower_bound(0.0).add_upper_bound(1.0),
00143 //          "Amount to add to the computed value for activity plots using luminance.\n"
00144 //          "Normally this is zero, but if set to e.g. 0.25 in combination with a\n"
00145 //          "ppm_activity_subplot of e.g. orientation, the orientation map can be made\n"
00146 //          "out dimly even in areas where there is no activity.  This can help relate\n"
00147 //          "the activity bubbles to their location on the map.");
00148 //  
00149 //  PARAM_A(blackboard,"ppm_always_mark_neuron",False,.add_lower_bound(False).add_upper_bound(True),
00150 //          "If true, always draw an outline around the neuron that is being plotted\n"
00151 //          "in e.g. a weight plot, and also draw an outline around the RF center of\n"
00152 //          "that neuron on the retina.  Ordinarily the neuron is marked only when\n"
00153 //          "ppm_outline_weights is true and only in the inhibitory plots, since the\n"
00154 //          "center is usually clear on the smaller areas of the afferent and lateral\n"
00155 //          "excitatory plots.");
00156   
00157   PARAM_A(blackboard,"ppm_master_scale",1.0,.add_lower_bound(double(Uninitialized)),
00158           "Ordinarily, this parameter will be set to 1.0, which means to automatically\n"
00159           "compute the minimum plot sizes that will show the full cortex and retina,\n"
00160           "regardless of the settings of ppm_cortex_scale, ppm_retina_scale,\n"
00161           "etc.  If higher-resolution plots are desired, it can be\n"
00162           "set to a larger value, e.g. 2.0 to make all plots twice the normal size.\n"
00163           "Note that larger plots are not strictly multiples of the smaller ones,\n"
00164           "since the higher the resolution, the finer a line can be used for details\n"
00165           "such as outlines.  To handle the scaling yourself, set this parameter to\n"
00166           "Uninitialized and set the aforementioned parameters as you desire.  Note\n"
00167           "that like the other scaling parameters, it is of type double but\n"
00168           "currently only integer multiples are actually used.");
00169   
00170 //  PARAM_A(blackboard,"ppm_afferent_multiplier",100.0,.add_lower_bound(0.0),
00171 //          "Amount by which to multiply afferent weight value to get luminance value for\n"
00172 //          "plots.");
00173 //  
00174 //  PARAM_A(blackboard,"ppm_afferent_subplot",PPM_RYW,.add_lower_bound(0).add_upper_bound(PPM_MAX_SUBPLOT),
00175 //          "Secondary plot (using e.g. the hue value) for afferent weight plots.\n\n"
00176 //          "Possible settings (starting with PPM_):\n"
00177 //          "  RYW,Grayscale,OcularDominance,Orientation,Selectivity,SingleHue,None");
00178 //  
00179 //  PARAM_A(blackboard,"ppm_always_draw_point",True,.add_lower_bound(False).add_upper_bound(True),
00180 //          "Whether ppm_draw_line_at_angle() always draws at least one point, e.g. when \n"
00181 //          "plotting orientation using lines.");
00182   
00183   PARAM_A(blackboard,"ppm_bg_B",double(Uninitialized),.add_lower_bound(double(Uninitialized)).add_upper_bound(1.0),
00184           "Blue component of color of border areas; default is white or\n"
00185           "black depending on ppm_paper_based_colors.");
00186   blackboard.lookup("ppm_bg_B").add_default_expr("(1-ppm_paper_based_colors)*1.0");
00187   
00188   PARAM_A(blackboard,"ppm_bg_G",double(Uninitialized),.add_lower_bound(double(Uninitialized)).add_upper_bound(1.0),
00189           "Green component of color of border areas; default is white\n"
00190           "or black depending on ppm_paper_based_colors.");
00191   blackboard.lookup("ppm_bg_G").add_default_expr("(1-ppm_paper_based_colors)*1.0");
00192   
00193   PARAM_A(blackboard,"ppm_bg_R",double(Uninitialized),.add_lower_bound(double(Uninitialized)).add_upper_bound(1.0),
00194           "Red component of color of border areas; default is white or\n"
00195           "black depending on ppm_paper_based_colors.");
00196   blackboard.lookup("ppm_bg_R").add_default_expr("(1-ppm_paper_based_colors)*1.0");
00197   
00198   PARAM_A(blackboard,"ppm_border",1,.add_lower_bound(0),
00199           "Number of pixels between subsequent plots in the same image; defaults to 3%\n"
00200           "of the image size, subject to a minimum of two.");
00201   
00202 //  PARAM_A(blackboard,"ppm_color_key_num",13,.add_lower_bound(0),
00203 //          "The number of oriented bars to use in a color key when ppm_color_keys is true.");
00204 //  
00205 //  PARAM_A(blackboard,"ppm_color_keys",Uninitialized,.add_lower_bound(Uninitialized).add_upper_bound(True),
00206 //          "Whether or not to draw a color key after a color plot.  By default will draw\n"
00207 //          "one if color-coded orientation was used.");
00208 //  
00209 //  PARAM_A(blackboard,"ppm_combine_alternate_eyes",False,.add_lower_bound(False).add_upper_bound(True),
00210 //          "If there is more than one eye (and an even number total), plot them by twos\n"
00211 //          "where the second half of each pair is subtracted from the first.  This is\n"
00212 //          "useful for e.g. ON and OFF cell layers created using Blur_DoGGoD.  This\n"
00213 //          "option will need more work to be very useful except with a very limited\n"
00214 //          "range of absolute unnormalized weights, since right now weights are\n"
00215 //          "normalized independently between the two subtracted values (which has\n"
00216 //          "poor results.)");
00217 //  
00218 //  PARAM_A(blackboard,"ppm_cortex_scale",double(Uninitialized),.add_lower_bound(double(Uninitialized)),
00219 //          "Scaling factor when plotting cortex.  Defaults to autoscale to match retina.\n"
00220 //          "At the moment only integer values are used, to ensure that plots always devote\n"
00221 //          "the same number of pixels to each neuron (to prevent confusion).  As a result\n"
00222 //          "plots will not be shown if the scale is less than 1.  This restriction may be\n"
00223 //          "relaxed in the future.");
00224 //  
00225 //  PARAM_A(blackboard,"ppm_end_i",int(Uninitialized),.add_lower_bound(int(Uninitialized)),
00226 //          "By default, the entire cortex is plotted, but when ppm_master_scale is\n"
00227 //          "Uninitialized, this parameter is one higher than the last pixel plotted\n"
00228 //          "in the X direction.");
00229 //  
00230 //  PARAM_A(blackboard,"ppm_end_j",int(Uninitialized),.add_lower_bound(int(Uninitialized)),
00231 //          "By default, the entire cortex is plotted, but when ppm_master_scale is\n"
00232 //          "Uninitialized, this parameter is one higher than the last pixel plotted\n"
00233 //          "in the Y direction.");
00234 //  
00235 //  PARAM_A(blackboard,"ppm_end_x",int(Uninitialized),.add_lower_bound(int(Uninitialized)),
00236 //          "By default, the entire retina is plotted, but when ppm_master_scale is\n"
00237 //          "Uninitialized, this parameter is one higher than the last pixel plotted\n"
00238 //          "in the X direction.");
00239 //  
00240 //  PARAM_A(blackboard,"ppm_end_y",int(Uninitialized),.add_lower_bound(int(Uninitialized)),
00241 //          "By default, the entire retina is plotted, but when ppm_master_scale is\n"
00242 //          "Uninitialized, this parameter is one higher than the last pixel plotted\n"
00243 //          "in the Y direction.");
00244 //  
00245 //  PARAM_A(blackboard,"ppm_histo_scale_factor",0.25,.add_lower_bound(0.0),
00246 //          "Ratio applied to the size of a cortex plot to get the width of an accompanying\n"
00247 //          "histogram.");
00248 //  
00249 //  PARAM_A(blackboard,"ppm_histo_percentage_range",25.0,.add_lower_bound(0.0).add_upper_bound(100.0),
00250 //          "Range of an activity histogram, peak to peak, as a percentage.");
00251   
00252   PARAM_A(blackboard,"ppm_histograms",True,.add_lower_bound(False).add_upper_bound(True),
00253           "Whether to include activity histograms with plots, if such data is\n"
00254           "available, e.g. from a call to measure_stimulus_map.");
00255   
00256   PARAM_A(blackboard,"ppm_mainplot",True,.add_lower_bound(False).add_upper_bound(True),
00257           "Whether to include the primary plot for this plot type.  Primarily useful with\n"
00258           "ppm_histograms=False, to get a plot of only the histograms, e.g. with\n"
00259           "plot_unit_range.");
00260   
00261   PARAM_A(blackboard,"ppm_interior_border",-0.03,,
00262           "Number of pixels to skip between internal image features, e.g. orientation\n"
00263           "lines.  If negative, this value is used as a scaling factor relative to the\n"
00264           "smaller of the largest width and largest height of a region; scaling with\n"
00265           "respect to that value gives visually similar borders for regions with\n"
00266           "different sizes (after bitmap scaling to match).");
00267   
00268   PARAM_A(blackboard,"ppm_interior_outline",False,.add_lower_bound(False).add_upper_bound(True),
00269           "Whether or not to outline smaller maps which appear inside of larger ones,\n"
00270           "e.g. for plot_afferent_weight_map");
00271   
00272   PARAM_A(blackboard,"ppm_image_viewer",string("xv -expand 4 -raw"),,
00273           "External program to spawn when an image is created, spawn_viewer is\n"
00274           "true, and running_remotely is false.");
00275   
00276 //  PARAM_A(blackboard,"ppm_lateral_multiplier",700.0,.add_lower_bound(0.0),
00277 //          "Amount by which to multiply lateral weight value to get luminance value for\n"
00278 //          "plots.");
00279 //  
00280 //  PARAM_A(blackboard,"ppm_lateral_subplot",PPM_RYW,.add_lower_bound(0).add_upper_bound(PPM_MAX_SUBPLOT),
00281 //          "Secondary plot (using e.g. the hue value) for lateral weight plots.\n\n"
00282 //          "Possible settings (starting with PPM_):\n"
00283 //          "  RYW,Grayscale,OcularDominance,Orientation,Selectivity,SingleHue,None");
00284   
00285   PARAM_A(blackboard,"ppm_line_B",double(Uninitialized),.add_lower_bound(double(Uninitialized)).add_upper_bound(1.0),
00286           "Blue component of color of lines to be drawn on an image;\n"
00287           "default is dynamically chosen to have good contrast with the area of the\n"
00288           "image being overwritten.");
00289   blackboard.lookup("ppm_line_B").add_default_expr("ppm_paper_based_colors*1.0");
00290   
00291   PARAM_A(blackboard,"ppm_line_G",double(Uninitialized),.add_lower_bound(double(Uninitialized)).add_upper_bound(1.0),
00292           "Green component of color of lines to be drawn on an image;\n"
00293           "default is dynamically chosen to have good contrast with the area of the\n"
00294           "image being overwritten.");
00295   blackboard.lookup("ppm_line_G").add_default_expr("ppm_paper_based_colors*1.0");
00296   
00297   PARAM_A(blackboard,"ppm_line_R",double(Uninitialized),.add_lower_bound(double(Uninitialized)).add_upper_bound(1.0),
00298           "Red component of color of lines to be drawn on an image; default is dynamically\n"
00299           "chosen to have good contrast with the area of the image being overwritten.");
00300   blackboard.lookup("ppm_line_R").add_default_expr("ppm_paper_based_colors*1.0");
00301   
00302 //  PARAM_A(blackboard,"ppm_line_orientation_subplot",PPM_SELECTIVITY,.add_lower_bound(0).add_upper_bound(PPM_MAX_SUBPLOT),
00303 //          "Secondary plot (using the line length of orientation lines) for orientation\n"
00304 //          "map plots.\n\n"
00305 //          "Possible settings (starting with PPM_): Selectivity,None");
00306 //  
00307 //  PARAM_A(blackboard,"ppm_line_plots",False,.add_lower_bound(False).add_upper_bound(True),
00308 //          "Whether to draw line plots (e.g. for orientation or weights) as opposed to \n"
00309 //          "(or in addition to) shaded plots.");
00310 //  
00311 //  PARAM_A(blackboard,"ppm_line_selectivity_multiplier",50.0,.add_lower_bound(0.0),
00312 //          "Amount by which to multiply orientation selectivity to get line length for\n"
00313 //          "plots.");
00314 //  
00315 //  PARAM_A(blackboard,"ppm_luminance_multiplier",1.0,.add_lower_bound(0.0),
00316 //          "Amount by which to multiply activity to get luminance value for plots.");
00317 //  
00318 //  PARAM_A(blackboard,"ppm_minimal_outline",False,.add_lower_bound(False).add_upper_bound(True),
00319 //          "Whether to outline the active lateral weights only, or all of those\n"
00320 //          "currently allowed.  If true, outlines only those units with weights greater\n"
00321 //          "than ppm_weight_threshold.");
00322 //  
00323 //  PARAM_A(blackboard,"ppm_neuron_ioffset_line",0,.add_lower_bound(0),
00324 //          "Horizontal offset for skipping when ppm_neuron_skip_line is not 1.  This\n"
00325 //          "determines where the cycles start.  It is usually zero but can be set\n"
00326 //          "to some other value X such that (0 < X < ppm_neuron_skip_line) to ensure\n"
00327 //          "that a particular neuron is actually drawn.");
00328 //  
00329 //  PARAM_A(blackboard,"ppm_neuron_joffset_line",0,.add_lower_bound(0),
00330 //          "Vertical offset for skipping when ppm_neuron_skip_line is not 1.  This\n"
00331 //          "determines where the cycles start.  It is usually zero but can be set\n"
00332 //          "to some other value X such that (0 < X < ppm_neuron_skip_line) to ensure\n"
00333 //          "that a particular neuron is actually drawn.");
00334 //  
00335 //  PARAM_A(blackboard,"ppm_neuron_skip_line",1,.add_lower_bound(1),
00336 //          "Draw every nth neuron only, for line plots.");
00337   
00338   PARAM_A(blackboard,"ppm_neuron_skip_aff",1,.add_lower_bound(1),
00339           "Draw every nth neuron only, for afferent weight map plots.");
00340   
00341 //  PARAM_A(blackboard,"ppm_ocular_dominance_subplot",PPM_RYW,.add_lower_bound(0).add_upper_bound(PPM_MAX_SUBPLOT),
00342 //          "Type of plot for ocular dominance map plots.\n\n"
00343 //          "Possible settings (starting with PPM_):\n"
00344 //          "  RYW,Grayscale,Selectivity,SingleHue,None");
00345 //  
00346 //  PARAM_A(blackboard,"ppm_orientation_subplot",PPM_NONE,.add_lower_bound(0).add_upper_bound(PPM_MAX_SUBPLOT),
00347 //          "Secondary plot (using e.g. the luminance value) for orientation map plots.\n\n"
00348 //          "Possible settings (starting with PPM_): Grayscale,Selectivity,None\n"
00349 //          "See the documentation for those options for more details.");
00350 //  
00351 //  PARAM_A(blackboard,"ppm_outline_retina",True,.add_lower_bound(False).add_upper_bound(True),
00352 //          "Whether to draw a line around the active area of the retina, i.e. the area\n"
00353 //          "not included in the retina_edge_buffer region, when retina_edge_buffer is\n"
00354 //          "nonzero.  See also ppm_retina_edge_buffer_suppress.");
00355   
00356   PARAM_A(blackboard,"ppm_outline_weights",True,.add_lower_bound(False).add_upper_bound(True),
00357           "Whether to draw a line around the active weight area plotted on maps of the\n"
00358           "cortex.");
00359   
00360   PARAM_A(blackboard,"ppm_outline_width",1,.add_lower_bound(0),
00361           "Number of pixels to use for intra-picture outlines.");
00362   
00363   PARAM_A(blackboard,"ppm_page_B",0.5,.add_lower_bound(0.0).add_upper_bound(1.0),
00364           "Blue component of color of page background.");
00365   
00366   PARAM_A(blackboard,"ppm_page_G",0.5,.add_lower_bound(0.0).add_upper_bound(1.0),
00367           "Green component of color of page background.");
00368   
00369   PARAM_A(blackboard,"ppm_page_R",0.5,.add_lower_bound(0.0).add_upper_bound(1.0),
00370           "Red component of color of page background.");
00371   
00372   PARAM_A(blackboard,"ppm_paper_based_colors",False,.add_lower_bound(False).add_upper_bound(True),
00373           "Usually, the colors are suitable for video, with black backgrounds and \n"
00374           "luminance encoding the weight or activation level.  For paper plots, this\n"
00375           "parameter can be set to 1 so that white backgrounds are used and saturation\n"
00376           "will encode the level.");
00377   SETFNOBJ_DEFINE2(this,ppm_paper_based_colors,color_param_setfn2);
00378   
00379 //  PARAM_A(blackboard,"ppm_paper_based_retina",Uninitialized,.add_lower_bound(Uninitialized).add_upper_bound(True),
00380 //          "If set to Boolean value other than Uninitialized, whether to consider\n"
00381 //          "ppm_paper_based_colors true for the retina regardless of its global value.");
00382 //  
00383 //  PARAM_A(blackboard,"ppm_reference_angle",0.0,.add_lower_bound(0.0).add_upper_bound(180.0),
00384 //          "When setting luminance for monochrome orientation plots, this will be the\n"
00385 //          "angle (in degrees) at which luminance is zero.");
00386   
00387   PARAM_A(blackboard,"ppm_remote_viewer",string("anytoascii"),,
00388           "External program to spawn when an image is created, spawn_viewer is\n"
00389           "true, and running_remotely is true.");
00390   
00391 //  PARAM_A(blackboard,"ppm_retina_scale",double(Uninitialized),.add_lower_bound(double(Uninitialized)),
00392 //          "Scaling factor when plotting retina.  Defaults to autoscale to match cortex.\n"
00393 //          "At the moment only integer values are used, to ensure that plots always devote\n"
00394 //          "the same number of pixels to each retinal unit (to prevent confusion).  As a\n"
00395 //          "result plots will not be shown if the scale is less than 1.  This restriction\n"
00396 //          "may be relaxed in the future.");
00397 //  
00398 //  PARAM_A(blackboard,"ppm_retina_subplot",PPM_RYW,.add_lower_bound(0).add_upper_bound(PPM_MAX_SUBPLOT),
00399 //          "Secondary plot (using e.g. the hue value) for retinal activation plots.\n\n"
00400 //          "Possible settings (starting with PPM_):\n"
00401 //          "  RYW,Grayscale,Orientation,SingleHue,None");
00402 //  
00403 //  PARAM_A(blackboard,"ppm_retina_edge_buffer_suppress",False,.add_lower_bound(False).add_upper_bound(True),
00404 //          "If true, will only plot the active area of the retina, i.e. the area\n"
00405 //          "not included in the retina_edge_buffer region.  See also ppm_outline_retina.");
00406 
00407   PARAM_A(blackboard,"ppm_selectivity_multiplier",16,.add_lower_bound(0.0),
00408           "Amount by which to multiply orientation selectivity to get luminance value\n"
00409           "for plots.  Appropriate value varies, depending on how selectivity is\n"
00410           "measured.");
00411 
00412 //  PARAM_A(blackboard,"ppm_shaded_plots",True,.add_lower_bound(False).add_upper_bound(True),
00413 //          "Whether to draw shaded plots, including color and mono plots (e.g. for \n"
00414 //          "orientation). (Not necessarily exclusive of ppm_line_plots.)");
00415 //
00416 //  PARAM_I(PARAM_3BOOL,  ppm_spawn_viewer,Uninitialized,True,
00417 //          "Alias for spawn_viewer; whether to spawn an external program (specified by\n"
00418 //          "ppm_image_viewer) to view an image when it is created.");
00419   
00420   PARAM_A(blackboard,"ppm_spawn_independent_viewers",True,.add_lower_bound(False).add_upper_bound(True),
00421           "When spawn_viewer is true, whether to spawn for every image, or just the first\n"
00422           "one.");
00423   
00424 //  PARAM_A(blackboard,"ppm_start_i",int(Uninitialized),.add_lower_bound(int(Uninitialized)),
00425 //          "By default, the entire cortex is plotted, but when ppm_master_scale is\n"
00426 //          "Uninitialized, this parameter sets the first pixel plotted in the X direction.");
00427 //  
00428 //  PARAM_A(blackboard,"ppm_start_j",int(Uninitialized),.add_lower_bound(int(Uninitialized)),
00429 //          "By default, the entire cortex is plotted, but when ppm_master_scale is\n"
00430 //          "Uninitialized, this parameter sets the first pixel plotted in the Y direction.");
00431 //  
00432 //  PARAM_A(blackboard,"ppm_start_x",int(Uninitialized),.add_lower_bound(int(Uninitialized)),
00433 //          "By default, the entire retina is plotted, but when ppm_master_scale is\n"
00434 //          "Uninitialized, this parameter sets the first pixel plotted in the X direction.");
00435 //  
00436 //  PARAM_A(blackboard,"ppm_start_y",int(Uninitialized),.add_lower_bound(int(Uninitialized)),
00437 //          "By default, the entire retina is plotted, but when ppm_master_scale is\n"
00438 //          "Uninitialized, this parameter sets the first pixel plotted in the Y direction.");
00439 
00440   PARAM_A(blackboard,"ppm_subplot_hue",-1.0,.add_lower_bound(-1.0).add_upper_bound(1.0),
00441           "The hue (in terms of Hue, Saturation, and Value) to use when a colorspec is\n"
00442           "set to SpecifiedHue.");
00443   
00444 //  PARAM_A(blackboard,"ppm_ui",int(Uninitialized),.add_lower_bound(int(Uninitialized)),
00445 //          "Denotes x-coordinate of unit to graph as a secondary plot, e.g. as lateral\n"
00446 //          "weights on top of another plot.");
00447 //  
00448 //  PARAM_A(blackboard,"ppm_uj",int(Uninitialized),.add_lower_bound(int(Uninitialized)),
00449 //          "Denotes y-coordinate of unit to graph as a secondary plot, e.g. as lateral\n"
00450 //          "weights on top of another plot.");
00451 //  
00452 //  PARAM_A(blackboard,"ppm_value_offset",0.1,.add_lower_bound(0.0).add_upper_bound(1.0),
00453 //          "Determines the offset of the range of values used for HSV coordinates.\n"
00454 //          "Not always used; check to make sure for a particular plot.");
00455 //  
00456 //  PARAM_A(blackboard,"ppm_value_range",0.6,.add_lower_bound(0.0).add_upper_bound(1.0),
00457 //          "Determines the range of Values used for HSV coordinates.  Not always used;\n"
00458 //          "check to make sure for a particular plot.");
00459   
00460   PARAM_A(blackboard,"ppm_weight_threshold",DEATH_FLAG,,
00461           "Strength of weight to consider active for weight plots.");
00462 
00463 //  PARAM_A(blackboard,"ppm_weight_scale_init_count",True,.add_lower_bound(False).add_upper_bound(True),
00464 //          "When plotting weights on a scale relative to the number of connections\n"
00465 //          "(ppm_weight_scale_type == Count), whether to base the scale on\n"
00466 //          "the number of connections defined at the start of the simulation, as\n"
00467 //          "opposed to the number currently defined.  If set to True, makes obvious\n"
00468 //          "the increase in weight strength when a radius is decreased, but obscures\n"
00469 //          "the differences between the connections of a given unit to adjacent units.\n"
00470 //          "Only important for a connection type whose radius changes over time.");
00471 //  
00472 //  PARAM_A(blackboard,"ppm_weight_scale_max_count",True,.add_lower_bound(False).add_upper_bound(True),
00473 //          "When plotting weights on a scale relative to the number of connections\n"
00474 //          "(ppm_weight_scale_type == Count or Inhib), whether to base the scale on\n"
00475 //          "the maximum number of connections of the given type possible for any\n"
00476 //          "neuron, or else to use the number possible for this particular neuron.\n"
00477 //          "If set to True, makes obvious any differences in weight values from a\n"
00478 //          "given unit to adjacent units, while obscuring the different absolute\n"
00479 //          "weight values between units in the center and those near the border.\n"
00480 //          "Only important for units near the border.");
00481   
00482   PARAM_A(blackboard,"ppm_weight_scale_type",int(WtScale::PeakRelative),.add_lower_bound(0).add_upper_bound(int(WtScale::Relative)),
00483           "Type of scaling to use for weight plots.  Possible settings (starting with\n"
00484           "PPM_WtScale_):\n\n"
00485           
00486           "  Fixed\n"
00487           "  Inhib\n"
00488           "  Count\n"
00489           "  Active\n"
00490           "  PeakRelative\n"
00491           "  Relative\n\n"
00492           
00493           "The first type uses a fixed scale for each weight type.  This makes it simple\n"
00494           "to compare different plots, since they will be on the same scale, but often\n"
00495           "individual plots will fail to show detail in the differences between\n"
00496           "adjacent units' weight values.  The last type has the opposite virtues and\n"
00497           "faults: each individual plot shows the maximum possible detail, but the\n"
00498           "absolute values of the weights are impossible to determine.  Those types in\n"
00499           "between reflect a different setting of this tradeoff between highlighting\n"
00500           "differences in a single plot, versus being able to compare plots and\n"
00501           "determine absolute weight levels.\n\n"
00502           
00503           "When using any of these types besides PPM_WtScale_Fixed, be sure to keep in\n"
00504           "mind that the absolute weight values depend upon the number of connections of\n"
00505           "that type active for that neuron, which in turn depends upon the connection\n"
00506           "radius, whether connections are square or circular, how close the neuron is\n"
00507           "to the border, and the connection death level.  See the parameters\n"
00508           "ppm_weight_scale_init_count and ppm_weight_scale_max_count to change\n"
00509           "how the scaling depends on the connection counts.\n\n"
00510 
00511           "The effective values of cortical weights also depend upon the cortical weight\n"
00512           "scaling factors gamma_exc and gamma_inh; none of the weight plots currently\n"
00513           "take these parameters' values into account.");
00514 }
00515 
00516 
00517 
00518 cmdstat NeuralRegionMap::color_param_setfn2(const string&, Typeless& existing, const Typeless& requested)
00519 {
00520   existing.set(requested);
00521   const CmdParamStringParser p(blackboard);
00522   blackboard.lookup("ppm_bg_R").update_default_value(p);
00523   blackboard.lookup("ppm_bg_G").update_default_value(p);
00524   blackboard.lookup("ppm_bg_B").update_default_value(p);
00525   blackboard.lookup("ppm_line_R").update_default_value(p);
00526   blackboard.lookup("ppm_line_G").update_default_value(p);
00527   blackboard.lookup("ppm_line_B").update_default_value(p);
00528   
00529   return CMD_NO_ERROR;
00530 }
00531 
00532 

Generated on Mon Jan 20 02:35:45 2003 for RF-LISSOM by doxygen1.3-rc2