00001
00007 #ifndef __PPM_DRAW_H__
00008 #define __PPM_DRAW_H__
00009
00010
00011 #include <stdio.h>
00012 #include "lissom.h"
00013 #include "file_io.h"
00014
00015
00016 #ifndef IMG_SIZE_X
00017 #define IMG_SIZE_X 1024
00018
00019 #endif
00020 #ifndef IMG_SIZE_Y
00021 #define IMG_SIZE_Y 240
00022
00023 #endif
00024
00025
00028 typedef int LOff;
00029
00030
00031 extern double ppm_master_scale;
00032 extern double ppm_cortex_scale;
00033 extern int ppm_border;
00034 extern int ppm_end_i;
00035 extern int ppm_end_j;
00036 extern int ppm_histograms;
00037 extern int ppm_start_i;
00038 extern int ppm_start_j;
00039 extern int ppm_ui;
00040 extern int ppm_uj;
00041 extern int& ppm_spawn_viewer;
00042 extern int ppm_combine_alternate_eyes;
00043
00044
00045 extern int ppm_height;
00046
00047
00048 void ppm_init_hook(void);
00049 void ppm_bitmap_initialize( void );
00050 int ppm_cortex_height(void);
00051
00052 void ppm_draw_afferent_weight_map(const char* filename, int eye, int baseline_eye=Uninitialized);
00053
00054 LOff ppm_draw_activity(double activity[NMAX][NMAX], int left_offset);
00055 LOff ppm_draw_afferent_weights(int center_x, int center_y, a_weight
00056 weights[WTMAX][WTMAX], int ui, int uj, int
00057 left_offset);
00058 LOff ppm_draw_angle_histogram( OrientationHistogram histo, int symmetric, int left_offset);
00059 LOff ppm_draw_angle_histogram_difference( OrientationHistogram poshisto,
00060 OrientationHistogram neghisto,
00061 int left_offset);
00062
00063 LOff ppm_draw_lateral_weights(int ui, int uj, l_weight *weights, int radius,
00064 int ar_width, int left_offset,
00065 int isInhWts, int mark_neuron);
00066 LOff ppm_draw_ocular_dominance(double od_pref_array[NMAX][NMAX]);
00067 LOff ppm_draw_or_pref(int or_preferences[NMAX][NMAX], double
00068 or_selectivities[NMAX][NMAX], bool selectivity_only, int left_offset);
00069 LOff ppm_draw_or_color_key(int num_examples, int key_length, int vertical, int left_offset);
00070 LOff ppm_draw_orientations(int or_preferences[EYE_ARRAY_SIZE][NMAX][NMAX],
00071 double or_selectivities[EYE_ARRAY_SIZE][NMAX][NMAX],
00072 bool selectivity_only=false);
00073 LOff ppm_draw_presentation(double input_v[RNMAX*RNMAX],
00074 double init[NMAX][NMAX],
00075 double settled[NMAX][NMAX] );
00076 LOff ppm_draw_retina(int eye, double input_v[RNMAX*RNMAX], int left_offset);
00077 LOff ppm_draw_weights(int ui, int uj );
00078
00079 int ppm_presentation_height(void);
00080 int ppm_write_to_file( const char* filename, const char *comments, int width, int height, int max_val );
00081
00082 #endif