Aug 13, 2005  NOTES: runs on x86_64 but remote display coredump
Mar 09, 2005  Fedora3 fonts, struct:AFNIautoalign/saveparms, dconv:polort/opts
Sep 08, 2004  batch RandBlock, fourier omitfreq, rel stim1Ds, chkfonts, help
Jun 29, 2004  3dDeconvolve panel, explicit fieldsign surf, mris_flatten args
May 19, 2004  fix fieldsign defaults/parmcheck bug (introduced prev tarball)
Mar 22, 2004  [csurf34p has new panel to run 3dDeconvolve -- no docs yet]
Jan 22, 2004  no fourier coredump with 512 time steps
Dec 30, 2003  RH9 MINC fixed! add 'setenv LANG en_US' to FreeSurferDefs.csh
Oct 17, 2003  no-render-panel option View All Scandirs, fix kill other tkmedit
Oct 16, 2003  SessionTools -> View All Scandirs panel now renders
Oct 13, 2003  fixed csurf call to rcxcombine, added View All Scandirs panel
Oct 10, 2003  non-script realsurfavg (rcxcombine), render defs, savergb test
Sep 17, 2003  fixed defaults-setting bug
Sep 11, 2003  import funct (AFNI BRIK specific) panel, LSB/MSB, render defaults
Jul 18, 2003  latest: fix complex-valued vtx search, fourier panel trunc

This is the current tarball of the retinotopy-capable UCSD FreeSurfer
(modified from the initial summer 2000 FreeSurfer distribution):

  http://kamares.ucsd.edu/~sereno/csurf/tarballs/FreeSurfer0.8.tar.gz

