###################################################################
LATEST EMAIL UPDATE: 21 Aug 2013
###################################################################

I just updated the csurf and FreeSurfer
distributions on zakros once again.

Note that I always also update the *source*
tarfiles here, for example:

   zakros:~inverse/freesurfer/old/csurfsrc-130821.tgz

I had introduced a showstopper bug (a
missing '#') that broke VOLUME-STATS.

I also now include the fix that auto-grows
the stack to avoid a surfclust crash in
rare circumstances.

Here is how to do that in C, for reference:

==========================================================================
#include <sys/resource.h>  /* setrlimit() */

   struct rlimit  rl;
   const rlim_t   bigstacksize=48L*1024L*1024L;   /* e.g., def 8Meg -> 48Meg */

   getrlimit(RLIMIT_STACK,&rl);
   printf("program: starting stacksize: %d kb\n",(int)(rl.rlim_cur/1024));
   if (rl.rlim_cur < bigstacksize) {
     rl.rlim_cur = bigstacksize;
     if ((ecode=setrlimit(RLIMIT_STACK, &rl)))
       printf("program: ### error increasing stacksize (ret=%d)\n",ecode);
     else
       printf("program: increased stacksize: %d kb\n",(int)(rl.rlim_cur/1024));
   }
==========================================================================

I updated several usages, esp. the one
for fourier which gives better examples,
and the one for multiclust, which explains
how to use it.

And finally, I ported FreeSurferEnv.csh
to sh/bash (as FreeSurferEnv.sh) so
csurf/FreeSurfer0.8 can be used without
having to install tcsh by doing:

   source FreeSurferEnv.sh

You can test this with:

   bash
   cd $CSURF_DIR
   source FreeSurfer.sh
   csurf

Spurred on by the Wang paper I sent,
I have finally started hacking the
region growing method of more objectively
finding visual areas (I am such a
delay-er!! this was the stated reason
I forked freesurfer and started
recompiling my own version in
2010...).

The idea is:

   --read in both ecc and pol data to tksurfer (as is done for fieldsign)
   --put down a random seed
   --start growing a connected area as long as the ecc,pol position
       of the representation does not overlap already in the list
   --when this is done, mark the borders of the path
   --do this with thousands of seeds
   --generate an image with all the borders at once to find
       the consensus borders between representations in a
       more objective way

cheers,
marty

##############
UPDATE DETAILS
##############

### UPDATE: 21 Aug 2013
--csurf: accidentally missing '#' broke VOLUME-STATS
--FreeSurferEnv.sh: ported from csh version, warn/bail PATH/LD_PATH w/space
--FreeSurferEnv.csh: warn if spaces, rm cleanup, warn/bail LD_PATH w/space
--randsurfclust.cpp: better help
--fourier.c: update/extend usage Examples
--csurflibs/cdflib/{cdflib.h,cdf_79.c}: "char*" => "const char*" to fix warn
--multiclust.cpp: better help
--surflib.c,h: "char *fmt" -> "const char *fmt" to fix Error,PrintMsg warnfest
--multiclust.cpp: cp surfclust growstack fix to here, just in case
--surfclust.cpp: stacksize 8M->48M  for deep recursive growCluster (e.g. 1 big)
--FreeSurferEnv.csh: "xset fp default" before add to clean (my) stale, no bloat
--lib/help/tksurfer/{xrot,yrot,zrot,winxy} help
--tksurfer.tcl: x,y,zrot, winxy help pop-ups

### UPDATE: 18 Aug 2013
--mk0: also write tk{medit,register,surfer} pop-ups help to CSURF_HELP.txt
--tkmedit.tcl: surf2col ("2" checkbutton), im{entry,R,W} R-click help
--lib/help/tkmedit/{surf2col,imentry,imread,imwrite,im2read}
--tksurfer.tcl: fix accept-suff-on-surf bug that was removing $hemi.sphere
--srcdir,mk0,FreeSurferEnv.csh: mv fonts/ISO8859-2 lib/fonts/ISO8859-2
--mk0: mk links to 32bit Linux bin/libdirs so 32bit CentOS compile runs on 64bit
--lib/help/tksurfer/{revphase,fill2area,fill2num,fill2rad,smooth,rgb}
--tksurfer.tcl: fix revphaseflag helpwin bind, fix R-click report of saved rgbs

### UPDATE: 10 Aug 2013
--tksurfer.c: add .mgz centoffset for Talairach to find_orig_vertex_coordinates,
   select_talairach_point,write_dipoles,write_timecourse,write_label_timecourses
--tksurfer.c: read c_{r,a,s} from orig.mgz at startup, warn missing (assume 0)
...