The tree has both Linux and IRIX binaries in it. There is another small
file to set up paths and switch between different distros (such as more
recent fsdist's from MGH):

  http://kamares.ucsd.edu/~sereno/csurf/tarballs/FreeSurfer.cshrc

This FreeSurfer tarball can be unpacked/installed anywhere.  Put the
FreeSurfer.cshrc file in an "etc" directory directory parallel to the
place where you unpack the FreeSurfer directory.  For example, to
install things in /usr/local, assuming you downloaded the files to
/tmp:

  su -
  cd /usr/local
  gzip -cd /tmp/FreeSurfer0.8.tar.gz | tar xvf -
  [mkdir /usr/local/etc]
  cp /tmp/FreeSurfer.cshrc /usr/local/etc

To update a distribution if you already downloaded one, just move the
existing one aside and untar a new one in its place:

  su -
  cd /usr/local
  mv FreeSurfer0.8 FreeSurfer0.8_2004a
  gzip -cd /tmp/FreeSurfer0.8.tar.gz | tar xvf -

To just update csurf, download the csurf in updates (e.g., to /tmp) and:

  cp /tmp/csurf $CSURF_DIR/bin/noarch/csurf
  chmod ugo+x $CSURF_DIR/bin/noarch/csurf

Edit the FreeSurfer.cshrc file to fix the "instdir" variable (only if
you didn't install things in /usr/local).  If you have a central place
where multiple users are going to store cortical surface reconstructions
and functional data, you can also change the default settings in
FreeSurfer.cshrc for SUBJECTS_DIR and FUNCTIONALS_DIR.  By default they
are set to the (empty) sessions and subjects directories in the
FreeSurfer0.8 tree (where you might want to install an example subject
and session).  This tarball can be installed parallel to an MGH
tarball.  FreeSurfer.cshrc is designed to clean up user paths so that
you can switch cleanly between distributions (edit the "cleaninstead"
part of FreeSurfer.cshrc).

Then, each user then only needs to add one line to their .cshrc
(or .tcshrc) file, which sources these site-specific defs:

  source /usr/local/etc/FreeSurfer.cshrc 

If they want to override the site-specific subjects and sessions
defaults they can add two more lines (after the one above) to
their .cshrc file:

  setenv SUBJECTS_DIR    /some/other/subjects
  setenv FUNCTIONALS_DIR /some/other/sessions

To start up the program, type

  newdefs   => sets paths to FreeSurfer0.8, adds a few aliases
  csurf     => starts csurf

To diagnose problems, open up the log view in csurf

  Preferences -> View Logs

To read the documentation, do:

  surfdoc

or click on an item in the Help menu on the right side of the
csurf interface (this is the only place to get documentation
on the extended retinotopy support in this csurf).

To quickly navigate on the command line, try these aliases

  lsf MS         list any functional scan containing the initials "MS"
  cds martys     cd into subjects scripts dir (current SUBJECTS_DIR)
  cdf 011428MS   cd into functional scripts dir (current FUNCTIONALS_DIR)

FreeSurfer0.8 runs on SGI/IRIX 6.5 and Linux/Intel.  In both cases,
a minimum of 256 MB is required to run the program (512 MB is better).
If Linux xv complains about shared lib libpng.so.2 not found, make this
link (as root):

  cd /usr/lib
  ln -s libpng.so.3.1.2.5 libpng.so.2

The other tarball in here is an even older, more manually-configured,
retinotopy-capable IRIX-only distribution that cannot read
topology-corrected surfaces (runs faster on old SGI's):

  http://kamares.ucsd.edu/~sereno/csurf/tarballs/FreeSurfer0.7.tar.gz

If you use any of this software for a publication, cite:

  Dale, A.M. and M.I. Sereno, Improved localization of cortical activity by
  combining EEG and MEG with MRI cortical surface reconstruction: A linear
  approach. Journal of Cognitive Neuroscience, 1993. 5(2): p. 162-176.

  Dale, A.M., B. Fischl, and M.I. Sereno, Cortical Surface-Based Analysis I:
  Segmentation and Surface Reconstruction. NeuroImage, 1999. 9: p. 179-194.

  Fischl, B., M.I. Sereno, and A.M. Dale, Cortical Surface-Based Analysis II:
  Inflation, Flattening, a Surface-Based Coordinate System. NeuroImage, 1999.
  9: p. 195-207.

  Fischl, B., A. Liu, and A.M. Dale, Automated Manifold Surgery: Constructing
  Geometrically Accurate and Topologically Correct Models of the Human
  Cerebral Cortex. IEEE Transactions on Medical Imaging., 2001. 20(1): p.
  70-80.

Martin Sereno
UCSD Cognitive Science
sereno@cogsci.ucsd.edu

============================================================================
recent csurf bugfixes, updates
============================================================================
...
186) functscan: add copy current funct registerdat to all other functs button
187) move/generalize 3dvolreg: now on functscan panel, one-to-one or all-to-one
188) swap bytes (back) for 3dvolreg output on Linux
189) warn earlier on alignscan-not-already-COR
190) new documentation for Setup Funct, Rawaverage, Fourier, Fieldsign, Batch
191) purge config'd+rm'd dirs in findaligns/vregtarg/rawavgfunct, array combos
192) Setup Funct panel Alt-a opens afni in the selected scandir
193) funct action buttons save datfile (batch before interactive action PAINTS)
194) better polar/eccen angle_offset render defaults
195) break down actions in Batch panel (e.g., redo Fourier for F-stats)
196) render volume button now works for f stats calculated from Fourier
197) fixed Align/Funct Center offset transformation
198) warn render subj/namefile mismatch (e.g., bad subjdir => paints curr surf!)
199) mknewfunct: change subjectsdir if subject found in different subjectsdir
200) also warn subj/namefile mismatch for: regfunct,fourier,fs,medtestrender
201) fix byteorder parm in afni header (after 2swap undoes 3dvolreg's byteswap)
202) convertem (tcl script for auto-unpacking Siemens Vision: COR-only!)
203) tix bug workaround for structscan panels w/period in name
204) File -> New Subject (no longer retains mri/orig config from prev subj)
205) add controls for paint-search-max-normal-to-vtx to Funct/ExtStats panels
206) annoying pop-up panel delays in Linux fixed
207) detect/force MSB brik: regfunct, regstruct, fourier
208) add "Use Interleave Timing" to Fourier panel
209) enter alignscan and functscan shift-means (vs. align/funct diff in funct)
210) rawavg/sigavg inherit dmax,dstep,shift-mean from first-in-list 
211) fix calls to forcebrikMSB (was missing abs path)
212) fix broken mri_head read of HEAD for struct READ HEADER
213) bind F1-4 in addition to ctrl-F1-4 (kde ctrl-F1-4 bindings interfere)
214) make 3dvolreg write out motion parms
215) new Import 3D Stats panel for AFNI: readheader/extract/mask/thresh/cluster
216) Extract Stats now in batch panel
217) Renderpanel radio: render 1) one, 2) last(extracted), 3) all(except cmplx)
218) More Help -> Hand Normalize, Import 3D Stats, View Functional Data
219) write csurf.dat in correct dir even if change subject during SubjectTools
220) override render rgbname="-multiple-" if last/all, but only one vertex file
221) disable editing of value/mask entries in AFNI MULTI subpanel
222) save parms after Import 3D Stats EXTRACT/CONVERT (initial run as batch OK)
223) insert AFNI MULTI prefix/infix when multiextract extracts only one
224) check if NOTES file is writable
225) update Linux mri_segment so white high/low lim and gray high lim work
226) update AFNI
227) warn but don't bail if NOTES file not editable
238) autosave the csurf.dat parms when CONVERT/AVERAGE finishes
239) better maskfile filter for multibrik paint
240) 'force' ignores batch-stopping stale (older than regdat) paintfile warning
241) fix complex-valued vertex-normal search in paint (read two, write two)
242) add file truncphase code to paint, parms settable in Fourier panel
243) fixed longstanding change-patch-if-only-one-hemi-there create/render bug
244) allow choose-one-hemi w/Fix/Final (but not combos that touch 3D data)
245) default 3dvolreg target to reps/2 at READ HEADER time
--- sep11 ---
246) re-chmod surfer.log writable for Copy Subject/Functional
247) new initial SessionTools panel for: mkscandirs,findraw,copy,stripTRs,flip
248) disallow re-fill/re-tessellate one surf (refill may make other surf stale)
249) warn/help if LSB HEAD detected on initial BRIK read at REGISTER
250) fieldsign panel: reinstate saved ecc/polstems when >1 (e.g.,orig,volreg'd)
251) fieldsign panel: fill stemscombo works w/prev used pol/ecc functscan Unset
252) restore current hemi after paint (was: paint does both, ends on left)
253) add Reset to Default Parms radio button row to render panel
--- sep16 ---
254) fix bug in initial set of defaults in Render panel (just need new csurf)
--- sep17 ---
255) actually fix #254... (sorry) (just need new csurf)
--- sep27 ---
256) fourier cyc default=8, better register struct alerts, warn funct as stat
257) warn Import Stats attempt to read timeseries as a multibrik AFNI stat file
258) widen the combobox drop downs (patch, session, render paintfile)
259) revphase checkboxes for 3D vect avg (circ subtr phasecancel still there)
260) revphase checkboxes for complex surfaverage (script version still there)
--- oct10 ---
261) warn write rgb permission prob instead of exit (Linux), stack trace (IRIX)
262) check convert/average structdirs writable, re-use pre-adjust register.dat
263) cxcombine=>rcxcombine (average real in surfcombine panel w/o script)
264) fix render defaults (wasn't copying phasetype from Fourier panel)
--- oct13 ---
265) fix phasecombine/surfcombine panel bugs in csurf cmdlines for rcxcombine
265) add View All Scandirs panel
--- oct16 ---
266) double-click on scandir now renders from View All Scandirs panel
--- oct17 --
267) addfunct/addalign READ HEADER finally works w/HEAD (as well as BRIK)
268) purple VOLUME button no longer also kills other (first started) tkmedit
269) no-render-panel option on View All Scandirs (multiple tksurfers allowed)
--- dec30 ---
270) fix RedHat9 MINC by adding 'setenv LANG en_US' to FreeSurferDefs.csh (#%@)
--- jun29 ---
271) documentation for 3D PhaseCombine panel
272) rawaverage panel can now concatenates, too (BRIK only, using 3dTcat)
273) rm aspect=calcsdiff/statcombinecmd/addsdiffscan (condcombine/statcombine)
274) $brikstem.motion.1D => motion.1D
275) explicit AFNI buttons added to AlignFunct, ImportStats panel
276) completely rewrite deconv panel around AFNI 3dDeconvolve
277) workaround addrand $f.d.* combo yoking => syn equiv in addfunct $f.d widg
278) allow output signed t-stats in Import Ext Stats panel
278) re-write non-working cluster to make tmp thresh/cluster mask
279) fix introduced set fieldsign defaults bug
--- may19 ---
280) fix mris_flatten expert preferences arg order
--- jun29 ---
281) new calcvert binary reads oldcurv/oldarea/newcurv, does diff/ratio/convert
282) explicit surface entry for calc fieldsign, block accidental use of 3d
283) fix missing +orig in non-working cluster cmd, make smaller surfavg name
284) paint checks currsubject/namefile mismatch (e.g., if namefile changed)
285) use time offset correction for 3dvolreg (-tshift 0)
286) 3dDeconvolve noneg arg now empty for both tout and fout
287) select_condname1 typos
--- sep01'04 ---
288) add Run Rand Block to batch stats panel
289) add Omit Freq parm to Fourier panel for ODR-like expts
290) relative stim1Ds directory works now (was absolute only)
291) don't litter TmpAfniHead's on test byteorder OK
--- sep02'04 ---
292) check for 2 Helvetica fonts that might not be installed and substitute
--- sep03'04 ---
293) surfer tools documentation (finally!)
--- mar09'05 ---
294) fix/generalize fonts for Fedora 2/3
295) allow auto struct align/avg using AFNI 3dvolreg (Expert Prefs)
296) fix longstanding failure to always save structural panel parms
297) allow additional 3dDeconvolve options (e.g., -censor file.1D)
298) polort!=2 now works (glt matrices previously assumed polort=2)

============================================================================
recent binary bugfixes, updates
============================================================================
100) fix brik2bfloat (was reading only one line of floatfacs, also failed >16)
101) brik2bfloat reads BRIK_FLOAT_FACS=0 as 1
102) regcor takes 128 inputs (vs. 16)
103) fixed off-by-half-voxel tkregister/paint mismatch for Linux
104) nmovie (IRIX-only) simple stim format (-e) now displays text strings
105) nmovie (IRIX-only) writes out time-stamped mouse click IDs, 0-9 keys
106) update Linux mris_flatten binary
--- sep 27 ---
107) Don Hagler binary:  cxcombine reads complex .bfloat or .w pairs
--- oct 10 ---
108) Don Hagler binary: rcxcombine reads complex .bfloat or .w pairs, also real
109) fourier accepts up to 512 times steps (was 256 max)
110) new calcvert binary reads oldcurv/oldarea/newcurv, does diff/ratio/convert
111) fourier can omit arbitrary freq from the noise (F-ratio denominator))

