    ========================================================================
   ==  These changes start after the release of AFNI 1.99 on 24 July 1996. ==
   ==  Before that, some stuff was desultorily maintained on paper.        ==
    ========================================================================

25 July 1996:
 * Added Button 2 click (time_index += 1 or -= 1) to afni_graph.c
     [N.B.: this change was later removed with the drawing plugin.]

29 July 1996:
 * Added shadow color changing code to "colormenu" widgets in bbox.c --
     this gives a little visual feedback when a color is selected.
 * Used 'glob' routines from tcsh-6.05 to allow filename globbing
     on non-POSIX systems without the glob routines (like SGIs).

30 July 1996:
 * Modified MCW_file_expand routine to properly glob files specified
     in the form 3D:a:b:c:d:e:fname, where only 'fname' will have the
     wildcards.  To3d help printout now reflects this change.
 * Used fsync(fileno()) to ensure that writes of .BRIK files are
     flushed to disk -- in afni_func.c and 3ddata.c.
 * Don't do shadow color changing in "colormenus" unless the widget is
     realized, since this causes a BadDrawable error on Linux (Motif 2.0).
 * Changed most popup widgets to be of class "menu", which means that
     their background color can now be changed separately.
 * Changed operation of -R option in afni to limit the levels of recursion.
     Mostly involved changing the routine THD_get_all_subdirs in 3ddata.c.

31 July 1996:
 * Changed to3d to prevent creation of 3D+time functional datasets.
     Modified to3d -help to reflect this, and added 'Nz = %d' to the
     3D+time information label in the to3d widget panel.

1 August 1996:
 * Modified imseq.c and afni.c to allow the user to toggle between
     periodic montages and "no wrap" montages.  Added a toggle button
     "Wrap" next to the crosshair "Gap" menu.
 * Modified crosshairs in afni.c so that in "Single" mode with a
     grapher active, then only the frame showing the graphed voxels
     is drawn.  In "Multi" mode, both the frame and the crosshairs
     will be shown.

2 August 1996:
 * Modified FD2.c to show average pixel value over frame as well as time,
     when "AvIm" is being used.   Also added 'b' keypress to toggle
     common baselines for graphs.
 * Added SEEK_ constants back to mri_read.c, since C compiler on sparky
     doesn't have them in stdio.h.
 * Fixed "afni -im" problem with inversion of top_form during waits --
     the program didn't turn the inversion off correctly.  This error
     was due to the "dangling else" problem.  The addition of a {}
     pair fixed it right up.  Moral of the story: don't be stupid.

6 August 1996:
 * Fixed a bug in afni_slice.c about the new NN code.  The code
     now doesn't use the "parallel" fast mode unless both the
     inner and outer axes are parallel.
 * Fixed a bug in 3ddata.c, where the taxis wasn't properly set on
     input of a 3D+t dataset if no slice offset data was input.
     This would cause a crash when trying to delete a dataset.
 * Added "-warp_4D" switch to afni to allow output of 3D+t datasets
     in Talairach coordinate.  Consumes huge amounts of disk space
     and CPU time.
 * Removed fsync() because of time penalty.

7 August 1996:
 * Fixed another bug in afni_slice.c about the new NN code.  The
     allocation macro MAKE_IBIG failed to take into account that
     the array ib[] index would run from 0.."top", and it only
     allocated "top" entries, whereas it should do at least "top+1".

8 August 1996:
 * Added "-gfisher" option to 3dmerge.c, for purpose of averaging
     correlation coefficient bricks.  Fixed a bug in this program
     that took the DSET_BRICK_FACTOR from the input dataset
     before editing, which is a mistake, since editing might alter
     this scaling factor.
 * Changed output format from %14.7g to %13.6g in 3dinfo.c.  This
     tends to suppress the annoying roundoff error in the scaled
     statistics report.

9 August 1996:
 * Fixed scaling bug in editvol.c EDIT_one_dataset's clip code.
     For shorts scaled to floats, clip values were computed as
     integers, which gave truncation errors in some cases.  Now,
     clip values are computed as floats, then converted to
     integers, with appropriate min- and max-ing.
 * Also added -1uclip and -2uclip options to EDIT_.  See
     "3dmerge -help" for information.

13 August 1996:
 * Altered autoRange and userRange controls (in Define Function
     control panel) in afni to
       a) always allow the user to set the range, even for thresholds
       b) eliminate the inversion to indicate the autoRange is on
       c) compute the autoRange for thresholds as well as fims
     These changes also eliminate a bug (feature?) where the user could
     set "Func=Threshold" (SHOWFUNC_THR), which would formerly disable
     these controls, then switch to another dataset where they would
     not properly be re-enabled.
 * Added function AFNI_rescan_session to afni_func.c, which will close
     all the datasets in a session, then re-read the session directory
     to make a new set of datasets.  At present, this is actuated from
     the "hidden" popup menu.  Tricky points are catching all pointers
     to datasets that are in the rescanned session, since they will
     change, and dealing with the case when the user deletes some
     dataset files.

28 August 1996:
 * Fixed routine T3D_fix_dataset_dimen() in to3d.c to clear the
     data brick pointers of the OLD number of bricks, not the
     NEW number of bricks.  This error caused to3d to crash when
     going from a dataset type with large nvals to small nvals,
     since some sub-brick pointers were not being properly cleared.
     [This error only manifested itself on SGI machines, and
      was found by Christopher Wiggins.]
 * Made all routines in mri_write.c return a count of the number
     of files they successfully wrote out (instead of returning void,
     as before).  [This change was prompted by Doug Ward.]

29 August 1996:
 * If a session directory has functions but no anatomies, then
     afni.c now prints out a warning message instead of just
     skipping it silently.  [Prompted by Chris Wiggins.]
 * If a dataset has parent IDCODEs, then the corresponding
     parent name will not be set in 3ddata.c.  This is to prevent
     confusion.

1 September 1996:
 * Moved rescan pushbutton from hidden menu to datamode control panel.
 * Modified 3dmerge.c to allow merger of thresholds in datasets as
     well as intensities.  Uses a new '-t*' type of flag -- the only
     one implemented so far is '-tfico', which requires all inputs
     to be of the fico dataset type.  See the '-gfisher' merger mode
     given earlier.

7 September 1996
 * Modified -tfico option in 3dmerge.c to allow some of the datasets
     to be of the fith type.  If all of them are fico, then the output
     will be fico (with degrees-of-freedom parameters summed), otherwise
     the output will just be fith.
 * Added "-q" == "be quiet" option to fim2.

30 September 1996:
 * After several false starts, finally begin creation of plugin code.
     This is after conversations with Mike Beauchamp and Jay Kummer.
     Yesterday and today:
       - afni_plugin.h has interface structures defined;
       - afni_plugin.c has interface definition routines and
           widget creation routines;
       - machdep.h has new #define's to set the type of
           dynamic library loading to use.
     Much more to come.
 * Modified MCW_widget_geom in xutil.h to properly deal with
     the case of unrealized widgets -- must use XtQueryGeometry
     instead of XtGetValues.

06 October 1996:
 * Fixed use of "==" in assignment statement in 3ddata.h.
 * afni_plugin.c now has
     - working widget creation and popup routines
     - plugin callable routines to extract values from
         user selected options from the interface

07 October 1996:
 * Changed 3ddata.c to allow use of AFNI_TS_PATH as an alternate
     to AFNI_TSPATH.  If neither environment variable exists,
     then the path "./" will be used as a last resort.
 * Something similar done in afni_plug.c with AFNI_PLUGIN_PATH.
 * Made the switchview callback in afni.c pop down the strlist
     chooser.  This is because a plugin interface will only be
     allowed to choose from current view datasets, and if such
     a view switch is made, the list of choosable datasets must
     be modified.  The simplest way to do this is to make the
     user start the choice process over.

09 October 1996:
 * Fixed bug in afni_plugin.c that failed to check certain
     datasets for inclusion in the dataset choosers.
 * Modified BHelp to include color and border controls.
 * Incorporated Doug Ward's changed version of editvol.[hc],
     which adds various cluster editing and volume filtering
     options to 3dmerge.c (et al.).

11 October 1996:
 * Fixed (sort of) sizing problem in afni_plugin.c creation
     of plugin interface windows.
 * Wrote routine for plugin to load a new dataset into the
     current session of a controller window.

12 October 1996:
 * afni_plugin.c changes:
     - Modified PLUGIN_prefix_ok in afni_plugin.c to check for
         duplicate prefixes, as well as for illegal characters in
         the prefix string.
     - Routine PLUGIN_force_redisplay will make all im3d units
         redraw their windows.
     - Routine PLUGIN_copy_dset will copy a dataset, including
         the bricks.
     - Added helpstring to the plugin interface, and a "Help"
         button to popup a plugin-supplied message.
 * Modified afni to allow separate control of warp-on-demand for
     anatomy and functional datasets.  When a plugin directly
     modifies a Talairach dataset brick, for example, then if it
     is set to warp-on-demand, the display won't be affected,
     since the program always warps from the +orig brick.  Under
     the old scheme, if the anat were w-o-d, then the func had
     to be w-o-d as well.  In the situation where the anat dataset
     brick does not exist in Talairach coords, then the effect of
     the plugin would be invisible if the user couldn't force
     the function to be view-brick independent of the anatomy.
 * Fixed an old bug in THD_dset_in_sessionlist (3ddata.c) that
     returned the wrong session index.

14 October 1996:
 * Fixed bug in 3ddata.h macro FILECODE_TO_PREFIX so that the
     last '+' in the filecode is used to find the prefix,
     rather than the first '+'.  This fixes a problem with
     datasets whose prefix contains a '+' character.

18 October 1996:
 * Modified mri_read.c so that '# line' comments in pgm files
     can be read.  This lets AFNI programs read pgm files created
     from programs like "xv".
 * Changed plugin callable functions/macros in afni_plugin.[ch]
     to start with PLUTO (PLugin UTility Operation).

20 October 1996:
 * Fixed bugs in imseq.c:
     - During "image processing" of complex images, one reference to
         input image "im" had not been changed to "lim" (the locally
         processed copy).
     - If ISQ_make_image fails, the XImage "seq->given_xim" would
         be NULL.  This is now detected, and ISQ_show_image won't
         try to put this NULL image to the screen (which would
         cause a Segmentation error).
 * Minor changes to afni_plugin.c:
     - Added reminder of current "view" at top of plugin dataset chooser.
     - Added [c] reminder of current controller in plugin shell widget
         titlebar and icon label strings.
 * Minor changes to afni_graph.c:
     - Changed time increment event from Button2 to Shift or Ctrl
         with Button1.  This is to allow the eventual dedication of
         Button2 events to plugins.

21 October 1996:
 * Changed FD_brick_to_timeseries (in 3ddata.c) to scale each element
     by the brick_fac value appropriate for that time index, rather
     than by the value for time index = 0.  This is done using the
     new routine mri_mult_to_float (in mri_to_float.c).
 * Fixed bug in EDIT_dset_items (editvol.h) that used "float" inputs.
     Default type promotion (there can be no prototype here) turns all
     float inputs to doubles, so they must be retrieved this way.
     Also, fixed error when "ADN_nsl" is passed as zero -- no longer
     requires a "ADN_toff_sl" array in this special case.  Also made
     EDERR macro always print a message, even if not in debug mode.
 * Added DSET_TIMESTEP macro (and others) to 3ddata.h.
 * Modified PLUTO_add_dset (afni_plugin.c) to allow for other actions
     when a dataset is set back to AFNI.
 * Added "progress meter" PLUTO_ functions to afni_plugin.c; also
     modified the meter code in xutil.c to check if the percent
     value has changed before trying to update the meter progress.
 * Added "units_type" to the 3D+time dataset format.  This lets the
     "time axis" be expressed in milliseconds, seconds, or Hertz.
     Changes were made to 3ddata.[ch], to3d.c, 3dinfo.c, and editvol.[ch].
 * Power spectrum plugin "plug_power.c" was made to work today.

22 October 1996:
 * Added timeseries chooser to afni_plugin.c.
 * Added ability to apply a function to graph data (e.g., to take the
     logarithm of each point).  This affected afni.[ch] and afni_graph.[ch].
 * Fixed a bug in afni_fimmer.c, where routine AFNI_ts_in_library could
     return the wrong value if the timeseries being searched for was
     not actually found.
 * Modified directory scan in 3ddata.c (for timeseries) and afni_plugin.c
     (for plugins) to skip directories that have already be scanned.
     This is to avoid the situation where the PATH variable contains
     duplicate entries.

23 October 1996:
 * Added Shift/Ctrl/Alt-Button3 simulation of lower tier button presses
     to imseq.c.

25 October 1996:
 * Fixed imseq.c routine that re-places the "dialog" window (for Disp
     and Mont) on the screen when the image is resized -- somehow
     the code that fixed the problem of forcing the dialog off the
     edge of the screen lost an "=", and so nothing happened.
 * Added "i" button to right edge of imseq.c windows -- allows the
     user to down/up the fraction of the window that the image
     takes up.

27 October 1996:
 * Added PLUTO_popup_image() function to afni_plugin.c.  Also used
     this to provide a "hidden menu" popup of an image of me in
     afni_func.c.

30 October 1996:
 * Added ability to apply function to each pixel of a displayed image
     (cognate to the similar ability in graphs -- see 22 October).
     This primarily affected imseq.c, but also a few other places.
 * Added new "fift" dataset type, to deal with F-test sub-bricks.
     - Incorporated cdflib into mrilib.  This is to use the "cdff"
         to compute the CDF for the F statistic, in mri_stats.c
     - Changed the precision of the threshold scale (thr_scale)
         from 0..99 to 0..999, and correspondingly changed the
         scaling from the scale to func_threshold from 0.01 to
         0.001.  Also changed the "decim" factor for the scale.

31 October 1996:
 * Modified EDIT_substitute_brick in editvol.c to allow the input
     array "fim" to be NULL.  In that case, the routine will create it.
     This is a convenience for the user (say, a plugin author).

1 November 1996:
 * Added routine PLUTO_4D_to_typed_fim to afni_plugin.c.  This takes
     a user function and a 3D+time dataset, and returns fim dataset,
     with the user function applied to each voxel timeseries.

2 November 1996:
 * Fixed a major bug with the multiple controller window ("New"
     button) extension.  The problem is that the information about
     how to extract images from a dataset is stored in the dataset,
     in the "wod_daxes" and "vox_warp" sub-structs.  This causes
     difficulties when two controllers view the same dataset at
     different resolutions (e.g., overlay the same function on
     two different anatomies).  The fix is to put the originals
     of "wod_daxes", "vox_warp", and "wod_flag" into the controller
     (im3d) struct itself.  When the dataset is going to be used,
     then this information is copied into the dataset struct.
     This is a clumsy fix, but breaks the least code in the
     afni_warp.c routines for extracting slices from a dataset.

3 November 1996:
 * Moved functional resample arrowval from the "Define Function"
     control panel to the "Define Datamode" panel, where it will
     be close to the analogous control from anatomy.
 * Added 1D and 2D transformation function registries.  Made up
     some sample transformation functions (median filtering, etc.).
 * Added time units appendage to TR in to3d.c.

4 November 1996:
 * Added "Lock" menu to Datamode panel.  This allows the user to
     specify that certain controllers have their coordinates locked
     together, so that jumping around in one dataset can be mirrored
     by jumps in another.  At this time, the AFNI_transform_vector
     function does not properly transform vectors from +tlrc coordinates
     to +orig coordinates (say) if the two datasets are not in the
     parent/child relationship.  This can be confusing if two such
     datasets are locked, and they are not in the same "view".
 * Made pressing Button1 on the AFNI logo in a grapher window also
     turn off/on the menubar widgets.  This enables a screen dump
     of a graph without that extraneous stuff being present.

6 November 1996:
 * Added -unique option to afni.c to allow creation of unique
     display contexts (MCW_DC's) for each AFNI controller window.
     (This won't work on 8 bit displays.)  afni.c and afni_widg.c
     were changed appropriately (and afni.h).

10 November 1996:
 * Wrote "lsqfit" plugin.  This allows computation of least squares
     fits to timeseries graphs.  Modified afni_graph.c to allow
     "Double Plot" to overlay least squares fit graph (or other
     output of a "Tran 1D") on the data timeseries graph.

12 November 1996:
 * Fixed bug with multiple displays and the "lock" -- when
     changing the dataset in an AFNI controller, you don't want
     the coordinate lock to apply.
 * Started adding "orts" to AFNI's interactive fimmery.

19 November 1996:
 * Made afni.c (AFNI_setup_viewing routine) set the FIM-able dataset
     to the newly activated anatomical, if possible.  In the old
     version, if you switched anatomies, the FIM-able dataset didn't
     switch with you.  This was confusing to the uninitiated masses
     (that is to say, Mike Beauchamp).

21 November 1996:
 * Incorporated the f2c (Fortran-to-C) convertor into the AFNI96
     distribution, in a separate directory (f2cdir).  This allows
     the use of the old "parser.f" routines to compile and execute
     user created expressions.
 * Added macro AVOPT_columnize to bbox.h, which allows the setup
     of an optmenu in a multicolumn layout.  Also setup the "Plugins"
     button to allow this (when the number of plugins grows past 20).

22 November 1996:
 * Adapted MCW_choose_strlist (in bbox.c) to allow selection of
     multiple items from the list.

23 November 1996:
 * Rearranged Write buttons on Datamode control panel in AFNI.  Added
     a write "Many" button which lets the user pick lots of datasets
     to write out, so he can go get a cup of coffee.  Put all 3 Write
     buttons in a single row.
 * Added a Rescan All button to allow rescanning of all sessions.  Put
     both Rescan buttons in a single row.  Also added a "*.1D" rescan
     button to allow for re-reading of timeseries files.
 * Attached data type descriptors like [fim] and [epan:3D+t] to the
     listings in the dataset choosers.

10 December 1996:
 * Fixed small bugs in parser_int.c, in the utility routines where
     a pointer to a doublereal wasn't dereferenced before comparing
     it to zero.

01 January 1997:
 * Added routines to libmri.a to allow reading in a 3D: image file
     in "delay" mode -- only the filename and offset into it are
     stored in the image.  When access to the image is desired,
     then it will be read from disk.
 * Added -delay switch to to3d.c to take advantage of this procedure.
     This prevents duplicate malloc required for huge 3D: file
     (once for the 3D: input and once for the dataset brick).  People
     who do all 3D+time input data in one big file have run out of
     memory otherwise.
 * Added "++" toggle to allow display of crosshairs in all slices of
     an AFNI montage.  This is specifically for Jeff Binder.
 * Added RESET_AFNI_QUIT() calls to a bunch of routines in afni.c.

02 January 1997:
 * Added mcw_glob.c usage to FD2.c, to allow internal expansion of
     wildcarded filename.  This overcomes the SGI limit on the
     number of arguments on the command line.

03 January 1997:
 * Got program waver.c to work -- generation of an ideal waveform
     with tunable parameters.

13 January 1997:
 * Added -subort option to fim2.c -- subtraction of orts from
     an image time series.

20 January 1997:
 * Included "#include <string.h>" in mcw_glob.h, to prevent complaints
     from stupid compilers.
 * Added Makefile.osf1, from a system at U Maryland.
 * Added gmovie, a script to create a GIF movie from a bunch of PNM files.

21 January 1997:
 * Made the "fscale" element in a grapher (afni_graph.[hc]) be a float,
     so that finer control over graph scaling is possible.
 * Changed "Scale", "Ignore", and "Matrix" controls in graph window
     to be optmenus.  Added a routine to allow optmenus to be refitted.

22 January 1997:
 * Made the control buttons on the image viewers (imseq.c) a little smaller.

30 January 1997:
 * Added program 3dcalc.c.
 * Changed STEP function in parser.f to be 1 only for x > 0.

14 February 1997:
 * Incorporated GNU malloc into afni.c, which will be enabled with
     the #define-ition of USE_GNU_MALLOC (e.g., in machdep.h).
 * #define-ing NO_FRIVOLITIES in machdep.h will no disable the
     picture and sonnets.

16 February 1997:
 * Incorporated GNU malloc checking into "dafni".  Now checks the
     status of all malloc-ed blocks on entry and exit to every
     routine using "ENTRY" and "RETURN" macros.  (Nevertheless,
     this still doesn't find the bug I'm looking for.)
 * When a grapher window is being destroyed, its corresponding
     image window needs to redraw the crosshairs.  This redraw
     command could cause a crash (for reasons unknown) when
     the dataset is being changed (that is, the grapher is being
     trashed because the new dataset does not support graphs).
     This is fixed in afni.c and afni_func.c so that when a
     grapher is destroyed due to underlay switching, then the
     corresponding image redraw commands will be ignored.

18 February 1997:
 * Added some logical functions (and, or, mofn) to parser.f, and
     so to 3dcalc.  Also added the -session option, and made the
     default session = "./".

20 February 1997:
 * Moved a couple routines in afni_plugin.c outside the
     "#ifdef ALLOW_PLUGINS ... #endif" code block since they
     are used in non-plugin-specific parts of AFNI.

23 February 1997:
 * Wrote plug_imreg.c to do 2D registration on 3D+time datasets.
 * Modified mri_align.c, imreg.c, and fim2.c to recognize macro
     ALLOW_DFTIME, if the user wants to compile the ability to
     do -dftime or -dfspacetime registration.

03 March 1997:
 * Allow to3d to create 3D+time FIM datasets.  Allow afni to display
     them as functional overlays.
 * Add -noplugins option to afni, so that it is possible to skip
     plugins initialization (also can setenv AFNI_NOPLUGINS).
 * In to3d.c, if any -[xyz]SLAB or -[xyz]FOV options are used, then
     require that all 3 axes be given if the dataset is to be
     written out correctly without opening the interactive window.

04 March 1997:
 * Added a "Read Sess" button to allow input of a new session into
     afni.  Also added a function THD_equiv_files to 3ddata.c to
     allow for checking if 2 filenames are equivalent (point to
     the same inode on the same disk).

05 March 1997:
 * Added a dummy dataset to afni.c, so that if there are none when
     the user starts, he can read them in with the "Read Sess" button.
 * Added a "Read 1D" button to allow input of timeseries files.

10 March 1997:
 * Made the "Selection" box in the new file selectors have the
     "HOTCOLOR" as the background.  This is because of the importance
     of the contents of this box.

?? March 1997:
 * Created script files to compile and distribute AFNI binaries
     on and to various computers.

02 April 1997:
 * Incorporated the CLAMS library into the internal (MCW only) version
     of AFNI.

03 April 1997:
 * Created the "imcalc" program, analogous to 3dcalc, but for 2D images.

21 April 1997:
 * Started work on "plug_realtime.c", including the "3T_toafni.c"
     program to extract data from ParaVision and send it into AFNI.

22 April 1997:
 * Modified registered functions to each have an int flag.  The only
     flag value used now is bit 0 = RETURNS_STRING.  This can be used
     in a 1D function (via PLUTO_register_1D_funcstr) to return an
     extra string that will be displayed in graph's button 3 popup.
 * Modified the LSQfit plugin to return the fit parameters in the
     extra string, so that the user can display them.

17 June 1997:
 * Lots of changes in the last 2 months to make plug_realtime.c work.
 * Added a menu item to afni_graph.c to allow user to control graph
     colors and line thicknesses.  The colors can also be initialized
     from the .Xdefaults file.
 * Added a menu item to afni_graph.c to allow the graph window to
     be dumped to an image file.  Had to fix xim.c to allow for
     the XImage format returned by XGetImage on the graph Pixmap.
 * Modified imseq.c so that if the user types ".pnm" as the end
     of the "Save:one" filename, the program won't add another
     ".pnm" to the end.

18 June 1997:
 * Had to fix the xim.c routine XImage_to_mri to work correctly
     with 12 bit Visuals.
 * Added stuff so that .Xdefaults can initialize the line thicknesses
     as well as the colors.

25 June 1997:
 * Made afni_plugout.c and plugout_tt.c -- initial implementations
     of the "plugout" concept: programs that talk to AFNI using
     IOCHANs to get T-T coordinates, etc.
 * Modified iochan.c to allow a socket connection to cutoff
     abruptly when closed.  This was needed because I found that
     a socket connection might hang around a while after close,
     and this would prevent new connections on the same port #.
     At present, this capability is only used when afni exits.
 * The plugout code (afni_plugout.c) is an Xt work process.
     To prevent it soaking up too much CPU time, if nothing
     happens, it will sleep for 10 msec.  This work process
     is disabled if the realtime plugin is active.

30 June 1997:
 * Added routine THD_extract_series and macros PLUTO_extract_series*
     to get time series from 3D+time datasets.  [per Ziad Saad]
 * Modified 3ddup.c to allow conversion of 3D+time anatomy into
     3D+time fim.  This will allow the overlay of EPI time series
     as "function" onto the corresponding anatomy.

02 July 1997:
 * Modified imstat.c to work with 3D image files, at least partly.

16 July 1997:
 * Made -orient option (and AFNI_ORIENT environment) work to change
     the order in which coordinates are displayed in the afni.c
     crosshair label.

22 July 1997:
 * -orient (and AFNI_ORIENT) now work with 3dclust.c.
 * The "jump to" popup in afni.c now works with the orientation
     code, so that you can paste coordinates out of 3dclust
     into to jumpto window.

23 July 1997:
 * Added 6 new functional dataset types, with thresholds being
     distributed as follows:
            normal    chi-square   incomplete-beta
            binomial  gamma        Poisson
 * Gave user ability to change range of threshold slider -- before,
     range was fixed by threshold functional dataset type.
 * Found problem on Linux (1.2.13) with "dlopen" loading of plugins
     and models -- seems to have problems at about the 20th library.
     Not sure what to do about this.
 * Added routine PLUTO_report to allow a plugin to report status
     information at startup.

28 July 1997:
 * Added new utility program "3drefit.c" to allow user to change
     the axes stored in a dataset header.  This is mostly to
     fixup errors that may have occured at to3d time.
 * Added -orient option to to3d.c (not that it is much use).
 * Fixed bug in 3dinfo.c, for printout of sub-brick scaling
     factors when no statistics are present in the header.

30 July 1997:
 * Added ability to include a rotation warp when using 3ddup.
 * Added ability to include empty markers in 3drefit.
 * Fixed AFNI_init_warp (in afni.c) where it give the name
     of the new dataset based on the "adam" dataset, rather
     than the "parent".  This causes problems when transforming
     a dataset that is itself warp-on-demand from 3ddup -- the
     names would be based on the ultimate warp parent, not
     the derived parent from 3ddup.

1 August 1997:
 * Added a label in the Define Function control panel to show
     the crosshair pixel value, if all 3 image windows are
     open (afni.c, afni_func.c, afni_widg.c).
 * Made Button3+Modifiers work even if CapsLock or NumLock
     is pressed (imseq.c).
 * Added random Shakespearean insults.
 * Added AFNI_SESSTRAIL (3ddata.c) to control session "lastname".

22 August 1997:
 * Raoqiong Tong modified parser.f to make the vector evaluation
     routine work again.
 * Also fixed 3dcalc.c to work with 3D+time datasets.

26 August 1997:
 * Oops!  Had to fix the EXP_0D plugin in plug_lsqfit.c because
     the parser vector evaluation routine was changed.

03 October 1997:
 * Oops!!  Fixed a bug in mri_align.c, where the fine fit weight
     image wasn't computed properly.  This affected fim2, imreg,
     and plug_imreg.

22 October 1997:
 * Oops**2.  Fixed a bug in the bug fix above.

27 October 1997:
 * Changed csfft to csfft_cox in all places to avoid conflict
     with code by AJ.

30 October 1997:
 * Fixed DXY_THRESH to PHI_THRESH in one line of mri_align.c
 * Worked on adding popup "hints" to AFNI.

10 November 1997:
 * Added popup hints to to3d.
 * Added "Clinical" disclaimer to startup message.
 * Remove scale hints (afni.c, imseq.c), since they are particularly
     obnoxious.

12 November 1997:
 * Added some SPARKY specific header declarations to fix problems
     with SunOS compiling system (e.g., strtod).

20 November 1997:
 * Increased buffer sizes in count.c
 * Added Makefile.sparc5_2.5 for Suns.

21 November 1997:
 * Allowed brick dimensions to be specified as "120A" or "A120"
     in to3d.c.  This is to make it consistent with the way
     scanners print on films.

30 November 1997:
 * Added the "bucket" types (anat and func) to 3ddata.h, and
     then modified afni, editvol, etc., to utilize this type
     of dataset.
 * Created program 3dbucket.c to put buckets together out of
     sub-bricks from other datasets.
 * Modified 3drefit.c to allow changes to bucket sub-brick
     information.

09 December 1997:
 * Added a new chooser to let user pick interpolation method
     for threshold (statistical) sub-bricks.
 * Fixed CUBIC_CLIP in afni_warp.c -- it was incorrectly
     placed before the brick_fac scaling, not after.
 * Removed FIM menu from Define Function control panel.

13 December 1997:
 * Added new file "3dmaker.c", for routines that make new
     3D datasets from other datasets.  Moved the guts of
     the PLUTO_4D_to_typed_* routines into this file.
 * Also fixed a "float *" inside mallocs to be "float"
     in a couple of places in these routines.  This should
     be innocuous, since most CPUs satisfy
       sizeof(float) <= sizeof(float *)

15 December 1997:
 * Added "Compute FIM+" to FIM menu.  This saves the best
     time series index in a new sub-brick.
 * Added some macros to editvol.h to make changing sub-brick
     auxiliary values simpler.

17 December 1997:
 * Modified AFNI_set_viewpoint to skip graph redraw unless
     REDISPLAY_ALL or unless a new (x,y,z) location is set.
 * Added menu to the pbar label to allow modification of
     the colors and spacings.
 * Modified display.h to allocate overlay colors from
     read-write cells.  This allows the colors to be
     redefined.

18 December 1997:
 * Added -noqual option to AFNI to make it skip quality checks
     when doing marker transformations.
 * Added -view option to 3drefit to let it change coordinate
     systems.

21 December 1997:
 * Added ability to read in palettes and colors from .afnirc file,
     and interactively from a user-specified file.  Also allow
     user to reset the top and spacings on the color pbar.
 * Modified display.[ch] to put all overlay stuff into a shared
     struct for all MCW_DCs.  This means that the -unique option
     will only generate new grayscale colorcells for each controller,
     but they will now share overlay colors.  This is intended to
     prevent a problem when users add new colors dynamically
     from external palette files.  This change affected files:
       afni_func.c afni_graph.c afni_graph.h afni_setup.c xim.c
       afni_widg.c bbox.c display.c display.h imseq.c pbar.c
 * Modified pbar.c to keep the input pval's exactly when calling
     alter_MCW_pbar -- formerly, after resizing the panes, the
     values might be altered slightly.
 * Discovered that 17 Dec 97 change to AFNI_set_viewpoint could
     make graph not be drawn correctly on startup.  Added
     "never_drawn" variable to graphs and imseqs to allow
     this condition to be detected.

22 December 1997:
 * Removed auto-change of threshold scale for bucket datasets
     from afni.c.  Also unmanages/remanages this scale when
     the pbar is being changed, due to horrible visual effects
     on the SGI machine nimloth (if FIX_SCALE_SIZE_PROBLEM
     is defined).
 * Modified pbar.c to store the summed pane heights, and then
     recompute the value/label only when such a summed height
     changes.  This prevents the modification of the value/label
     pairs at other panes when resizing only one pane.
 * Modified AFNI_bucket_label_CB (afni_func.c) to put the
     sub-brick index at the left of the option menu label.

26 December 1997:
 * Fixed bug in palette write-out (afni_setup.c).
 * Added a scrollable text output utility (xutil.c).  Made
     the plugin help use it if the help string has many
     lines (afni_plugin.c).  Added a line counting routine
     to 3ddata.c

02 January 1998:
 * Added ability to read compressed .BRIK files to 3ddata.c
     (gzip -d, bzip2 -d, and uncompress are supported).
 * Added program "3dnoise" to zero out noise-like regions
     of nonnegative short datasets.
 * Modified display of dataset names to include number of
     points in a 3D+t dataset, and to include a "z" flag
     to indicate compression of dataset.

05 January 1998:
 * Added "New Stuff" entry to Misc menu, which just pops up
     the README.changes file into a readonly text window.
 * Program "quotize.c" will take a text file and make it
     into a C array of strings, one line per element.  This
     is used in afni_func.c to popup the README.changes file,
     which is put into the file "newstuff.hhh" by quotize and
     in the Makefile.INCLUDE.

07 January 1998:
 * Added a routine to editvol.c to do local averaging of a
     dataset faster than -1filter_mean -- it seems to run
     about 6 times faster.  This is implemented as
     -1filter_aver in 3dmerge, so that the older one is
     still available.  Also modified plug_edit.c to add
     this option to the Filter menu.

08 January 1998:
 * Modified scaling for output of 3dmerge.c so that the program
     detects if all the inputs are integer types (byte or short,
     unscaled).  If they are, and the merger type is consistent
     with integer type, then the output will be unscaled, otherwise
     it will be scaled by a float.

09 January 1998:
 * Modified afni_graph.[ch] to allow choice of a timeseries to
     be used to define the x-axis graphing.  Thus, if x(t) is
     the x-axis timeseries, and yij(t) are the data timeseries,
     then each graph ij now shows x(t) vs. yij(t) rather than
     t vs. yij(t).
 * Also modified the Button 1 press in the central graph to
     jump to the time index point whose graph point is closest
     to the button click.
 * Also allowed data plots to be shown as points instead of
     lines.  "Points" are drawn using the "_circle" routine
     ("filled" or "hollow", as the line is "thick" or "thin").

12 January 1998:
 * Allow a gap between the sub-graph boxes.  This is chosen
     from the "Colors etc." menu.
 * Raoqiong Tong fixed a bug in the new parser.f with the
     AND, OR, and MOFN functions.

14 January 1998:
 * Modified symbol for current time index in afni_graph.c, so
     that when data is graphed with points the current point
     can be distinguished from the graph points.

16 January 1998:
 * Added "Percent Change" calculation to afni_fimmer.c, and
     removed the "real-time" update feature from those routines.

01 February 1998:
 * Modified 3ddata.c to avoid use of "scandir" routine, which caused
     no end of trouble on Solaris.
 * Moved the "mcw_glob" routines into libmri.a.  These are used to
     get filenames from the directory now.

02 February 1998:
 * Fixed a typo in plug_imreg.c to make the "Fine Blur" parameter
     scale to FWHM properly.
 * Broke 3ddata.c into "thd_*.c" routines, and incorporated them
     into libmri.a.  Also incorporated 3dmaker.c and iochan.c.
     Files 3ddata.c, 3dmaker.[ch], and iochan.[ch] are no more!

03 February 1998:
 * Also put editvol.c into "edt_*.c" routines, and thence into
     librmi.a
 * Added an "Autoscale" button to graph Opt menu, and also execute
     the autoscale code when the graph is 1st drawn.

04 February 1998:
 * Modified dbtrace.h to enable tracing with usual afni run.  This
     can be turned on/off using the "Misc" menu, or the "-trace"
     option (if the program is compiled with USE_TRACING).

08 February 1998:
 * Modified afni_graph.c to display dataset indices in graph window,
     rather than FD_brick indices.  (See the DONT_MANGLE_XYZ location.)
 * Modified imseq.[ch], afni_graph.[ch], afni.[ch], and the new
     file afni_receive.c to allow transmission of mouse Button2
     data to a calling routine.  Work is in progress -- more later.

13 February 1998:
 * Released drawing plugin to MCW users.  Includes open and closed
     curves, filling, and undo.
 * Also added .BRIK output compression to thd_compress.[ch], and to
     thd_writedblk.c.

16 March 1998:
 * Added internal globbing to 'afni -im'.
 * Modified function AFNI_follower_dataset (afni_func.c) to copy
     datablock auxiliary data from the data parent, if available.
 * Modified 3drefit.c to allow -fbuc and -abuc to work no matter
     how many sub-bricks are present.
 * Added program 3dmaskave.c to print out averages from dataset
     sub-bricks, with ROI selected by a mask.

18 March 1998:
 * Made "ptr" a byte variable rather than char in XImage_to_mri
     (xim.c) -- this seems to fix a problem on some machines.

20 March 1998:
 * Fixed EDIT_add_bricklist -- the brick auxiliary data additions
     would free data that hadn't been allocated.
 * Modified stuff so that Dummy dataset is not deleted -- this
     seems to help.  (It only takes up 64K, so the loss is small.)

21 March 1998:
 * Modified 3dmaskave to allow dumping of all voxels hit by the
     mask, and to compute the standard deviation also.

24 March 1998:
 * Modified plug_copy.c to allow creation of a 1 sub-brick zero-filled
     "copy" -- useful for making mask datasets.
 * Modified 3dnoise.c for 3D+time datasets, so that a voxel is zeroed
     only if a majority of time points at that location fall below
     the cutoff.
 * Modified plug_drawdset.c to recompute statistics after each edit,
     no matter what.  Also changed the help message a little.
 * Wrote plug_maskave.c to do pretty much the same thing as 3dmaskave.c.

17 April 1998:
 * Modified 3dcalc.c to allow input of *.1D time series in place of datasets.

25 April 1998:
 * Modified thd_*.c to store byte order (for short and int datasets) in the
     the .HEAD file.  Then when the file is read in, it will be byte swapped
     if necessary (which will force it to be malloc-ed, not mmap-ed).
 * Also modified 3drefit to allow a byte order to be written to the .HEAD
     file.  Note that this does not affect the .BRIK file.
 * Added new environment variable AFNI_BYTEORDER to control the byte order
     of output datasets.  This can be "LSB_FIRST" or "MSB_FIRST".  If not
     present, this means to use the native order of the CPU.
 * Added new enviroment variable "AFNI_NOMMAP" to allow suppression of mmap.
     If the value is "YES", then all datasets will be malloc-ed.
 * Modified the "Purge Memory" button to purge ALL datasets from memory.
     Formerly, it only purged the unused ones.

29 April 1998:
 * At the behest of Ted DeYoe, modified 3dcalc.c (again!) to allow operations
     on bucket and other multi-brick datasets that aren't 3D+time.
 * Also modified 3drefit.c to allow conversion of 3D+time into a bucket.
 * This also required the ability to erase datablock attributes, since
     they are persistent -- even if the data in the dataset is voided,
     the attribute will remain to be written to disk.  So a routine
     THD_erase_one_atr was added.  In files thd_writedset.c and
     thd_writdblk.c, every attribute that DOESN'T get written now gets
     erased.  This will still leave extra attributes (perhaps added by
     a plugin) being persistent, but avoids the attribute "hangover" problem.

30 April 1998:
 * Modified 3dcalc.c to purge dataset sub-bricks when finished with them,
     and to allocate output buffer sub-bricks only when needed.  This is
     to keep memory usage down when using compressed 3D+time datasets.
 * Also added the -verbose option to 3dcalc.c.

1 May 1998:
 * Fixed plug_rename.c to work with compressed datasets.  Added a
     routine COMPRESS_add_suffix to thd_compress.c to facilitate this.

4 May 1998:
 * Added routine THD_purge_one_brick to thd_purgedblk.c, to allow
     freeing of one sub-brick from a malloc-ed dataset.  Also
     defined macro DSET_unload_one(dset,iv).

3 June 1998:
 * Modified AFNI_make_descendants to allow descendancy to flow
     from +acpc datasets, not just from +orig datasets.
     However, this doesn't work just yet, due to warping issues.

5 June 1998:
 * Modified 3dnoise.c to have option to set noise level on command
     line, rather than compute it.

9 June 1998:
 * Modified edt_clust*.c routines to implement -1clust_order option.
 * Modified 3drefit.c to have -nowarp option.

13 July 1998:
 * Incorporated Doug Ward's erosion+dilation routines into the
     clustering modules.

14 July 1998:
 * Added option -skip_afnirc to allow .afnirc file to be skipped.
 * Fixed bug in afni_setup.c that didn't manage the palette chooser
     menu when starting with 0 palettes and then later reading in some.
 * Fixed bug in plug_copy.c that put the anat type off by 1.  Also
     made the "Zero [One]" option not make the anat type always be omri.
 * Fixed bug in parser.f, whereby the vector versions of the boolean
     functions (or, and, mofn) were evaluated incorrectly.

15 July 1998:
 * Change afni_pcor.c to remove use of DENEPS test for division
     in computation of correlation coefficient.

17 July 1998:
 * Added program imstack.c to stack up a bunch of 2D images into
     the stupid MGH format.  [For Kathleen Marie Donahue.]

21 July 1998:
 * Added model_convgamma.c to represent a gamma variate convolved
     with a reference time series.  The "k" parameter of Doug Ward's
     model_gammaver.c was modified to be called "amp" here, since the
     impulse response is reparameterized to have peak value = "amp",
     rather than "k * (rb/e)**r", which is clumsy.
 * Modified Doug Ward's NLfit_model.h to ensure that certain routines
     needed by model functions can be forced to be loaded.
 * Modified 3dTSgen.c to make the "-ncnstr" and "-scnstr" options
     recognized, since there is a typo in the manual.
 * Modified Makefile.INCLUDE for 3dTSgen and 3dNLfim to use the
     proper dynamic linking load flags $(PLFLAGS), and also to include
     the proper dependencies.

22 July 1998:
 * Added routine THD_timeof_vox to thd_timeof.c.  This allows
     computation of voxel time from voxel index, rather than voxel
     coordinate.
 * Removed some redundant code from 3dTSgen.c -- it opened the
     input dataset twice in a row, and loaded the datablock when
     there was no need.
 * Modified 3dTSgen.c, 3dNLfim.c, and plug_nlfit.c to have new "-inTR"
     option to allow computation of model functions with TR set from
     the input dataset rather than fixed at TR=1.  Note that if the
     units of the dataset time axis are msec, they will be converted
     to sec instead (allowing msec to be used as a unit was a mistake).

27 July 1998:
 * Fixed a bug in routine suck_file in afni_setup.c, which put the
     terminating NUL character 1 place too far in the output array.
 * Wrote program uncomment.c, to remove comments from C files.
 * Added model_convgamma2a.c.
 * Modified NLfit.c to generate a fixed set of random samples instead
     of starting over for each voxel.  Also fixed the algorithm that
     keeps the best random samples -- it was not always keeping the
     best one, just some of them.

01 August 1998:
 * Added copyright information to some .c and .h files.
 * Modified mri_to_short.c to allow for special case of scale!=1.0.
 * Modified plug_realtime.c to allow for 2D image alignment.
     (Continuation of work from April that was unfinished then.)
     First cut is to do all registration at end of acquisition.
 * Turned off "frivolities" during a real-time run.
 * Added the ability to graph points+lines together in afni_graph.c
     (also see changes of 09 Jan 1998).

06 August 1998:
 * Added changes to thd_compress.[ch] made by Craig Stark/Paul Reber
     of UCSD, to allow them to use their custom decompression
     program "brikcomp".
 * Added realtime 2D registration to plug_realtime.c.
 * Modified 3dmaskave.c and plug_maskave.c to allow user to choose
     a sub-brick of the mask dataset.  plug_maskave.c also now lets
     the user save the mask average of a 3D+time dataset into the
     timeseries library (for use as a FIM, for example).  Also
     fixed an overflow bug in both programs when the mask range
     is too big for a short or byte dataset.

07 August 1998:
 * Modified display.[ch] to store extra information about the X11
     visual.  This isn't used yet, but is preparatory to allowing
     support for using TrueColor visuals and installed colormaps.

17 August 1998:
 * Adapted old Fortran PLOTPAK to in-memory plotting, with routines
     to graph to screen and to PostScript.
 * Used this to implement the "Plot" button in the timeseries chooser,
     and to do graphing of the realtime 2D motion parameters.

22 August 1998:
 * Modified display.c to support TrueColor visuals, and xim.c to
     support arbitrary byte ordering, plus 3 and 4 bytes/pixel.

23 August 1998:
 * Modified dbtrace.h and most afni_*.c files to allow not only
     debug tracing of routine entry/exit, but also the printout
     of other debugging information that was formerly hidden
     behind "#ifdef AFNI_DEBUG".
 * A few more changes to make xim.c work properly with depth=24,
     which can be either 3 or 4 bytes/pixel.

25 August 1998:
 * Modified afni_pcor.c change of 15 July 1998 to check denominator
     vs. DENEPS rather than 0.0.

09 September 1998:
 * Modified thd_sarr.c to add routine to "normalize" a list of
     files using the C library routine "realpath" and to cast out
     duplicate files.
 * Used this in afni.c and thd_get1D.c.
 * Also added *.1Dv files to list of allowable 1D extensions in
     thd_get1D.c.
 * Doug Ward provided me with the new 3dDeconvolve.c program, as
     well as some changes to 2dImReg and 3dRegAna.

14 September 1998:
 * Added "-install" option to afni.c to allow installation of a
     new X11 Colormap.  Also affected display.[ch], afni_widg.c,
     imseq.c, afni_graph.c, xutil.[ch], afni_plugin.c, to3d.c,
     and plug_drawdset.c.
 * Added "-2swap" and "-4swap" options to to3d.c, to allow data
     to be byte-swapped on input.  Also added a "Byte Swap" button
     to do the same thing interactively.

16 September 1998:
 * Modified 3dmaskave.c to allow selection of dataset sub-brick and
     dataset value range.

17 September 1998:
 * Added "-1zscore" option to 3dmerge.c (via edt_onedset.c, etc.).
 * Also completed the list of "p2t" and "t2p" routines, as well
     as adding "t2z" routines, in mri_stats.c and thd_statpval.c.

18 September 1998:
 * Added program cdf.c to provide a command line way to get results
     from the "t2p", "p2t", and "t2z" routines.
 * Modified afni_setup.c so that when a .pal file is input, the
     last newly defined palette becomes the active one in the
     AFNI controller which read the file in.

22 September 1998:
 * Added program 3dTcat.c, to catenate multiple 3D+time datasets into
     one big dataset (and possibly detrend them at the same time).
     This was adapted from 3dbucket.c

28 September 1998:
 * Modified edt_onedset.c to correctly deal with clipping a dataset
     when the clip range is larger than the dataset range, and the
     datum type is short.

29 September 1998:
 * Added routine mri_rota_shear() to mri_rota.c to do 2D image rotation
     using the Paeth shearing method combined with FFTs.

01 October 1998:
 * Modified mri_rota_shear to double up on FFTs -- speeds it up by
     about 30%.
 * Modified mri_align.c and mri_2dalign.c to allow choice of interpolation
     method at each stage of registration.
 * Modified imrotate.c, imreg.c, and plug_realtime.c to use the new
     image alignment methods.

09 October 1998:
 * Modifed afni.c and thd_fdbrick.c to allow the user to control the
     image flipping -- that is, to let left be displayed on the left.

16 October 1998:
 * Released 3dvolreg.c to Tom Ross for beta testing.

21 October 1998:
 * Added some routines to afni_plugin.c to create/manipulate PLUGIN_strval's
     [= label + textfield].

26 October 1998:
 * Finished plug_tag.c, and added tagset to a 3D dataset.  Modified afni.c
     to allow markers panel to open when there are no markers, so user can
     control the color of the tags.
 * Modified mri_max.c to fix the initial values.
 * Modified 3dvolreg.c and mri_3dalign.c to add a clipping option.

01 November 1998 [about]:
 * Added realtime 3D registration to plug_realtime.c.
 * Added quintic interpolation option to thd_rot3d.c and places that use it
     (3dvolreg.c, mri_3dalign.c, 3drotate.c, and plug_realtime.c).

03 November 1998:
 * Modified afni.c, afni_widg.c, and afni.h to allow user to lock the time
     indexes of controllers, as well as the spatial locations.

12 November 1998:
 * Modified 3dmerge.c to have new -1dindex and -1tindex options.

16 November 1998:
 * Modified mri_align.c, mri_2dalign.c, and mri_3dalign.c to ensure
     that the weighting factors are non-negative.
 * Modified 3dvolreg.c to skip registration on the base volume.
 * Added plug_volreg.c to do the same job as 3dvolreg.c.
 * Fixed bug in 3drotate.c that caused -[ab]shift commands without
     directional suffixes to be converted into zeros.

18 November 1998:
 * Fixed a bug in plug_power.c in the untangling of FFT coefficients.
 * Modified afni_slice.c to properly clip short and byte interpolation
     to avoid overflow.

20 November 1998:
 * Modified csfft.c to use unrolled routines for FFTs of length 16,
     32, and 64.  Also added special routines using the fft64 code
     to do lengths 128 and 256.
 * Modified mri_3dalign.c and 3dvolreg.c to allow specification of
     a different interpolation method to be used at the final
     rotation to the output brick.

23 November 1998:
 * Fixed a typo in plug_realtime.c and plug_volreg.c that made the
     choice of "Heptic" use quintic interpolation instead.

27 November 1998:
 * Fixed some logical errors in 3dmerge.c with interaction of -1dindex,
     -1doall, and the dataset I/O.

03 December 1998:
 * Fixed a problem in 3dmerge.c with "-datum float" and the sub-brick
     scaling factor, when editing one dataset only.

04 December 1998:
 * Added unrolled fft8() to csfft.c.
 * Modified thd_rot3d.c to start the FFT size calculation at least
     at 95% of the actual width rather than 90%.  This reduces the
     likelihood of wraparound effects.

10 December 1998:
 * Added a timeout for the child process in plug_realtime.c.

13 December 1998:
 * Fixed a bug in the dataset -> time series routines that didn't
     scale properly if some of the brick factors were zero and
     others were not.  Files affected: mri_to_float.c, thd_dsetto1D.c,
     thd_fdto1D.c, and thd_initdblk.c.

16 December 1998:
 * Removed TESTER code from afni_widg.c, and added some STATUS()
     printouts to trace progress.

17 December 1998:
 * Modified xutil.c to use XmChangeColor to change the color
     of a widget (routine MCW_set_widget_bg).
 * Added some changes by Doug Ward to speed up linear regression
     calculations.

22 Dec 1998:
 * Fixed a bug in plug_volreg.c, where the ax? variables were used
     before they were defined, resulting in the wrong order of output
     of the estimated movement parameters in the graphs and dfile.

30 Dec 1998:
 * Added function Winsor9 to the 2D transformations, in imseq.c.
 * Added RowGraphs to imseq.c, also affecting plot_ts.c (in coxplot)
     and afni.c.

31 Dec 1998:
 * Modified afni.c crosshairs to allow display only along certain axes.

03 Jan 1999:
 * Added routine MCW_widget_visible to xutil.c, and used it in imseq.c
     and afni_graph.c.

04 Jan 1999:
 * Fixed the time lock feature in afni.c so that it would not operate
     if toggled off.  [Oops]
 * Added AFNI_ALWAYS_LOCK environment feature.

05 Jan 1999:
 * Modified the way imseq.c places the dialogs (Disp and Mont buttons),
     so as to reduce the likelihood that some of the dialog will appear
     offscreen.
 * Added HorZ ('h') selection to afni_graph.c "Opt->Grid" submenu, which
     will draw a dashed line at the y=0 level in each sub-graph.

06 Jan 1999:
 * Modified afni_graph.c to try to avoid crashes when graphing window
     is closed using "Opt" menu "Done" button.  Seems to be caused
     by Expose events, but what exactly isn't clear -- happens on
     SGI systems.  Using the "Done" button now starts a 50 msec timeout
     before the "q" key is simulated.  Also, the Expose event count
     is now checked before processing, and only if event->count == 0
     is any work done.  Why these changes do the job is not obvious.

07 Jan 1999:
 * Modified afni_graph.c to move placement on screen of the
     "Opt->Colors Etc." submenu if it ends up placed directly over
     the "Opt" menu.  This could happen on some versions of Motif
     when the graph window is up against the right edge of the
     screen.  A callback is executed when the submenu is mapped,
     and if it is in a bad location, its XmNx value is changed.

10 Jan 1999:
 * Modified edt_coerce.c to make EDIT_coerce_type work with doubles.

11 Jan 1999:
 * Modified the rest of edt_coerce.c and edt_volamax.c to allow doubles.
 * Added thd_mastery.c, which allows a dataset to be "mastered" on input,
     so that its bricks are a selection of bricks from a master dataset.
     Adds the routine THD_open_dataset().  Modified 3ddata.h and a
     bunch of other functions.
 * Modified 3dinfo.c, 3dcalc.c, rtfeedme.c, from3d.c, 3drotate.c, and
     3dvolreg.c, to use the new opening routine, to allow for subset
     selection.

15 Jan 1999:
 * Fixed the old 3dpc.c to work with the new AFNI data storage,
     and to use the EISPACK routines instead of LAPACK (with help
     from Vinai Roopchansingh).
 * Made swap4 work with float input datasets as well as int.

19 Jan 1999:
 * Added "-1ddum" argument to 3dpc.c.

20 Jan 1999:
 * Fixed bug in mri_stats.c, where the "p2t" conversion was done backwards for
     the F statistic (p should have been q, and vice-versa).

21 Jan 1999:
 * Added SurfGraph feature to imseq.c.
 * Added OSfilt9 to imseq.c and the 2D transformations menu (afni.c).
 * Modified coxplot/plot_topshell.c to store a handle to the form at the top
     of the graph window hierarchy.
 * Modified xutil.c to add the "SaveUnder" property to the hints widget.

24 Jan 1999:
 * Modified coxplot (coxplot.h, plot_motif.c, plot_x11.c) to use the
     X11 Double Buffer extension, if HAVE_XDBE is defined.  This makes
     the redrawing of graphs look much smoother.

25 Jan 1999:
 * Created the "AREN" routines (aren.[ch]) for volume rendering, on top
     of VolPack.  Not sure what to do with them yet.

26 Jan 1999:
 * Fixed bug in initialization and usage of Xdbe library, in coxplot.

27 Jan 1999:
 * Add "UK Flag" location marker to RowGraphs and SurfGraphs.

29 Jan 1999:
 * Fixed afni_func.c so that if the user presses "See Function"
     when there is no function, it turns the toggle button back
     off.  Formerly, it turned off the internal flag, but didn't
     change the toggle button state, so that the user was fooled.

30 Jan 1999:
 * Added "Flood->Zero" and "Zero->Value" options to plug_drawdset.c.

05 Feb 1999:
 * Added plug_render.c, the first version (grayscale only) of the
     volume rendering code.
 * Changed name of AREN to MREN and put it in mri_render.[ch].
 * Cloned the mcw_graf.[ch] routines out of xv.
 * Added the coordinate stuff to 3dcalc.c.

07 Feb 1999:
 * Added new program 3dfractionize.c (per Ziad Saad).

09 Feb 1999:
 * Changes to imseq.c include putting the colorbar popup menu on
     ctrl-Button3 if there is only 1 image in the sequence, and
     changing the sharp-factor arrowval to run from 1-9 instead
     of 1-99.
 * Added "MCW_noactext" option to arrowvals (bbox.c), so that
     the usual actions taken when the user leaves the window
     are not taken.
 * Added many features to plug_render.c: automation, cutouts,
     and accumulation.
 * Fixed 3drefit.c -view option.

10 Feb 1999:
 * Added "Expr > 0" cutout to plug_render.c
 * Added SIND(), COSD(), and TAND() functions to parser.f

11 Feb 1999:
 * Modified many routines in mri_*.c to deal with MRI_rgb type
     images, in preparation for modifying imseq.c to deal with such.
 * Modified display.[ch] to include a "colordef" for conversion
     between Pixel and RGB triples.
 * Added routine to xim.c to convert MRI_rgb image to an XImage.
 * Changed imseq.c to allow MRI_rgb images.
 * Created program 1dplot.c.

15 February 1999:
 * Modifed mri_render.c to change the way it deals with color volumes.
 * Modified plug_render.c to allow for color overlays.
 * Modified xim.c and display.c to deal with converting a RGB image
     to an XImage in a more efficient way.

16 February 1999:
 * Modified bbox.[ch] to allow non-power-of-10 steps in an arrowval,
     if the av->fstep structure component is modified by the user.
 * Some minor cosmetic changes to plug_render.c.

18 February 1999:
 * In plug_render.c:
   + Replaced 'Remove Isolas' with 'Remove Small Clusters' in plug_render.c;
   + Added the slant cut planes.
 * In imseq.c, made it so that closing a rowgraph or surfgraph window
     turns off the feature.

22 February 1999:
 * New routine "addto_args" (addto_args.c) used to catenate stdin
     to the (argc,argv) command line of a program.  Testbed is
     3dRegAna.c (for D. Emge).
 * Added "LOCK_ZORDER" command to plug_realtime (for Vinai).
 * Fixed some bugs in plug_render.c having to do with the "Expr > 0" cutout:
     + Combination with AND was incorrect (counted ncdone too many times);
     + Test for evaluation to a pure number was incorrect if there were
       any leading blanks.

23 February 1999:
 * Fixed a bug in thd_trusthost.c.

25 Feb 1999:
 * Added the MEDIAN function to parser.f and 3dcalc.c.

01 Mar 1999:
 * Added the *_p2t, *_t2p, and *_t2z functions to parser.f, parser_int.c,
      and 3dcalc.c.
 * Created ASCII PPM file gmove.ppmap to use in gmovie csh script.
 * Removed tapering from FFT interpolation in thd_rot3d.c.

03 Mar 1999:
 * Modified thd_sarr.c to skip the realpath() expansion if the
     environment variable AFNI_NOREALPATH is set.

06 Mar 1999:
 * Removed GNU malloc from afni.c and incorporated my own mcw_malloc.[ch]
     functions/macros.

08 Mar 1999:
 * More changes to mcw_malloc.[ch].
 * Added macro FREE_AV() to bbox.h, because I found out that all the places
     where I used XtFree() on an arrowval would leave the string values
     (sval) high and dry.

09 Mar 1999:
 * In refit_MCW_optmenu (bbox.c), found I had to free the av->sval and
     ->old_sval values, since they were being abandoned.
 * Added AFNI_NO_MCW_MALLOC environment variable to mcw_malloc.c,
     to let user turn off these routines.

10 Mar 1999:
 * In afni_graph.c, added deletion of XImage after XGetImage
     is used to save the graph window to a file.

12 Mar 1999:
 * Fixed 2 bugs in plug_render.c:
     - opacity_scale changed wasn't checked if number of cutouts == 0
     - didn't invalidate overlay when loading new functional dataset

22 Mar 1999:
 * Added SOLARIS_DIRENT_PATCH code to mcw_glob.c.

23 Mar 1999:
 * Added call to reload_DC_colordef in imseq.c so that
     Save:one works properly after palette adjustment.

26 Mar 1999:
 * Added a FREE_VOLUMES to plug_render.c after a new anatomical
     sub-brick is selected.

29 Mar 1999:
 * Modified afni_receive.c and other places to allow for multiple receivers
     for an IM3D.
 * Modified plug_render.c to auto-redraw when it receives notice of a
     crosshair location move.

30 Mar 1999:
31 Mar 1999:
 * Modified afni_receive.c to allow for new types of transmission:
     DRAWNOTICE = notification that something was drawn
     DSETCHANGE = notification that dataset pointers may have changed
                  (needed when rescanning sessions)
 * afni_receive.c now handles transmission to all the interested
     viewers using the AFNI_process_* routines within.
 * Modified plug_drawdset.c to properly recover when rescan is used.
 * Modified plug_render.c to redraw when DRAWNOTICE is received,
     and to recover when rescan is used.
 * Modified 3dcalc.c to scale each output sub-brick to shorts/bytes
     separately, rather than globally [per request of KMD].

01 April 1999: [hope this isn't an unlucky date!]
 * Finally centralized the computation of the "[A]" type labels for
     AFNI controllers in afni_func.c, in the new routine
     AFNI_controller_label(im3d).  Then modified afni_plugin.c,
     afni_widg.c, plug_render.c, plug_drawdset.c, and plug_tag.c
     to use this function.

02 April 1999:
 * Modified thd_http.c to use directory $TMPDIR if defined, rather
     than always rely on /tmp.
 * Also added routines to this file to allow transfer of "ftp://"
     URLs -- this is done using a shell script running the
     ftp program.

03 April 1999:
 * Modified plug_render.c to have the currently active dataset
     "selected" when the user popups a new dataset chooser.
 * Removed the non-working rotation feature from 3ddup.c.

05 April 1999:
 * Modified thd_http.c to allow change of user ident for ftp://
     access to files.
 * Tested AFNI with LessTif v.0.89 -- seems to work.

13 April 1999:
 * Modified mri_read.c to allow 3D: hglobal to be < -1 as
     long as hglobal+himage >= 0 [per Gary Strangman of MGH].
 * Added mri_cut.c, function to cut out a sub-image.

14 April 1999:
 * Modified afni.c to fix the pbar_sgn_* initialization, since
     it incorrectly checked the thresholds against the range
     0..1 rather than -1..1 [per Chad Moritz of UW Madison].

15 April 1999:
 * Modified mri_read.c to also try ppm from mri_read() function.
 * Modified mri_write.c to write byte files as pgm.
 * Modified mri_to_rgb.c to have a 1 rgb image -> 3 byte image function,
     and fixed a bug in the 3 images -> 1 rgb image function.
 * Added mri_dup.c, to upsample a 2D image; added program imupsam.c
     to do this function from the command line.

19 April 1999
 * Modified afni.c, afni.h, afni_widg.c to add "Set All" button
     to Lock menu.

26 April 1999:
 * Fixed thd_info.c to report dataset axes dimensions correctly
     (also fixed DAXES_NUM macro in 3ddata.h).
 * Put code in plug_render.c that allows non-axial datasets to
     be rendered -- but disabled it for now.
 * New program 3daxialize.c will rewrite a dataset with BRIKs
     into the RAI (axial) orientation.

28 April 1999:
 * In 3daxialize.c, made sure that the slice-wise time offsets
     are nulled out.

27 May 1999:
 * Added an X defaults initializer for the graph ggap.

30 May 1999:
 * Added a variable polort order to afni.c, afni.h, afni_graph.c,
     and afni_fimmer.c.
 * Discovered a bug in afni_pcor.c in the % Change calculation,
     where the last ort wasn't being used in the baseline estimation.

02 June 1999:
 * Modified plug_render.c to draw partial crosshair sets like the
     image viewers.
 * Modified afni.c to send a "process viewpoint" message when the
     partial crosshair status changes, so that the renderer will
     get a notice and be able to redraw itself promptly.
 * Modified plug_realtime.c to use polort.
 * Added ability to change FIM background threshold percent (FIM_THR)
     to afni_graph.[ch], afni.c, afni_fimmer.c, and plug_realtime.c

03 June 1999:
 * Fixed thd_info.c where it refered to brick labels that might not
     exist -- now it uses the DSET_BRICK_LAB macro, which always works.
 * Fixed plug_realtime.c to add brick labels to the FIM dataset.

04 June 1999:
 * Added ***ENVIRONMENT section to .afnirc file processing: changes to
     afni_setup.c, and to afni.c to have environment variables setup
     before other things.
 * Made AFNI_load_defaults() in afni.c look at environment variable
     AFNI_name if X11 resource AFNI*name doesn't exist.

07 June 1999:
 * Fixed bug in edt_onedset.c that always applied the zscore transformation
     if possible!
 * Created afni_environ.[ch], which now process the ***ENVIRONMENT section
     of .afnirc.  Also, in all programs, switched use of getenv() to
     my_getenv(), which just makes sure that the .afnirc ***ENVIRONMENT has
     been processed before using getenv().  In this way, the .afnirc setup
     will be universal.

08 June 1999:
 * Added MCW_new_idcode() to 3drotate.c -- was producing datasets with identical
     idcodes, which is terrible!
 * Added function THD_check_idcodes() [thd_checkidc.c] to allow AFNI to check
     the idcodes in all datasets for duplicates.

15 June 1999:
 * Fixed afni_receive.c to return the proper "key" value from function
      AFNI_receive_init().
 * Modifed plug_render.c to redisplay func dataset statistics after
      receiving a drawing notice.
 * Modified afni_plugin.[ch] to crosscheck each plugin's compilation
      date with AFNI's, and print a warning if they differ.

17 June 1999:
 * Added program 24swap.c.

07 July 1999:
 * Added program 3dTsmooth.c.
 * Modified afni_plugin.c to skip date crosscheck on systems that don't
      have the C function strptime().
 * Added -vnorm option to 3dpc.c.

13 July 1999:
 * Added "Scripts" option to plug_render.c.

14 July 1999:
 * Modified "Scripts" in plug_render.c to allow save/restore of grafs.
     Also modified mcw_graf.[ch].

19 July 1999:
 * Fixed a bug in 3dcalc.c, where it tested CALC_type[ids] for > 0, whereas
     it should have been >= 0.  The effect was that 3D+time byte valued
     datasets were not loaded into the atoz array.

29 July 1999:
 * Fixed afni_graph.c to drop use of XComposeStatus in call to XLookupString,
     which was causing trouble on SunOS.
 * Line 2707 of afni_graph.c also had an "==" for assignment, instead of "=".
     The effect was a possible failure of the x-axis (xax_tsim) graphing
     mode.  I don't think this failure ever occured in practice.

30 July 1999:
 * Added program float_scan.c and function thd_floatscan.c to check
     floating point files and arrays (respectively) for illegal values
     (e.g., NaN and Infinity).  Incorporated thd_floatscan() into
     thd_loaddblk.c (if AFNI_FLOATSCAN is set).

01 Aug 1999:
 * Changed "Voxel Coords" and "Show Hints" pushbutton on Misc menu to
     toggle buttons.  Modified afni.h, afni_widg.c, and afni_func.c.
 * Added a "writeownsize" option to the Misc menu, but then changed
     my mind and #ifdef-ed it out.

02 Aug 1999:
 * Added the AFNI splash screen; see afni_splash.[ch].

06 Aug 1999:
 * Modified afni_plugin.[ch] to allow plugins to set a sequence code,
     which determines the order in which the plugins appear on the menu.
 * Received 4 plugins (plug_hemisub, plug_maskcalc, plug_roiedit, plug_maxima)
     from the estate of Rick Reynolds.

07 Aug 1999:
 * Added a "[left is left]" or "[left is right]" label to the winfo text
     in AFNI coronal and axial images displays.  Affected files:
     imseq.[ch], afni.c.
 * Removed the non-toggle code leftover from the 01 Aug 1999 changes.

08 Aug 1999:
 * Added the radix-3 routine to csfft.c.
09 Aug 1999:
 * Added the radix-5 routine to csfft.c.
 * Modified edt_blur.c, thd_rot3d.c, and plug_power.c to use new FFT abilities.

19 Aug 1999:
 * Added -indump option to 3dmaskave.c.
 * Added "Jump to (ijk)" button to image window popup: afni.[ch], afni_widg.c.

23 Aug 1999:
 * Added 1/N scaling option to csfft.c.  Modifed fftcheck.c accordingly.

29 Aug 1999:
 * Modified count.c to accept a '-scale' option.
 * Modified Tom Ross's 3dNotes.c software to be a set of routines (thd_notes.c),
     for eventual use in a plugin.

30 Aug 1999:
 * Modified afni_fimmer.c to accept an upper limit on the computable
     percent change.

31 Aug 1999:
 * Added a History Note feature to thd_notes.c.
 * Added a routine to afni_plugin.c to produce a command string
     summary of the inputs to a plugin.
 * Modified many programs and plugins to write to the History Note.

01 Sep 1999:
 * Wrote a Notes viewing/editing plugin.

08 Sep 1999:
 * Modified the error messages in some of the thd_*.c files to
     be more verbose (Bharat Biswal couldn't understand one).
 * Modified afni_fimmer.c (and afni.h, afni_graph.c) to allow computation
     of "% From Ave" = percent change computed from the average instead
     of from the baseline [per AJ].

11 Sep 1999:
 * Got History changes from Doug Ward.

14 Sep 1999:
 * Added complexscan function to thd_floatscan.c.
 * thd_loaddblk.c now scans complex inputs for errors, if requested.
 * to3d.c now scans float and complex input images for errors.
 * to3d.c now clips out all but a few of the input image files on
     the command line for the History Note.

15 Sep 1999:
 * Added -slices option to 3dmaskave.c.
 * Added default values for i,j,k to 3dcalc.c.
 * Added thd_makemask.c.
 * Added -mask option to 3dpc.c.

16 Sep 1999:
 * Changed THD_open_one_dataset() to THD_open_dataset() in programs
     3dFourier.c, 3dROIstats.c, 3dmaskave.c, 3dnvals.c, 3dproject.c, 3dttest.c.
 * Modified 3dclust.c to use -1dindex and -1tindex, as in 3dmerge.c
 * Modified 3dTcat.c to have options -rlt+ and -rlt++.

19 Sep 1999:
 * If dataset header doesn't have BYTEORDER attribute, thd_info.c now prints
     "{assumed}" next to the reported byte order.
 * Added hostname to History Note time stamp, so you can see what on what
     machine a program was run.

20 Sep 1999
 * thd_initdblk.c: print out a warning if byte order is unspecified when
     creating a dataset.
 * thd_notes.c: add the username to the History Note stamp.

21 Sep 1999
 * added message about 3drefit to thd_initdblk.c.
 * modified MEDIAN function in parser.f to handle N=3 case separately.

24 Sep 1999
 * Fixed wcsuffix bugs in afni_graph.c:
     - didn't mangle output name correctly!
     - overwrote the end of the wcsuffix string!

28 Sep 1999
 * Added environment variable AFNI_PCOR_DENEPS to afni_pcor.c,
     so that user can set the DENEPS test for the correlation
     coefficient calculation.

30 Sep 1999
 * Added plug_histog.c (histogram plugin) and a histogram
     plotting routine to afni_plugin.c.

04 Oct 1999
 * Added histogram of correlation coefficient to plug_histog.c.

05 Oct 1999
 * Fixed bug in mcw_malloc.c, where it printed out the wrong
     info when it found an overwrite error in a malloc()-ed
     block of memory.

06 Oct 1999
 * Modified plug_histog.c and afni_plugin.[ch] to plot extra curves
     in histograms.
 * Modified coxplot/plot_motif.c to look harder for the HOTCOLOR before
     it gives up and uses the default.

07 Oct 1999
 * Modified thd_makemask.c to include a counting function.
 * Modified plug_histog.c to use THD_makemask() rather than create
     its own mask the hard way (I just forgot about that routine).
 * Added program 1deval.c, to evaluate an expression at a bunch
     of points and write it to disk - the goal is to simplify
     creation of sample 1D files.

08 Oct 1999
 * Increased buffer size in mri_read.c for ASCII file line length.

09 Oct 1999
 * Added AFNI_ENFORCE_ASPECT environment variable, to make imseq.c
     enforce the image aspect ratio - this is to be used when the
     window manager doesn't do this properly.

13 Oct 1999
 * Added program 3dTstat.c to compute the same stuff that plug_stats.c
     does, but in a batch program.

14 Oct 1999
 * Added option -apar to 3drefit.c, to allow (re)setting of the anat parent.
 * Added option -warp to 3dfractionize.c, to allow inverse warping from +tlrc
     coords back to +orig coords during the fractionation process.

18 Oct 1999
 * Added history copy to afni_func.c's creation of follower datasets.
 * Added -preserve option to 3dfractionize.c, to allow the output dataset
     to keep the input values, rather than create a fractional mask.
 * Added program 3dmaskdump.c, to dump voxel values out to ASCII.
 * Added qsort_int() to mri_percents.c.

19 Oct 1999
 * Added program 1dtranspose.c.
 * Added option -noijk to 3dmaskdump.c.
 * Added option -tim to afni.c - also modified afni.h, afni_graph.[ch], and
     afni_func.c to make it work.  This option is like -im, but interprets
     the images as being spread thru time rather than space.

20 Oct 1999
 * Modified -tim in afni.c to allow for 3D inputs (space-then-time=-zim,
     or time-then-space=-tim).

21 Oct 1999
 * Fixed a couple of small bugs in 1deval.c.

28 Oct 1999
 * Removed "experimental" message for TrueColor visuals in display.c.
 * Added csfft_nextup_one35() function to csfft.c.
 * Modified various programs to use csfft_nextup_one35() in place
     of csfft_nextup(), for efficiency.
 * Moved shifting routines from thd_rot3d.c to thd_shift2.c, so that
     they can be used in other programs.

29 Oct 1999
 * Added thd_1Dtodset.c - provides the inverse of thd_dsetto1D.c
     (inserts a vector into a dataset time series, rather than extracts it).
 * Add thd_detrend.c - detrend a timeseries and provide mean, slope.

30 Oct 1999
 * Modified thd_detrend.c to have linear and quadratic detrending,
     and an L2 normalizing function.

31 Oct 1999
 * Finished program 3dTshift.c - time shifting.

01 Nov 1999
 * Modified 3dclust.c and edt_onedset.c to have a -verbose option, so as to
     print out progress report info.
 * Added MCW_hotcolor() to xutil.[ch], to get rid of HOTCOLOR macro usage.
 * Added function PLUTO_set_butcolor() to afni_plugin.[ch], to let plugin
     set its menu button color.

02 Nov 1999
 * Modified 3dcalc.c to fix problem with using sub-brick selectors of the
     form "-b3 zork+orig" -- if zork+orig was a 3D+time dataset, and it
     was used as the template for the output, the output would be marked
     as 3D+time even though it was not.  The solution was to mangle such
     inputs to the form "zork+orig[3]", which already worked fine.

03 Nov 1999
 * Fixed the -help output for 3drefit.c, in the description of "-apar".

09 Nov 1999
 * Added function RWC_visibilize_widget() to xutil.[ch] - used to ensure
     that popup widgets are fully onscreen.  Used this function in
     afni_func.c, afni_graph.c, afni_setup.c, bbox.c.
 * Added missing "void" to declaration of function setup_tmpdir() in
     thd_http.c.

16 Nov 1999
 * Added more -help to 3dTshift.c, per MSB's comments.
 * Added cubic detrend routine to thd_detrend.c.
 * Added mri_read_1D() to mri_read.c.  This adds the ability to
     do sub-vector selection, and does the transpose too.
 * Added mri_write_1D() to mri_write.c.  This just does the
     transpose before called mri_write_ascii().
 * Modified 1dtranspose.c, 3dcalc.c, waver.c, afni_graph.c, and
     model_convgamma*.c to use mri_read_1D().
 * Modified afni_graph.c to use mri_write_1D().
 * Added program 3dDetrend.c: remove time series trends.
 * Added predefined 't' and 'l' to 3dcalc.c.

17 Nov 1999
 * Removed some -help from imcalc.c, since 3dcalc -help has the
     same info.
 * Added function PARSER_1deval() to parser_int.c.
 * Added environment variable AFNI_MARKERS_NOQUAL to afni.c.
 * Fixed bug in 3dDetrend when -expr string had no variable symbols.
 * Modified thd_iochan.c to use SO_REUSEADDR to help close down
     sockets quickly.  (But later commented this code out.)

18 Nov 1999
 * Modified cs_addto_args.c to make the mangling of the arglist
     more flexible.
 * Used the previous change in afni.c to add the environment variable
     AFNI_OPTIONS that will always be added to the command line args.
 * Incorporated the OSF1 changes from Matthew Belmonte.

22 Nov 1999
 * Added -histpar option to 3dcalc.c.
 * Added differential subscripting to 3dcalc.c.
 * Modified thd_intlist.c to allow for negative list elements.

23 Nov 1999
 * Modified 3dcalc.c differential subscripting to allow abbreviations
     of the form a+j, a-k, etc.
 * Added -quiet option to 3dmaskave.c.
 * Added -normalize option to 3dDetrend.c.
 * Fixed error in afni_func.c (and adwarp.c) when writing out a dataset
     that was told to have a byte order different from the native order -
     it was written in native order and the header wouldn't know about
     that - the result was the file was read in incorrectly later.
 * Also fixed same error in 3daxialize.c.
 * Also fixed thd_writedblk.c and thd_loaddblk.c to handle byte swapping
     on complex data correctly.

24 Nov 1999
 * Added program 1dfft.c - to calculate abs(FFT(timeseries)).
 * Modified 1deval.c to allow input of time series.
 * Got some 3dDeconvolve.c changes from Doug Ward.

25 Nov 1999
 * Added program 1dcat.c - catenate *.1D files.

28 Nov 1999
 * Added function ZTONE to parser.f.

29 Nov 1999
 * Added -tocx, -fromcx, and -nodetrend options to 1dfft.c.
 * Modified quadratic detrending calculation in thd_detrend.c.
 * Added -use option to 1dplot.c.
 * Added SHOWOFF macro to afni.c, distmake, and Makefile.INCLUDE.
 * Got some 3dDeconvolve.c fixes from Doug Ward.

30 Nov 1999
 * Modified 3dTshift.c to allow "-tzero 0.0" and "-slice 0" as
     options (I used <= instead of < in the original code).
 * Modified plug_render.c to reset func_cmap_set=0 if a render
     handle is destroyed - the colormap wasn't being properly
     reloaded when a new underlay dataset was selected.
 * Modified SHOWOFF handling in afni.c to always show compilation
     date no matter what.

01 Dec 1999
 * Modified afni.c and afni_func.c to turn on XSynchronize if -TRACE
     option is used (or when DBG_trace gets set to 2).
 * Fixed bug in afni_func.c AFNI_force_adoption() routine: the
     PRINT_TRACING output after the dataset scan would crash if no
     dataset was found.
 * Modified imseq.[ch] and afni.c to set "sides" strings for an image,
     so that "left=SIDE" can be displayed correctly in any orientation
     of the image flipping process.

03 Dec 1999
 * Print a warning message in afni_func.c when a forced adoption takes
     place.
 * Disable "sides" labels if an environment variable is present.
 * Incorporate "-quiet" options in 3dclust.c and 3dROIstats.c from
     Mike Beauchamp.
 * Incorporate sub-dataset selection for various statistical programs
     from Doug Ward.

07 Dec 1999
 * Added program 3drename.c, to rename dataset .HEAD and .BRIK files
     at the same time.
 * Added environment variable to control Winsor21 function in imseq.c.

08 Dec 1999
 * Oops.  Took out some debugging statements in 3dTstat.c that somehow
     survived until now.
 * Modified count of forced adoption potential conflicts in afni_func.c
     to avoid some warning messages.
 * Added "NULL" to return in plug_tag.c, where it had been forgotten.
 * Added program 1dnorm.c.
 * Added -byslice option to 3dDetrend.c.

09 Dec 1999
 * Added -hilbert option to 1dfft.c, and -install option to 1dplot.c
 * Added 0 definition of DBG_trace to dbtrace.h in the case USE_TRACING
     is not defined.

13 Dec 1999
 * Added mode functions to parser.f, parser.inc, and 3dcalc.c.
 * Added -force option to adwarp.c; otherwise, program will not now
     overwrite existing dataset.
 * Modified function qginv() in mri_stats.c to never return a value
     greater than 13, no matter how absurd the value the user enters.
 * Modified edt_dsetitems.c, editvol.h to have a new editing item:
     ADN_anatpar_idcode - to let a program attach an anat parent idcode
     to a file (vs. an anat parent dataset).
 * Modified afni_func.c to NOT print out a forced adoption message when
     a dataset is set to be its own anatomy parent.
 * Modified plug_maskave.c to properly initialize sum=sigma=0 for EACH
     separate sub-brick calculation.

14 Dec 1999
 * Modified edt_emptycopy.c, editvol.h, and afni_plugin.c to have newly
     created datasets get assigned the same anatomy parent as their
     progenitors.
 * Modified afni.c so that manually warped datasets become their own
     anat parents.
 * Modified 3drefit.c to allow SELF and NULL to be valid arguments to
     the -apar option.

20 Dec 1999
 * Modified parser.f to remove the possibility of divison by zero in
     the expression evaluation routines.
 * Modified display.[ch] and plug_render.c to allow 'non-mixing' of
     colors displayed from rendering results.

21 Dec 1999
 * Modified plug_render.c to put the 'non-mixing' stuff into a separate
     menu on the 'Color' popup.
 * Took 3dROIstats.c mods from Mike Beauchamp for the -summary option.

03 Jan 2000
 * Modified 3ddata.h to increase maximum number of datasets per directory
     to 512 anats and funcs (each), and max number of directorys to 80.
 * Modified afni.h, afni_fimmer.c, afni_pcor.c, and afni_graph.c to
     add "% From Top" option to FIM menus.

04 Jan 2000
 * Added gran(m,s) function to parser.f and 3dcalc.c.
 * Added "Set All" and "Set Defaults" buttons to FIM+ menu in afni_graph.[ch].
 * Removed contents of file README.changes.
 * Abbreviated "Cannot find ..." error messages in thd_reconpar.c.
 * Added total dataset count report to afni.c input routine.

05 Jan 2000
 * Changed default AFNI_SPLASHTIME to 1.0 seconds in afni.c.
 * Added "static" to mixshade menu strings in plug_render.c.
 * Added MCHECK to DBG_SIGNALS in dbtrace.h.
 * Added routine mri_write_raw() to mri_write.c.
 * Modified from3d.c to have -raw and -float options.

07 Jan 2000
 * Modified plug_render.c to allow ShowThru color overlays: by doing two
     renderings - underlay and overlay separately - and then compositing
     the two images afterwards.

10 Jan 2000
 * Modified plug_render.c to add AFNI_RENDER_SHOWTHRU_FAC variable to
     control the compositing of ShowThru images.
 * Added program afni_vcheck.c, to check the AFNI version against the
     master copy back at the central AFNI web site.

11 Jan 2000
 * Replace "New Stuff" button under the Misc menu with "Version Check",
     which just runs afni_vcheck and puts the output into a popup.
 * Modified plug_render.c to make Cutout Overlay work properly with
     ShowThru.

13 Jan 2000
 * Added plug_scatplot.c - scatter plotting.  Added PLUTO_scatterplot()
     function to afni_plugin.[ch].
 * Fixed error in setup of Range choosers in plug_histog.c - they
     were initialized to incorrect values.

19 Jan 2000
 * Modified to3d.c to count and report number of negative voxels when
     the input images are shorts - this is to provide a check for the
     need for byte-swapping.

20 Jan 2000
 * Also added a popup error message when floating point errors are
     detected in inputs to to3d.c
 * Added "1xN" pattern to 24swap.c to allow for nonswapped data.

24 Jan 2000
 * Fixed error in -mask[n] option processing in 3dROIstats.c - that
     fiend Tom Ross used argv[narg] instead of argv[narg-1] to check
     for the presence of the "n" option.

27 Jan 2000
 * Modified thd_sarr.c and thd_get1D.c to speed up (hopefully) reading
     of *.1D files.
 * Modified afni.[ch] to allow use of "-no1D" option to skip reading
     of *.1D files from the dataset directories.

28 Jan 2000
 * Modified coxplot/plot_x11.c to skip use of XDBE if AFNI_NO_XDBE
     environment variable is set.

01 Feb 2000
 * Added file afni_fimfunc.c, which lets the "user" add a function to
     the FIM+ menu.  The Spearman rank correlation is included as a
     sample.  Also included small changes to afni.[ch], afni_graph.[ch],
     and a large-ish addition to afni_fimmer.c.
 * Removed useless "break" statements in afni_graph.c that produced
     some annoying "unreachable code" compilation warnings.
     Also modified bbox.c bbox and arrowval utility routines to check
     if the input items are NULL before accessing them.

02 Feb 2000
 * Modified 3dvolreg.c to make it not print out the -help stuff when
     argc==2.
 * Added uran() function to parser.

03 Feb 2000
 * Modified GRAN() random number generator in parser.f to make it be
     less obviously periodic.

04 Feb 2000
 * Added IRAN() integer deviate, ERAN() exponential deviate, and LRAN
     logistic deviate generators to parser.f
 * Added THD_extract_many_series() function, and used in to speed up the
     fimfunc work in afni_fimmer.c.
 * Fixed error in 3dbuc2fim.c, where stat_aux array was not malloc()-ed
     large enough for the EDIT_dset_items() routine usage.

06 Feb 2000
 * Added mcw_malloc_sizeof() to mcw_malloc.[ch], to return the size of
     of a malloc()-ed region, if possible.
 * Added TRUNCATE_IMARR() macro to mrilib.h.

10 Feb 2000
 * Added 3A.: image formats to allow input of unstructured ASCII files
     into AFNI programs.  Routines changed in mri_read.c and mcw_glob.c.

14 Feb 2000
 * Added -median and -MAD options to 3dTstat.c (but not to plug_stats.c).

29 Feb 2000
 * Revived the program 3ddot.c and added masking options.

02 Mar 2000
 * Added plug_nudge.c to move dataset origins around.
 * Added -dxorigin (etc.) option to 3drefit.c.

06 Mar 2000
 * Added -sagittal, -coronal switches to 3daxialize.c.

07 Mar 2000
 * Modified plug_realtime.c, to reject nzz=1 datasets, print out better
     error messages, etc.
 * Modified rtfeedme.c to have -nzfake option, for testing the above.
 * Modified jp_afni.c to get orientations correct for Signa realtime.

08 Mar 2000
 * Added sync() to plug_realtime.c after writing datasets.

15 Mar 2000
 * Added AFNI_VIEW_ANAT_BRICK and AFNI_VIEW_FUNC_BRICK environment
     variables to afni.c to force switching back to "view brick"
     mode when switching datasets.
 * Added "{warp}" string to titlebar when "Warp Anat on Demand" mode
     is engaged.

16 Mar 2000
 * Added -cmask option to 3dmaskdump.c (via new file edt_calcmask.c).

04 Apr 2000
 * Added thd_base64.c routines for dealing with BASE64 encodings.

07 Apr 2000
 * Included 3dWavelets code from Doug Ward.

11 Apr 2000
 * Fixed bug in 3drotate.c when input was a master-ed file.  Also added
     -clipit option to 3drotate.c.
 * Fixed bug in parser_int.c where stdlib.h wasn't included before
     drand48() was called.
 * Added AFNI_GRAYSCALE_BOT to display.c.

12 Apr 2000
 * Added AFNI_SYSTEM_AFNIRC environment variable, to allow introduction
     of a system wide .afnirc file.
 * Added the ability to change datasets in the renderer from script files
     (using the saved ID code string).  Also, made the threshold slider
     change when the script changes the threshold value (forgot this
     visual detail before).

14 Apr 2000
 * Added options -1Dfile to 3dvolreg.c and plug_volreg.c to save movement
     parameters to a 1D file for later ortologizing.

16 Apr 2000
 * Oops.  Added AFNI_SYSTEM_AFNIRC stuff to afni_environ.[ch] as well.

18 Apr 2000
 * Rewrote plug_nudge.c to do rotations and shifts.
 * Added mri_copy.c.

21 April 2000
 * Fixed bug in qsort_floatfloat (cs_sort_ff.c).
 * First version of plug_betafit.c.

28 April 2000
 * Modified plug_realtime.c (and afni_plugin.[ch]) to do "Image Only" realtime
     acquisition - just show the images, don't do anything else.

01 May 2000
 * Modified afni_widg.c to disable Datamode->Misc->Version Check if in
     realtime mode (due to long hang time while master version web page
     is fetched across the network).
 * Added program 3dfim+.c from Doug Ward.

09 May 2000
 * Added program imcutup.c and function mri_uncat2D.c to break 2D images
     up into pieces.

10 May 2000
 * Modified afni_fimmer.c to print out an error message if nvox is zero.
     This happens if the FIM Bkg Thresh is too high.  Also modified
     afni.c to allow this value to be initialize to 0 (before, 1% was the
     minimum).

12 May 2000
 * Incorporated NLfim changes from Doug Ward, to include calculation
     of R**2, per my request.

18 May 2000
 * Add plug_second_dataset.c and code in afni_graph.c to use it - a
     "1D function" that returns the time series from another dataset,
     for example to plot the -snfit output of 3dNLfim on top of the
     original dataset.

19 May 2000
 * Added changes from Doug Ward for a "-mask" option to 3dNLfim.c.

22 May 2000
 * Added AFNI_USE_THD_open_dataset environment variable to allow
      THD_open_one_dataset (in thd_opendset.c) to call THD_open_dataset
      instead (in thd_mastery.c), if a "[" is also present in the
      dataset pathname.
      !!! This feature must be used with care, since some programs    !!!
      !!! (e.g., 3dbucket) will break if it is used.  A program that  !!!
      !!! writes to a pre-existing dataset MUST NOT open that dataset !!!
      !!! with a sub-brick selector list.                             !!!

23 May 2000
 * Modified thd_idcode.c to use lowercase in dataset IDcodes.

08 Jun 2000
 * Added new picture to splash screen (the MCW gang).  Also, added
     AFNI_IMAGE_PGMFILE environment variable to afni_splash.c

15 Jun 2000
 * Added option "-nscale" to 3dcalc.c [that damn Tom Ross again].
 * Added an SCO Makefile [from Jason Bacon] and a couple of patches
     to go with it.
 * Added "Save to PPM" button to color pbar popup menus, to let the
     user save a representation of the color overlay scheme.
 * Fixed check_pixmap in pbar.c to be correct in TrueColor.
 * Added "Tran 0D" to color pbar popup for AFNI controllers (but not
     for the rendering plugin).

16 Jun 2000
 * Added "Tran 2D" to color pbar popup for AFNI controllers.
 * Fixed "Save to PPM" to save a check pattern for the "none" color.

19 Jun 2000
 * Added ability to set initial string in a "user-typein" string field
     in PLUTO_add_string().
 * Created plug_environ.c.

30 Jun 2000
 * Moved plug_environ.c into main afni, on the Misc menu.  Modified
     places where environment variables are used to allow this
     "Edit Environment" feature to work.
 * Added "|FFT()|" 1D function to afni.c.
 * Created program Xphace.c.

03 Jul 2000
 * Added 2DChain pseudoplugin.

11 Jul 2000
 * Added program 3dZeropad.c.

12 Jul 2000
 * Added Left-Right mirror option to afni_graph.[ch] and afni.c to
     make graph pixel layout correspond to images if left-is-left.

17 Jul 2000
 * Added new program 3dTagalign.c.
 * Fixed a bug in the "Write" callback in plug_tag.c.

20 Jul 2000
 * Modified 3dTagalign.c to write matrix+vector to a file and to
     the output dataset header.
 * Modified 3drotate.c to read matrix+vector of transformation from
     a file or from a dataset header.

21 Jul 2000
 * Added AFNI_ENFORCE_ASPECT to afni_pplug_env.c.
 * Added AFNI_IMAGE_PGMFILE_[1-9] to afni_splash.c.

08 Aug 2000
 * Used thd_floatscan() to check/fix possible float errors from
     user functions (in the thd_make*.c functions and in afni_fimmer.c).
     Was prompted by errors produced in Ziad Saad's Hilbert plugin.

09 Aug 2000
 * Modified thd_floatscan.c to use finitef() on Linux.
 * Modified 3dcalc.c to use thd_floatscan() to check results.
 * Modified 3dmerge.c to have -1fmask option to restrict filtering,
     and -1filter_expr option to do arbitrary linear filtering.
     (Also changed editvol.h, edt_checkargv.c, edt_filtervol.c, and
      edt_onedset.c)

22 Aug 2000
 * Added 'To Disk?' option to plug_maskave.c for the 'doall' case.

24 Aug 2000
 * Modified most places where SESSTRAIL is used to use SESSTRAIL+1,
     so that when filenames are shown, they show all the directories
     that are shown in the "Switch Session" dialog. [Per the suggestion
     of Florian Hauch, Munich.]
 * Also modified afni_pplug_env.c to enable AFNI_SESSTRAIL to be
     controlled interactively, and to have it modify the window titles
     and session lastnames when AFNI_SESSTRAIL is altered.

01 Sep 2000
 * Incorporated changes from Ziad Saad to the Hilbert delay plugin.
 * Modified plug_nudge.c to output a 3drotate command line to stderr
     when the feeble user presses the new 'Print' button.
 * Added call to AFNI_imseq_clearstat() to afni_plugin.c function
     PLUTO_dset_redisplay().

04 Sep 2000
 * Added -rotcom output to 3dvolreg.c (and hidden -linear option).
 * Modified -verbose output of mri_3dalign.c.

11 Sep 2000
 * Added -dxyz=1 option to edt_*.c, to allow clustering and filtering
     in 3dmerge.c to use fake values of dx=dy=dz=1.
 * Added -1filter_winsor to 3dmerge.c and edt_filtervol.c.
 * Added "IJK lock" to afni.[ch] and afni_widg.c (Lock menu).
 * Added -twopass option to 3dvolreg.c.

13 Sep 2000
 * Finalized -twopass changes to 3dvolreg.c.
 * Add -duporigin option to 3drefit.c.

14 Sep 2000
 * Added check of grid spacings to 3dvolreg.c

15 Sep 2000
 * Added -nscale option to 3dmerge.c

21 Sep 2000
 * Added 32 to mri_nsize.c.
 * Added AFNI_SPLASH_XY to afni_splash.c.

22 Sep 2000
 * Added isqDR_setifrac and isqDR_setmontage to imseq.c.
 * Added graDR_setmatrix, graDR_setgrid, and graDR_setpinnum to afni_graph.c.
 * Added PLUTO_set_topshell() to afni_plugin.c, and made several
     PLUGIN_CALL_IMMEDIATELY plugins use this to set the toplevel shell
     for later AFNI manipulation.
 * Modified afni_graph.[ch] to allow a graph window to be opened for a
     dataset of length 1.
 * Added textgraph mode to afni_graph.c, and also changed the baseline
     pushbutton to a toggle.

25 Sep 2000
 * Added -layout option to allow user to control initial window setup.
     Most changes in afni_splash.c, but also in afni.c, afni_widg.c,
     afni.h, etc.
 * Modified imseq.c to detect Expose events that have resized the
     image display window -- this happens sometimes when using -layout.

27 Sep 2000
 * Program xiner.c writes out Xinerama info about the display, if
     it is available.  This can be used to generate an X11 resource
     AFNI.xinerama.
 * If AFNI.xinerama is detected, then new routine RWC_xineramize (in
     xutil.c) can be used to adjust location of a rectangle to be
     sure it fits on a sub-screen.  Older routine RWC_visibilize_widget
     now uses this.  New callback RWC_visibilize_CB can be used to make
     sure menus pop up entirely on one sub-screen.
 * Many places now use visibilize to make sure dialogs and menus pop
     up on 1 sub-screen.  See, for example, all uses of the function
     RWC_visibilize_widget() and the macro VISIBILIZE_WHEN_MAPPED().

29 Sep 2000
 * Modified afni_graph.[ch] to move FIM and Opt menus onto private
     menubars.  (Got rid of grapher->option_mbar everywhere.)
 * Also put a Form inbetween the afni_graph shell and the drawing
     area.  The option_rowcol that holds all the menu buttons is
     now a child of the Form, not the drawing area.  This makes
     it possible to popup the menus with Button3 (the Button3
     popup on the drawing area interfered with this).

01 Oct 2000
 * Wrote program 3dUndump.c (create a dataset from an ASCII list
     of voxels, like an inverse to 3dmaskdump.c).

04 Oct 2000
 * Put most of the work of 3dZeropad.c into function thd_zeropad.c
     instead.
 * Added plug_zeropad.c.

09 Oct 2000
 * Enabled startup of RT plugin, and control of all options, via
     environment variables AFNI_REALTIME_Something.
 * Modified PLUTO_string_index() in afni_plugin.c to ignore blanks
     and case.

11 Oct 2000
 * Replaced XtAppAddWorkProcess in afni.c with PLUTO_register_workproc,
     since on Mandrake 7.01, dual P-III, XFree86 4.01 system, the
     realtime plugin workprocess doesn't start properly (some
     interaction with the startup workprocess, which does not occur
     on other systems).
 * Modified afni_splash.c to change controller crosshairs to Single
     mode if montage spacing is 1.
 * Modified afni_graph.c to change grid when program alters pin_num
     (but not when user does directly).
 * Modifed plug_realtime.c to start work process after a timeout.
 * Added PLUTO_register_timeout() afni_plugin.[ch], to execute a
     function after a given number of ms.

12 Oct 2000
 * Modified afni_graph.c to redraw with autoscale when matrix or
     length is changed by an external (isqDR_) command (not by
     the user directly).
 * Modified coxplot/plot_motif.c to get initial geometry of graph
     shell from an environment variable.
 * Minor changes to plug_realtime.c to make various things nicer.

13 Oct 2000
 * Modified plug_realtime.c to insert its own Xt event loop to deal
     with interface-freeze when the images are being slammed in as
     fast as possible (function RT_process_xevents).

16 Oct 2000
 * Modified fftest.c to allow use of FFTW; do "make fftwest" and
     run with nvec = -1.

20 Nov 2000
 * Fixed bug in -rlt+ option of 3dTcat.c: qmid was 0.5*ns, but
     should have been 0.5*(ns-1).  This makes the baseline wrong
     in each voxel.

24 Nov 2000
 * Modified plug_render.c to eliminate duplicate rendering of datasets
     when loading a script that changes dataset index.  This was caused
     by the dataset index CB routine calling draw, and then the script
     controller calling draw again.  Now, the routine that loads the
     widgets from the rendering state sets a variable that stops drawing
     if it should occur, then unsets this variable after widgets are
     loaded.
 * Modified 3drotate.c to have new -points option, to rotate a set of
     (x,y,z) triples using the same rotation as would be used for a
     dataset brick.
 * Modified 3dUndump.c to check (x,y,z) coordinates for validity.

27 Nov 2000
 * Modified plug_nudge.c to reload sub-brick statistic after moving it.

28 Nov 2000
 * Modified AFNI_plugin_button() in afni_plugin.c to allow user to
     have plugin buttons sorted alphabetically.
 * Fixed bug in plug_nudge.c where the interpolation mode was
     set improperly.

01 Dec 2000
 * Included Vinai Roopchansingh's modified plug_copy.c; this version
     allows the user to change the datum type, when doing a zero fill.
 * Added the "License Info" button to the Datamode->Misc menu.

05 Dec 2000
 * Included Vinai Roopchansingh's modified 3dhistog.c; this version
     adds the "-mask" option.
 * Fixed a bug in the PICTURE_ON/OFF macro (afni.h) so that it is
     only meaningful for dataset viewing (not for the -im case).

06 Dec 2000
 * Modified afni_pcor.c routine PCOR_get_perc to zero out the results
     if the last reference has no range (previously, it only zeroed
     out the coef[] array, not bline[]).
 * Added GPL/MCW Copyright notices to many many *.[ch] files.

09 Dec 2000
 * Modified 3dNotes.c and thd_notes.c to allow user to replace the History
     note, rather than just append to it.
 * Modified 3dvolreg.c to make the -twopass feature more robust for
     registering SPGR images.  Changes included a coarse grid search for
     an initial shift, and fading out the weights along the edges.

    =================================================
   == All changes from here on were made at the NIH ==
    =================================================

23 Jan 2001
 * Modified afni.c MAIN_workprocess() function to exit properly when
     the "nodown" variable is set.  Before, if a layout was set, then
     the layout code did the splashdown, and then the MAIN_workprocess()
     never signaled that it was done.
 * Modified thd_trusthost.c to use "192.168." as the prefix for Class B
     subnets, rather than "192.168.0.".
 * Modified mrilib.h to change my e-mail address macro.

24 Jan 2001
 * Modified 3dclust.c to use '-dxyz=1' option.
 * Modified afni.c so that graphs of anat buckets interact correctly when
     the anat bucket chooser is changed, or the graph "time index" is set.

25 Jan 2001
 * Modified mcw_malloc.c to use a hash table instead of a linear table.
     This speeds things up a lot.  Also added a serial number to each
     allocation, to help in identifying the order -- the dump is now
     sorted by serial number.
 * Incorporated Matthew Belmonte's codes plug_threshold.c and
     plug_permtest.c into the system.

26 Jan 2001
 * Converted dbtrace.h to debugtrace.c and debugtrace.h.  This is the
     start of an effort to incorporate traceback into all AFNI and
     mrilib functions.  As part of this, removed THD_DEBUG stuff from
     all library functions.

29 Jan 2001
 * Added DEBUGTHISFILE macro to debugtrace.h, and used it in thd_shear3d.c.
 * Modified 3drotate.c so that input of something like
      -ashift 10R 0 0
   won't have the 0s clobber the 10R; 0s with no direction code suffix will
   now be skipped in the computation of the dataset-coordinate shift.
 * Added a few words to README.copyright, and added a Q/A about it to the FAQ.
 * Added new program 3dMean.c.

31 Jan 2001
 * Modified thd_zeropad.c to keep the slice-dependent time shifts (toff_sl)
     when adding/removing slices in the z-direction.

01 Feb 2001
 * Modified thd_info.c to print dataset center (in addition to box edges).
 * Added thd_center.c (dataset center vector) and thd_mismatch.c (check if
     2 datasets are matched for voxel-wise comparisons).
 * Added program 3dAttribute.c, for printing out values of attributes from
     dataset header files (for use in scripts).

02 Feb 2001
 * Added function NIH_volpad (edt_volpad.c) to do zeropadding on 3D arrays
     - adapted from thd_zeropad.c.
 * Added THD_rota_setpad to thd_rot3d.c to set zeropadding amount for
     rotations.

05 Feb 2001
 * Added mayo_analyze.h to define the structure of an ANALYZE 7.5 .hdr
     file, and then added mri_read_analyze75() to mri_read.c.
 * Modified to3d.c to use image dimensions if they are set from the
     image file (as is possible with ANALYZE .hdr files, for example).
 * Modified mri_new.c to set dw=-666 as a flag that the d? variables
     defaults of 1.0 haven't been changed.
 * Modified thd_rot3d.c to allow setting of zeropad amount via
     environment variable AFNI_ROTA_ZPAD.
 * Modified 3drotate.c and 3dvolreg.c to use new command line option
     "-zpad n".
 * Modified to3d.c to use -zpad option to add zero slices in the z-direction.
     Also added attribute to header (TO3D_ZPAD) to mark this fact.  When such
     a dataset is used with -geomparent, then it's zero padding will be
     subtracted off when setting the new dataset's origin.
 * Modified 3dAttribute.c to have '-all' and '-name' options.

06 Feb 2001
 * Modified vecmat.h to have separate types and macros for float and
     double vectors/matrices.  Modified all places that used the old
     "FLOAT_TYPE double" method to use the new types/macros (mostly
     the 3D rotation codes).
 * Modified 3dvolreg.c to write rotation parameters, matrices, etc.
     to the header of the output dataset.

07 Feb 2001
 * Modified 3dZeropad.c to have '-z' option to add slices (evenly) in
     the dataset z-axis (slice) direction.
 * Modified 3drotate.c to deal with -rotparent and -gridparent options.

08 Feb 2001
 * Debugged several stupid errors in 3drotate.c changes of yesterday.
 * Implemented program cat_matvec.c to catenate matrix+vector
     transformations.
 * File thd_read_matvec.c reads a matrix+vector (THD_dvecmat; cf.
     vecmat.h) from a file, or from a dataset attribute.

12 Feb 2001
 * Modified edt_volpad.c to allow for unsymmetric padding.
 * Modified thd_zeropad.c to allow for producing an empty copy of the
     zero-padded dataset (so that you have to fill it up later).
 * Modified 3drotate.c and 3dvolreg.c to adjust the time-offset z-origin
     when the new dataset axes z-origin is adjusted.
 * Added a rint() function to mri_free.c (why there? why not?) if NO_RINT
     is defined in machdep.h -- that way I don't have to worry about it.
 * Modified 3drotate.c to shift time-offsets when the dz is large enough
     to warrant it.
 * Modified 3drefit.c to add new "-notoff" option, to reset time-offsets
     to zero.
 * Modified to3d.c to include "AFNI" in fallback resources, per the
     suggestion of J Bacon of MCW (copying what AFNI itself does).

13 Feb 2001
 * Modified thd_shear3d.c function rot_to_shear_matvec() to modify the
     input matrix to make sure it is orthogonal (using the transpose of
     DMAT_svdrot(q) as the orthogonal matrix closest to q).  User-input
     matrices may not be precisely orthogonal, which leads to problems
     in the shear calculation.  Ugh. Squared.
 * Added function THD_rotcom_to_matvec() to thd_rotangles.c -- this computes
     the matrix/vector of a transformation, given the "-rotate .. -ashift .."
     string.
 * Modified thd_zeropad.c (and 3dZeropad.c) so that padding can be specified
     in mm instead of slices.

14 Feb 2001
 * Modified 3dvolreg.c to include -rotparent/-gridparent options, a la
     3drotate.c.
 * Edited edt_volpad.c to include new function MRI_zeropad().
 * Modified thd_read_vecmat.c to include "-rotate ..." input option.
 * Added new function THD_rota3D_matvec() to thd_rot3d.c.
 * Added multiply and inverse macros for double vecmats to vecmat.h
 * Moved function DBLE_mat_to_dicomm() from 3drotate.c to thd_rotangles.c.
 * Replaced all copies of axcode() and handedness() with the library
     calls to THD_axcode() and THD_handedness() in thd_rotangles.c
     (changes to 3drotate.c, 3dvolreg.c, plug_nudge.c, plug_realtime.c,
     and plug_volreg.c).

15 Feb 2001
 * Added thd_tshift.c, which does what 3dTshift.c does (in place).
 * Used this to add -tshift option to 3dvolreg.c.
 * Also added -ignore option to 3dTshift.c.

16 Feb 2001
 * Added traceback information to mcw_malloc.c.
 * Added program 3dOverlap.c.
 * Added function THD_newprefix() in thd_newprefix.c.

20 Feb 2001
 * Added EXIT and TRACEBACK macros to debugtrace.h.

21 Feb 2001
 * Modified afni.c to disable use of mmap() from malloc() on Linux
     (malloc() would fail when memory was still available!).
 * Modified thd_mastery.c to force dset[] inputs to be relabeled
     as bucket types if they are not time-dependent.  This is to
     prevent interpretation as fico, etc.
 * Modified 3dmerge.c to allow use of sub-brick selectors on input
     datasets.
 * Modified thd_trusthost.c to make it easier to add hosts by name
     or by number, using a new function TRUST_addhost().
 * Added function PLUTO_turnoff_options() to afni_plugin.c; used this
     in plug_realtime.c to turn off all input options after processing.
 * Added AFNI_TRUSTHOST to afni_pplug_env.c so that user can add trusted
     hosts (for plugins/plugouts) interactively.
 * Modified thd_mastery.c and thd_loaddblk.c to allow for sub-ranging
     on dataset input, using the <a..b> syntax on the command line.

22 Feb 2001
 * Added program 3dClipLevel.c to estimate the cutoff value to excise
     background regions from anatomical datasets (especially EPI).
 * Added AFNI_CWD variable to afni_pplug_env.c, to let user change
     working directory (where output files like "Save:One" go).
 * Modified 3dOverlap.c to optionally save counts to a new dataset.
 * Fixed thd_mastery.c so that <a..a> works properly (<= vs. <).

26 Feb 2001
 * Modified plot_cox.c to allow copying, rescaling, and appending of
     vector plots, and plot_x11.c to allow setting rendering to a
     sub-box of the window (rather than the whole window).
 * Modified imseq.[ch] to allow fetching of a vector plot to be
     rendered into the window.
 * Modified afni_splash.c to draw "friends" stuff into the splash
     screen (after the first popup).
 * Added function mri_zeropad_2D() in mri_zeropad.c.  Changed name
     of MRI_zeropad() to mri_zeropad_3D() in edt_volpad.c.

27 Feb 2001
 * Added macro SAVEUNDERIZE() to xutil.h, and used it to make popup
     menus have the SaveUnder property in imseq.c, afni_graph.c,
     afni_widg.c, and plug_render.c.
 * Modified imseq.c to use AFNI_IMAGE_MINFRAC environment variable
     to set minimum size for image windows.  Also added this to the
     variables that can be controlled by afni_pplug_env.c.
 * Added fields does_saveunders and does_backingstore to display.[hc]
     (but don't use them anywhere - yet).
 * Modified thd_mismatch.c to do MISMATCH_DELTA only if voxel sizes
     differ by at least a factor of 0.001 (rather than perfect ==).
     Also fixed a typobug where the datasets would always compare
     as identical.
 * Modified 3dvolreg.c to fail if stupid users try to register dataset
     to base that doesn't match.

28 Feb 2001
 * New program 3dZregrid.c is for resampling a dataset along the slice-
     direction to change the grid spacing, etc.  Mostly intended to
     fixup user stupidities (e.g., not acquiring data on the same subject
     using the same slice thickness; d'oh!).
 * Modified thd_filestuff.c to remove '/' from THD_filename_ok() function.
     This lets the "-prefix" option of 3d* programs put the output dataset
     into a new directory.  New function THD_filename_pure() also checks
     for the '/'.

29 Feb 2001
 * Modified thd_initdkptr.c to properly treat directory components stored
     in prefixname.  [Ugh]

01 Mar 2001
 * Added "Max Count" input to plug_histog.c.
 * Fixed incorrect error message for "-nrep" option in 3dWinsor.c.
 * Added -blackman and -hamming options to 3dTsmooth.c [per MSB].

02 Mar 2001
 * Added thd_entropy16.c to compute entropy (bits/short) of a dataset.
 * Used entropy to force gzip of highly redundant datasets in
     thd_writedblk.c -- if AFNI_AUTOGZIP is on.
 * Modified afni_environ.c so that yesenv() and noenv() use my_getenv().
 * Modified afni_pplug_env.c to include AFNI_AUTOGZIP.
 * Modified afni.c to put DBG_trace= statements inside #ifdef USE_TRACING.
 * Modified 3dZeropad.c to not overwrite existing datasets [Oopsie squared].
 * Modified 3dmerge.c to print warning message for default indexes
     (if -1dindex and/or -1tindex is not used).
 * Added 3ddelay.c from Ziad Saad.

03 Mar 2001
 * Modified 3dTsmooth (yet again) to allow for different options for
     dealing with points past the beginning and end of time.

04 Mar 2001
 * New program ent16.c computes 16-bit entropy of stdin stream.  Can be
     used in a script to decide when to gzip datasets.

05 Mar 2001
 * Modified Ziad Saad's plug_delay_V2.h to use remainder() instead of
     drem() for Solaris, since Solaris doesn't have that BSD function
     for some stupid SysV reason.

06 Mar 2001
 * Modified display.[ch] to store RGB bytes for the underlay and overlay
     colors in the MCW_DC structure.  This is preparation for allowing
     direct RGB overlays into imseq.c.
 * Modified mri_new.c (and mcw_glob.c) to allow use of the special filename
     ALLZERO in 3D: input.  This will make it simple to create an empty
     dataset using to3d, for example.
 * Added -min and -max options to 3dTstat.c.
 * Modified 3dClipLevel.c to use all sub-bricks instead of just the first.
 * Added function ISQ_overlay() into imseq.[ch], to do the overlaying of
     underlay and color of MRI_short and MRI_rgb in all cases.

07 Mar 2001
 * Modified imseq.[ch] to add controls and functions for translucent color
     overlays, if X11 Visual is TrueColor.
 * Modified to3d.c, afni_plugin.c, and plug_render.c to turn off the
     overlay opacity arrowval for their particular image windows
     (since they don't use overlays anyhoo).
 * Modified rwc.xbm logo bitmap to include NIH logo along with MCW logo.

08 Mar 2001
 * Added median+MAD function to cs_qmed.c.
 * Added display of median+MAD to popup stats in afni_graph.[ch].
 * Added thd_dsetrow.c, thd_rowfillin.c, 3dRowFillin.c to do row filling
     between gaps (zeros) of like values.  Intended to complement the
     drawing plugin.
 * Modified plug_render.c to allow user to display the xhairs in the
     color overlay (meaning they can ShowThru).

09 Mar 2001
 * Fixed 1deval.c so that "-v" option becomes "-verb" (since "-v" had
     another meaning in that program).  Also modified several other
     programs so that "-verb" is accepted (instead of "-v" or "-verbose").
 * Modified imseq.c to de/re-sensitize overlay opacity arrowval when
     "See Overlay" is turned off/on.

12 Mar 2001
 * Modified mri_read.c to read Siemens Vision format .ima files.
 * Modified mrilib.h to have global variables MRILIB_* that hold
     orientation info from image files, if present.  Modified to3d.c
     to use this information.
 * New program siemens_vision.c prints out info from the .ima format
     files' header.

15 Mar 2001
 * Fixed bug in thd_shift2.c: when the shift was larger than the data
     line size, buffer overrun could occur.  In this case, the proper
     result is all zeros, so that's what I substituted.

19 Mar 2001
 * Fixed bug in thd_dsetrow.c, where putting a row back in for byte
     or float cases didn't have break statements, so it would be
     put twice, which is real bad (i.e., segment fault).
 * Added Linear Fillin to plug_drawdset.c.

20 Mar 2001
 * Added 3dDeconvolve.c update from Doug Ward.
 * Modified plug_histog.c to add "Aboot" feature.

21 Mar 2001
 * Modified coxplot to draw filled rectangles when thickness is set
     to -1.0.  Files affected are coxplot.h, plot_cox.c, plot_ps.c,
     plot_ps2.c, and plot_x11.c.
 * Added program 1dgrayplot.c to plot timeseries files (vertically)
     in grayscale, a la SPM.
 * Modified afni_plugin.c to remove the MCW_TIMER_KILL from the
     ButtonPress frivolity in image popups.  Also, hid this stuff
     behind the NO_FRIVOLITIES macro and NO_frivolities global variable.
 * Added program 3dToutcount.c to count outliers at each time point in
     a 3D+time dataset (idea from Bill Eddy).

22 Mar 2001
 * Added -save option to 3dToutcount.c, to leave markers of outliers
     behind.
 * Added script moveAFNI to install changed files from afni98.tgz into
     the current directory.

23 Mar 2001
 * Added thd_fetchdset.c, to get a dataset from a Web link.  This is
     called from THD_open_dataset() in thd_mastery.c.  Thus, you can
     now do something like
       afni -dset http://some.place/dir/anat+orig
     and see the dataset!

26 Mar 2001
 * Modified afni_func.c, afni_widg.c to add a "Read Web" button.
 * Modified thd_fetchdset.c to allow fetch of *.1D files as well.

30 Mar 2001
 * Added "Rota" buttons to afni_widg.c and plug_render.c, to rotate
     the colors on the pbars.
 * Added range hints to the pbar in afni_func.c and plug_render.c.

03 Apr 2001
 * Modified xim.[ch] to add a "force rgb" option to function XImage_to_mri(),
     so that one can always be sure of getting a MRI_rgb image (and so be
     sure of writing a PPM file with mri_write_pnm()).  Modified imseq.c and
     afni_graph.c to fit the new usage.

10 Apr 2001
 * Fixed a bug in 3dvolreg.c, where the "-base dset" option used a
     sub-brick index "bb" that was no longer initialized (bug reported
     by Tom Ross of MCW).

18 Apr 2001
 * Added some more printouts to 3dcalc.c and thd_loaddblk.c when malloc()
     fails on dataset input.
 * Added "-sum" and "-sqr" options to 3dMean.c.
 * Added program 1dsum.c.
 * Added machdep.c to do machine-dependent runtime startup (supplementing
     machine-dependent compiletime stuff in machdep.h).

20 Apr 2001
 * Added "addto_args" to a bunch of programs, to let them use the '-@'
     command line switch.
 * Added call to machdep() in a bunch of programs.

23 Apr 2001
 * Modified imseq.c to draw "EMTPY IMAGE" string into image window if
     a NULL image is returned.

24 Apr 2001
 * Added "record" capability to imseq.[ch].

25 Apr 2001
 * Modified imseq.c recording a little.
 * Fixed a bug in 3dAttribute.c in which the tross_Expand_string()
     result might be NULL, in which case printing it would crash
     on some systems.  Also, free()-ed the data from that call.

30 Apr 2001
 * Modified mcw_glob.c to print an message if an attempted expansion
     produces no files.

04 May 2001
 * Modified thd_loaddblk.c to print a message if a mmap()-ed file isn't
     big enough for the dataset byte count.

09 May 2001
 * Fixed a scale-resize bug in Solaris (why does this keep happening,
     and only on Solaris?!) in afni.c, afni_func.c, and plug_render.c.

10 May 2001
 * Fixed a bug in to3d.c with the Analyze/Siemens header geometry info:
     it was only processed AFTER the autosave test was executed.  It was
     moved before the autosave.  Also added the -zorigin option to let
     the user set the slice offset (a la 3drefit).

16 May 2001
 * Modified waver.c to add new -tstim option (for specifying stimulus
     times directly on command line).

18 May 2001
 * Modified afni_plugin.[ch] to STATUS() an error message if a
     plugin library cannot be loaded into the system.

22 May 2001
 * Modified thd_iochan.[ch] to add function iochan_recvloop(), which
     loops to receive as much data as possible without waiting.

23 May 2001
 * Modified thd_iochan.[ch] to add function iochan_fork_delay(),
     which allows relays of data from a shm IOCHAN to a tcp IOCHAN
     through a child process.

24 May 2001
 * Modified afni_plugin.c to fprintf(stderr) the error message if
     a plugin library cannot be loaded into the system.  (This way
     it always appears, even if trace is turned off.)

04 Jun 2001
 * Modified thd_iochan.c iochan_fork_delay() to retry communications,
     and to print more error messages.
 * Added DONT_USE_DEBUGTHISFILE to machdep.h and debugtrace.h.

05 Jun 2001
 * Modified afni_plugin.c to move some routines into the "always
     compiled" section; and afni_plugin.h to reflect this change.
     Small changes also to afni.h, afni_func.c, and afni_pplug_*.c.
     (All of this is to get afni to compile again without plugins.)

06 Jun 2001
 * Added directory qhulldir/ to contain the qhull program from UMN.
 * Fixed afni_vcheck.c to reflect the new webserver.

07 Jun 2001
 * Add cs_qhull.c to drive qhull program and compute Voronoi areas
     on sphere surface.

18 Jun 2001
 * Modified mri_read_ascii() in mri_read.c to skip lines that start
     with '#' character.

19 Jun 2001
 * Modified 3drotate.c to take the new -dfile/1Dfile options, per
     the request of David Glahn of UCLA.

22 Jun 2001
 * Fixed a bug in 3dUndump.c where it checked the wrong value against
     the z coordinate bounds - it would report illegal inputs when
     the (x,y,z) values were in fact legal.

26 Jun 2001
 * Added function THD_is_executable() in thd_filestuff.c.
 * Added thd_getpathprogs.c to get list of all executables in the path.

27 Jun 2001
 * Added ability to save images in various formats (.jpg, .gif, etc.)
     to imseq.[ch], using external programs such as ppmtogif, etc.

29 Jun 2001
 * Added program strblast.c to blast strings out of image files.
 * Modified 3dclust.c to use THD_open_dataset() instead of
     THD_open_one_dataset().

03 Jul 2001
 * Modified imseq.c to correct usage of pnmtotiff, which is NOT the
     same as ppm2tiff (first one writes to stdout, second to a file
     named on the command line).

05 Jul 2001
 * Modified afni.[ch] to include CM's from Talairach Daemon database,
     and re-enabled the long-dormant "Talairach to" button.
 * Added option "-nosum" to 3dclust.c.
 * Modified thd_loaddblk.c to skip byte order tests if all sub-bricks
     have byte datum.

06 Jul 2001
 * Modified 3dUndump.c to print a message if a voxel is written to
     more than once.
 * Added Doug Ward's changes to 3dDeconvolve.c, 3dConvolve.c, etc.

09 Jul 2001
 * Modified AFNI_transform_vector() in afni.c to use anat_parent
     transformations if the datasets aren't directly related.
 * Used this to modify the "Talairach to" feature (AFNI_talto_CB() in afni.c)
     to allow jumping even if the dataset is not in Talairach view, but just
     has a way of transforming the vector to Talairach view.

10 Jul 2001
 * Added "Where Am I?" Talairach Daemon feature to afni_widg.c, afni.[ch].
     Actual calculations done in thd_ttatlas_query.c.
 * Modified xutil.[ch] to add function to alter contents of a textwin.
 * Added edt_sortmask.c to sort a MCW_cluster based on its contents.

11 Jul 2001
 * Modified xutil.[ch] to add function MCW_unregister_hint().
 * Modified afni.c to add hint/help to "Where Am I?" textwin (and to
     remove help when the window is destroyed).

12 Jul 2001
 * Added afni_ttren.c, to control the colors of the display of the
     Talairach atlas regions (when I get around to it, that is).

13 Jul 2001
 * OK, made afni_ttren.c work with the volume renderer.
 * Modified mcw_glob.c to only print warning message if allowed to.
     Modifed various codes that use MCW_file_expand() to turn such
     messages on or off, depending on what I feel like.

24 Jul 2001
 * Modified thd_ttatlas_query.c to return up to 9 results, and to print
     a cautionary tail.
 * Modified plug_render.c to display TT atlas regions.

25 Jul 2001
 * Modified plug_render.c to histogram new dataset bricks and choose
     99.5% point as the default upper level for scaling.
 * Modified afni.c, afni_func.c, afni_widg.c, afni_warp.c to enable
     rendering of TT Atlas regions as overlays in 2D image viewers.

26 Jul 2001
 * Modified imseq.[ch] to allow 'Save One' to be independent of the
     output filter (e.g., so can save a montage into a JPEG file).

27 Jul 2001
 * Modified imseq.[ch] to add 'Sav:aGif' to save a sequence of images
     into animated GIF format (using gifsicle or whirlgif).
 * Included gifsicle directory into AFNI distribution, and added to
     Makefile.INCLUDE to make gifsicle (whirlgif was already there).
     However, neither of these program is made by default.

29 Jul 2001
 * Modified imseq.[ch] to add a range hint to the intensity bar.

30 Jul 2001
 * Fixed color pbar hintize alterations when user changes sub-bricks,
     in plug_render.c.

31 Jul 2001
 * Modified xutil.[ch] to add a routine to NULL out an arbitrary pointer
     when a widget is destroyed.
 * Used the above in afni.c to NULL out the pointer to the "Where Am I?"
     text window when the text window is destroyed because the user
     destroyed its parent imseq.

01 Aug 2001
 * Realized that the TT atlas overlay was setup for the small Talairach
     box, and most people now have large Talairach box datasets.  To make
     the system work, modified thd_ttatlas_query.c to allow programs to
     load an atlas with 141 I-S slices (the one on disk), or an atlas
     with 151 I-S slices (created via zero-padding).  Then modified places
     that retrieved the atlas dataset: afni_func.c, plug_render.c.  Ugh.
 * Also modified afni.c so that the "Atlas Colors" popup button is only
     enabled in +tlrc view.
 * Modified waver.c to add to -EXPR option.
 * Added -stdin option to 1dplot.c.

02 Aug 2001
 * Fixed bug in waver.c -EXPR option, so that if waveform_EXPR(t) is
     called with t < 0, it returns 0.
 * Included mpeg_encode directory into AFNI distribution, and added to
     Makefile.INCLUDE to make mpeg_encode.
     However, neither of these program is made by default.
 * Added Sav:mpeg to imseq.[ch].

06 Aug 2001
 * Modified coxplot/plot_motif.c to have plotting window close when
     user presses 'Q' or 'q' keystroke in the drawing area.

07 Aug 2001
 * Modified afni_graph.[ch] and afni.c to extend graph baseline concept
     to have a global baseline for all graphs (that doesn't change when
     the user moves around).
 * Modified afni_graph.[ch] to add a new Double Plot mode Plus/Minus to
     make the transformed function be added/subtracted from the dataset's
     time series, so we can see error bars from 3dDeconvolve's
     -iresp/-sresp outputs!
 * Added afni_pplug_1dfunc.c to make 1DChain pseudoplugin (also affected
     afni_func.c and afni_widg.c).

08 Aug 2001
 * Modified afni_graph.c and xutil.c to use new environment variable
     AFNI_DONT_MOVE_MENUS - if this is "Yes", then the menu movement
     functions will be skipped.  Also added this to afni_pplug_env.c.
     (As usual, this is in response to a problem on Solaris.)
 * Added program 3dZcutup.c to cut slices out of a dataset.
 * Modified various functions to work with single-slice datasets.
     Probably missing some still.

09 Aug 2001
 * Added program 3dZcat.c to put datasets together in the slice
     direction.
 * (Re)modified to3d.c to allow creation of 1 slice datasets.  Hope it
     works out this time.

10 Aug 2001
 * Added TENT() function to parser.f and parser.inc.
 * Added thd_dsetto3D.c, to extract/scale a float copy of a sub-brick.
 * New program 3dTqual.c computes a 'quality index' of each sub-brick
     in a 3D+time dataset.
 * Modified 1dplot.c so that -stdin option can read more than 1 column.

11 Aug 2001
 * Modified plug_scatplot.c to print correlation coefficient.

12 Aug 2001
 * Fixed bug in 3dClipLevel.c that used 1 past the end of the histogram
     array (bad Bob, bad).
 * Added functions thd_median_brick() and thd_cliplevel() in files
     THD_median.c and THD_cliplevel.c to the library.
 * Modified 3dTqual.c to use these library functions.
 * Modified 3dToutcount.c to have -autoclip option.

13 Aug 2001
 * Added -dt option to 3dcalc.c.
 * Added routine AFNI_logger() in afni_logger.c.

14 Aug 2001
 * Modified a bunch of programs to use AFNI_logger().

15 Aug 2001
 * Modified 3dToutcount.c to have a -range option, a la 3dTqual.c.
 * Added function THD_outlier_count() to do more or less what 3dToutcount.c does.
 * Used this in to3d.c to automatically check new 3D+time datasets for outliers.

16 Aug 2001
 * Modified afni_func.c to hintize the pbar in function AFNI_underlay_CB().
 * Modified the outlier stuff in to3d.c some.

20 Aug 2001
 * Incorporated revised TD database from San Antone.  Also penciled in
     the Nucleus Accumbens, since they seem to have missed it.

22 Aug 2001
 * Modified plug_drawdset.c to allow loading of overlay data from the
     TTatlas+tlrc dataset, on a region-by-region basis.

23 Aug 2001
 * Added program 3dTcorrelate.c to compute correlation coefficient of
     2 3D+time datasets, voxel by voxel.
 * New file thd_correlate.c computes various correlation coefficients
     between vectors.
 * Added constant detrending to thd_detrend.c.

24 Aug 2001
 * Modified 3dTcorrelate.c to have "-polort -1" option.
 * Modified afni_friends.c.
 * Modified to3d.c, which tried to popup outlier message in batch mode.
     Also, made it check for negatives again after 2swap; skip outlier
     check if too many negatives (more than 1%); print percentage of
     negatives in negatives report.

26 Aug 2001
 * Modified to3d.c to have -save_outliers option.

28 Aug 2001
 * Modified thd_correlate.c Pearson routine to initialize sums (oops).

29 Aug 2001
 * Created cs_sort_template.h, a file to generate quicksort functions from
     a macro-defined type and macro-defined order.
 * Adapted 1st version of agni.[ch] to fit into afni, for surface display.
     Changes also to afni.c (to draw the damn thing), imseq.c, and some
     other minor junk.

30 Aug 2001
 * Modified coxplot/plot_cox.c to have a flip_memplot() function, for use
     in imseq.c graphing overlay.
 * Modified coxplot/plot_x11.c to draw a Point rather than a Rectangle
     if the rectangle has width=height=0.
 * Modified afni.c to draw surface nodes in correct places, rather than
     in center of their voxels.  Also involved changes to thd_coords.c,
     to have new functions for floating point coords in FD_bricks.

05 Sep 2001
 * Modified machdep.[ch] to provide some support for Mac OSX (Darwin).
 * Modified agni.c to do volume map (vmap) correctly, and faster.

06 Sep 2001
 * Modified afni_plugout.[ch] to have "NO_ACK" option, so that plugout
     messages aren't acknowledged.  This is necessary to avoid race
     conditions with a plugout that both sends and receives messages.
 * Modified afni_plugout.[ch] to allow sending and receiving of SURFID
     for surface node identifiers.
 * Wrote plugout_surf.c as a demo of the SURFID interchange.

07 Sep 2001
 * Modified agni.[ch] to put a mask into the vmap to mark the level
     of expansion at which the voxel was mapped.
 * Modified agni.c to using ENTRY/RETURN.
 * Modified agni.c to check for duplicate node id's when creating a surface.
 * Modified afni.c and afni_plugout.c to strip off the vmap mask when
     querying this array.
 * Modified machdep.c to get the _Xsetlocale() fixup function; added
     machdep() to a lot of programs (for Mac OS X compilation).

11 Sep 2001
 * Modified mri_render.[ch] and plug_render.c to allow depth cueing of
     ShowThru overlays (new option ST+Dcue on overlay opacity menu).

12 Sep 2001
 * Wrote thd_autonudge.c and 3dAnatNudge.c to try to fit EPI volume
     on top of scalped SPGR volume.

13 Sep 2001
 * Modified afni_plugin.c and NLfit_model.c to properly load .so objects
     on Mac OS X (DARWIN).

17 Sep 2001
 * Modified mri_read.c to add new function mri_read_ppm_header(),
     and to make mri_read_ppm() scale a PPM image to maxval=255.
 * Modified afni_splash.c to look for .afnisplash*.ppm files for the
     splash image override.

18 Sep 2001
 * Added mri_drawing.c to draw things into RGB images, and mri_coxplot.c,
     to use that to draw coxplot stuff into RGB images.

19 Sep 2001
 * In imseq.c, realized that the "Empty Image" memplot was being re-created
     multiple times, and this is stupid.  Now it is only created once, and
     is re-used from then on.
 * Also in imseq.c, realized that if last image in a Save sequence is
     NULL, and we are saving to an animation, then the animation won't be
     written and the saved images will never be deleted.  At least they
     will be deleted now (animation still won't be written, but at least
     an error message will be output).
 * Also in imseq.c, added montage overlay plots to function
     ISQ_make_montage().

20 Sep 2001
 * Modified imseq.c to do the overlay plot montage more efficiently
     (using less memory).
 * Modified imseq.c to draw labels returned by the get_image() function
     for each slice, both in single and montage images.
 * Modified afni.c to return a label for each slice.
 * Modified coxplot/plot_cox.c to have new function, create_memplot_surely().
     Modified a number of functions/programs to use this instead of looping
     over create_memplot() a number of times.

21 Sep 2001
 * Modified imseq.[ch] to adjust the way labels are drawn.
 * Fixed ISQ_saver_CB() bug in imseq.c: when Save:one was active and images
     were sent to an output filter, they needed to be forced into RGB mode
     even if they were grayscale.
 * Changes to afni.c and imseq.c to allow label and agni overlay colors to be
     controlled by environment variables.
 * Added function DC_parse_color() to display.[ch] to parse a color string into
     a (float) RGB triple.

23 Sep 2001
 * Added a setback environment variable to let image label placement be
     adjusted.
 * Modified afni_widg.c to load a color pixmap for use with the "wait"
     picture, if the visual is TrueColor.

24 Sep 2001
 * New program 3dcopy.c does what it sounds like: copies datasets.
 * Modified plug_drawdset.c to allow the user to make a copy of a
     dataset on input, and to have a SaveAs button.

25 Sep 2001
 * Modified plug_drawdset.c to have a new drawing mode, 'Filled Curve'.
 * Modified mri_read.c to allow .HDR and .IMA suffixes for Analyze
     and Siemens files, respectively (in addition to .hdr and .ima).
 * Modified mri_read_siemens() in mri_read.c so that if the environment
     variable AFNI_SIEMENS_INTERLEAVE is set to "Y" or "y", then the
     multi-images in a Siemens file are assumed to be interleaved rather
     than presented in order.
 * Modified to3d.c to have new option -sinter: sets AFNI_SIEMENS_INTERLEAVE
     to "Yes".
 * Modified plug_drawdset.c to do EVERYTHING_SHUTDOWN after Quit is pressed.
     For some reason, this was blocking proper Undo-ing if the user did Quit,
     then restarted the editor.

27 Sep 2001
 * Modified thd_md5.c to add UNIQ_idcode() function, which produces strings
     like "USA_mFs+P-tnCc1vQQM0UuL0Hg", using a modified Base64 encoding of
     the MD5 sum of some system info and the current time.
 * Modified thd_base64.c to avoid use of mrilib.h (so it can be easily used
     by non-AFNI programmers).
 * Modified thd_idcode.c to use UNIQ_idcode() instead of older method.
 * Modified 3ddata.h to extend length of MCW_idcode string to 32 (so can
     use results of UNIQ_idcode()).

01 Oct 2001
 * Modified afni_plugin.c to make plugin alphabetization the default (that
     is, the user has to "setenv AFNI_PLUGINS_ALPHABETIZE NO" to get the
     old behavior).

16 Oct 2001
 * Took new FD2.c from Andrzej Jesmanowicz, with changes to run with X11
     TrueColor visual.

18 Oct 2001
 * Modified thd_loaddblk.c to make THD_load_datablock() have only 1 argument;
     the "freeup" argument is moved to a file-scope variable, and is set
     by calling new function THD_set_freeup().
 * Modified lots of programs to use modified THD_load_datablock() correctly.
 * Modified DSET_load() macro in 3ddata.h.
 * Modified afni.c to use THD_set_freeup() with AFNI_purge_unused_dsets().
 * Added macro mri_zero_image() to mrilib.h.
 * Modified thd_fdto1D.c to zero output, then only access non-NULL bricks;
     this is to prevent crashes when a user tries to graph a dataset that
     didn't load correctly (cf. Sally Durgerian).
 * On some Solaris systems, displayed to SGI systems (cf. Mike Beauchamp),
     Button 3 doesn't always seem to get passed through.  The following
     changes are to let Button 1 also popup "hidden" menus:
       - imseq.c for wbar menu
       - imseq.c for wimage menu (if Ctrl or Shift also pressed)
       - afni_setup.c for Inten menu
       - afni_func.c for Hidden menu (in logo square)
       - plug_render.c for Inten menu and Xhair menu (latter is Button 2)
     However, these changes don't seem to work - the mouse events aren't
     received.  Ugh.

19 Oct 2001
 * Fixed bug in imseq.c: if pnmtops was NOT found but epstopdf WAS found,
     then the program would crash (this is the Ben Xu memorial bug).
 * Modified thd_winsor.c and 3dWinsor.c to have new "-clip" option.

22 Oct 2001
 * Fixed bug in 3dvolreg.c about -twopass weight brick (noted by
     William Gandler of the NIH).

25 Oct 2001
 * Added "-q" (quiet) option to afni.c (also affected afni.h, afni_widg.c,
     and afni_plugin.c).
 * Fixed bug in AFNI_set_viewpoint() in afni.c, so that the AGNI node
     is looked up only if we are in "view brick" mode.
 * Added program Vecwarp.c, at the request of David van Essen of Wash U.

26 Oct 2001
 * Added THD_surefit_to_dicomm() to agni.[ch] (from Vecwarp.c).
 * Modified agni.c to allow SureFit coord files to be read directly
     using <SureFit coord=filname IDadd=number/> in .SURF file.

29 Oct 2001
 * Added thd_mincread.c to read MINC format files as AFNI datasets.
     Also changed 3ddata.h, afni.c, thd_initsess.c, thd_mastery.c,
     thd_opendset.c, etc., and include subdirectory netcdf-3.5.0/
     that hold the NetCDF library.

30 Oct 2001
 * Modified MINC stuff to use AFNI_MINC_FLOATIZE environment to
     control conversion to internal floats, and to use
     AFNI_MINC_DATASETS to control whether AFNI itself looks
     at .mnc files.
 * Added program 3dMINCtoAFNI.c to re-write a MINC file into an AFNI
     dataset; 3drefit may be useful afterwards.

01 Nov 2001
 * Modified thd_mincread.c to allow :step attribute of dimensions
     to be missing (default=1), and even to allow the dimension
     variables to be missing.
 * Modified mri_new.c to use calloc() instead of malloc().
 * Modified MCW_choose_string() in bbox.c to use length of 1st line
     of label arg as size of text box, rather than strlen(label).
 * Modified afni_func.c to change way the "Read Web" button presents
     its chooser, and put some sample Web datasets on the server.

02 Nov 2001
 * Modified 3dmerge.c to protest if an input dataset (for merge)
     can't be loaded.  Also changed edt_onedset.c to use DSET_LOADED()
     macro.

05 Nov 2001
 * Modified thd_dsetto1D.c to break THD_extract_series() into two
     functions.  The new function THD_extract_array() returns data
     in an array supplied by the caller.  This is used in thd_median.c
     and thd_outlier_count.c to avoid the malloc/free cycle on
     thousands of voxel time series.
 * Modified thd_cliplevel.c to check bounds on hist[] array when
     loading it with shorts, and to increase size of hist[] by 1.
     (This last problem was causing to3d to crash.)  Also modified
     3dClipLevel.c in the same way.
 * Modified coxplot/plot_motif.c to disable "PS->printer" button if
     environment variable AFNI_PSPRINT isn't set.
 * Modified machdep.c to do enable_mcw_malloc() if environment variable
     AFNI_FORCE_MCW_MALLOC is yessish.  Modified mcw_malloc.c to have
     enable_mcw_malloc() return immediately if it is already enabled.
 * Modified qmedmad_float() in cs_qmed.c to free workspace array when
     done with it (oopsie).

07 Nov 2001
 * Modified afni_plugout.c to call AFNI_driver() function in response
     to "DRIVE_AFNI" commands.
 * Added afni_driver.c and AFNI_driver() function to carry out some
     user interface functionality from a plugout:
       - open windows, close windows
       - switch sessions, datasets
       - rescan this
       - quit
 * Added a button to the Datamode->Misc menu to start plugouts.

08 Nov 2001
 * Modified afni_driver.c to allow the OPEN_WINDOW function to have
     layout parameters geom=, ifrac=, mont=, matrix=, and pinnum=.

09 Nov 2001
 * Replaced isblank() in afni_driver.c with isspace() - the former
     is a GNU extension, the latter is standard.

12 Nov 2001
 * Modified imreg.c to have -cmass option for pre-alignment of
     center of mass.

13 Nov 2001
 * Modified afni_driver.c to allow OPEN_WINDOW to open a plugin.
 * Modified afni_splash.c so that layout code doesn't check plugin
     widgets if this is a custom plugin (which won't put widgets
     into the "plint" struct).

14 Nov 2001
 * Added OPEN_GRAPH_XY (etc.) to afni_driver.c, to display graphs
     from plugout data.

15 Nov 2001
 * Added plot_strip.c to coxplot/, for doing timeseries plots with
     recyling back to the left when the graph is full.
 * Added OPEN_GRAPH_1D (etc.) to afni_driver.c.
 * Added cutoff() to afni_plugout.c when it closes a socket.

16 Nov 2001
 * Modified coxplot/plot_strip.c to add an X at the end of each
      evolving graph.
 * Modified afni_driver.c to have command SET_GRAPH_GEOM.

20 Nov 2001
 * Modified coxplot/plot_cox.c to have functions to convert between
      user and memplot coordinates.
 * Modified afni_driver.c to remove debug print statements, and to
      add some comments.

21 Nov 2001
 * Modified thd_iochan.[ch] to set an error string in some functions.
      This can be retrieved with iochan_error_string().
 * Modified afni_plugout.[ch] to listen for connections on socket ports
      7955..7959.
 * Modified afni_plugout.[ch] to break input command strings from plugouts
      into substrings (separated by NULs) and execute them all.  This will
      let AFNI catch up when a plugout races ahead during a dataset read
      or a window resize, for example.

27 Nov 2001
 * Modified mri_read.c to apply the "funused1" entry in the Analyze .hdr
      file as a scale factor.
 * Added mri_scale_inplace() function (mri_scale.c).

28 Nov 2001
 * Modified mri_read.c to also allow floatizing of Analyze .img files,
      and guessing at orientation via SPM.

29 Nov 2001
 * mri_write_analyze() function to write an MRI_IMAGE to Analyze files.
 * 3dAFNItoANALYZE program to write a dataset to Analyze files.
 * Added -prefix option to 3dclust.c.

03 Dec 2001
 * Changes to mri_read() in mri_read.c to understand GEMS headers.
 * Changes to to3d.c to understand the GEMS header stuff, including
      a default TR (if user supplies TR=0).

04 Dec 2001
 * Cleaned up mri_read.c and to3d.c a little.
 * Got some small changes to 3dIntracranial.c from Doug Ward (-nosmooth).
 * New program ge_header.c prints out GEMS header information.

07 Dec 2001
 * Modified 3daxialize.c to allow arbitrary orientation of output
      (-orient option).  Also changes to ORCODE() macro in thd.h
      and to3d.h, and added new function to thd_fdbrick.c.
 * Modified imseq.c, afni_widg.c, afni.c, afni_graph.c, plug_render.c
      and xutil.h to change cursor slightly when it moves over a
      window that has a hidden Button-3 popup menu.
 * Modified 3dTstat.c to have NOD (no-detrend) versions of -stdev
      and -cvar.
 * Modified afni_widg.c to implement AFNI_START_SMALL.

11 Dec 2001
 * Fixed stupid errors in the cursor stuff, and propagated the changes
      to more places, so that most AFNI windows should now be properly
      cursorized.
 * Fixed bug in to3d.c - 1 slice with TR=0 on command line would crash.
 * Modified bbox.[ch] to allow user to set menu column length via
      environment variable AFNI_MENU_COLSIZE.
 * Modified bbox.c to allow user to use Button-3 to popup a list chooser
      for optmenus.

13 Dec 2001
 * Modified bbox.c to do XUngrabPointer if user presses Button-2 to try
      to popup a list chooser for optmenus.  If the optmenu is inside a
      popup menu, Motif never does an XUngrabPointer, thus freezing the
      X server until afni is killed from outside.  This seems to avoid
      that problem.

20 Dec 2001
 * Modified ge_header.c to use -verb option to print out more stuff.
 * Modified to3d.c to set default dataset type to ANAT_EPI_TYPE (-epan)
      if user is creating a 3D+time dataset.
 * Modified mri_read.c and to3d.c to correctly calculate and use
      MRILIB_xoff and MRILIB_yoff for GEMS images.
 * Modified afni.h, afni.c, afni_func.c to implement AFNI_GLOBAL_SESSION
      environment variable.

21 Dec 2001
 * Fixed up some rescan session problems with AFNI_GLOBAL_SESSION datasets.
      (We don't want to let them be destroyed or descendant-ized.)

28 Dec 2001
 * Modified matrix.[ch] and RegAna.c to speed up some of Doug Ward's
      matrix-vector calculations, to make 3dDeconvolve faster.  Makes
      it about 22% faster on an Athlon/Linux box.

08 Jan 2002
 * Modifications to make AFNI work under CYGWIN (www.cygwin.com):
   - Removed shm stuff from thd_iochan.c
   - Compile plugins directly into afni.exe (no dlopen)
   - Changing Makefile.cygwin and Makefile.INCLUDE to make
       PLUGIN_init() function have different names for each
       plugin compiled on CYGWIN
   - At this time, 3dNLfim, 3dTSgen, plug_nlfit, and plug_wavelets
       are not compiled for CYGWIN since they present difficulties.

28 Jan 2002
 * Modified cs_qhull.c to use centroid instead of normal for midpoint.

29 Jan 2002
 * Modified afni.c function AFNI_setup_viewing() to correct problem when
     viewing the same functional bucket in two controllers - the bucket
     widgets might not get set up correctly due to false memories.

30 Jan 2002
 * New program 3dAutoTcorrelate.c for PAB.

31 Jan 2002
 * Modified imseq.c to allow scrollbars on the Disp button dialog, if
      AFNI_DISP_SCROLLBARS is yessish.
 * Modified imseq.[ch] and afni.[ch] to provide slice_proj projection
      functionality.

01 Feb 2002
 * Put most transform functions from afni.c and imseq.c into new file
       afni_transforms.c.
 * Added 3dFDR.c from Doug Ward, and some changes to 3dDeconvolve.

02 Feb 2002
 * Added extreme_proj() to afni_transforms.c.

04 Feb 2002
 * Modified thd_getpathprogs.c to correctly skip searching the same
     directory twice, rather than the cheap (strstr) way done before.
     The old way caused problems when /usr/bin/ was ahead of /bin/,
     for example.
 * Similar changes to NLfit_model.c, afni_plugin.c, and thd_get1D.c.
 * Removed the NULLIFY_ON_DESTROY() call for the whereami textwin in
     afni.c, since the kill function for this window does the same
     thing.  This may be the cause of the bug that Jill Weisberg
     reported (that the whereami function stops working and then
     crashes AFNI when the user presses the Quit button).

05 Feb 2002
 * Put #undef USE_TRACING in FD2.c, since it uses STATUS() for something
      else.

06 Feb 2002
 * Adapted modified plug_histog.c from Vinai Roopchansingh (added the
     "Output" option to write results to a file).

19 Feb 2002
 * Modified 3dAutoTcorrelate.c to add "-time" option.

25 Feb 2002
 * Adapted modified 3dDeconvolve.c from Doug Ward.
 * Modified thd_getpathprogs.c to skip path elements that aren't directories
     (some people have no clue, do they?).

26 Feb 2002
 * Modified afni.c to fix up the bucket widgets in AFNI_setup_viewing() again
     (cf. 29 Jan 2002)

27 Feb 2002
 * Modified various files to replace "AGNI" with "SUMA" (SUrface MApper).
     For example, we now have afni_suma.[ch] instead of agni.[ch].

28 Feb 2002
 * Fixed a small problem with thd_info.c (damn you, Jim Haxby).
 * Incorporated a few more 3dDeconvolve changes from Doug Ward.
 * First cut at putting niml.[ch] into AFNI, along with afni_niml.c.

06 Mar 2002
 * Many changes over the last few weeks to include NIML support for
     talking to Ziad Saad's SUMA program.

07 Mar 2002
 * Modified afni_graph.c (and afni_pplug_env.c) to make Button3 popup
     text info window be a scrollable textwin rather than a menu popup
     if the number of lines is too long; "too long" is defined by new
     environment variable AFNI_GRAPH_TEXTLIMIT.
 * Modified mrilib.h to add field "was_swapped" to MRI_IMAGE struct.
     Then modified mri_read.c to set this field if it auto-swaps the
     image on input.  Then modified to3d.c to skip doing -2swap/-4swap
     on such images.

08 Mar 2002
 * Modified afni_graph.c and afni.c to add 2 environment variables to
     let user set the initial graph baseline parameters.
 * Modified afni_func.c, afni.c, and afni.h to allow the Define Function
     value label to be recomputed/redisplayed even if only 1 image
     window is open.

10 Mar 2002
 * Modified coxplot/plot_cox.c, plot_x11.c, plot_ps2.c to allow circles.
 * Modified afni.c, afni_pplug_env.c to use environment variables to set
     SUMA overlay box size and color.
 * Modified imseq.c so that 'q' keypress causes a window close (to make
     this window like the various graph windows).
 * Modified afni_niml.c to receive SUMA_ijk triangles.
 * Modified afni.c to draw triangle/slice intersection lines.
 * Modified afni.c to allow specification of AFNI_FIM_IDEAL on startup.
 * Modified afni.c to set Dummy session directory to 1st argv directory.

11 Mar 2002
 * Modified afni.c to have SUMA overlay box and line color environment
     strings set to "none" mean to skip that overlay step.  (The lines
     look better without the boxes.)

12 Mar 2002
 * Implemented "zoom" feature in imseq.c (with a little help from bbox.h).
 * Modified mri_dup.c to allow linear as well as heptic upsampling.
     Use this for faster zooming in imseq.c.

13 Mar 2002
 * Modified imseq.c to not reload the zoomed Pixmap if the image isn't new.
     This speeds up scrolling the zoomed image quite a lot.
 * Modified coxplot/plot_x11.c to work properly if the first call to the
     rendering function is into a Pixmap instead of a Window.
 * Fixed a bug in niml.c that created NIML_TRUSTHOST_%2d environment variable
     names - should have been NIML_TRUSTHOST_%02d (D'oh).
 * Modified mri_dup.c to upsample byte-values images by 2/3/4 in special code.
     This makes imseq.c zooming faster.

14 Mar 2002
 * Modified mri_dup.c to use 171/256, 85/256 as approximations to 2/3, 1/3 for
     upsampling byte arrays by 3 - this avoids a division, and should be
     faster.  Also a function to do upsample by 4 of 2D RGB images all at
     once - this turns out to be worth the effort - speeds up nearly twice.
 * Modified thd_loaddblk.c to check if sub-bricks are all the same datum; if
     not, always uses malloc() and also prints a warning to stderr.
 * Incorporated changes from Doug Ward:
   * The group statistical analysis programs (3dANOVA, 3dANOVA2, 3dANOVA3,
       3dRegAna, 3dMannWhitney, 3dWilcoxon, 3dKruskalWallis, 3dFriedman), when
       creating an AFNI 2-subbrick dataset or a bucket-type dataset, previously
       used the following format for the output datum types:
          "intensity" sub-bricks -- same as input dataset
          statistical sub-bricks -- scaled short integer
       The above programs have been changed so that all output subbricks
       will now have the scaled short integer format.
   * Modified program 3dbucket, so that if there is more than one input
     dataset, it will copy the command line history from the first input
     to the output bucket dataset.

15 Mar 2002
 * Modified imseq.c ISQ_show_zoom() function to discard old zoomed image if
     the pixmap had to be re-created.
 * Modified mri_dup.c to do 3x RGB upsample in special function, too.
 * Modified imseq.c to do panning with Button1 when the new 'pan' button
     is on - the "old" arrowpad buttons have been excised.

16 Mar 2002
 * Modified afni.c to not start NIML until the startup timeout is called.
     Otherwise, very early data might try to popup a window before that
     is possible.  Also, made NIML be turned on by default.
 * Modified afni_niml.c to have the popup messages include the I/O and
     processing time for large data elements.
 * Modified imseq.c (and afni_pplug_env.c) to keep panning mode on if
     AFNI_KEEP_PANNING is yessish.
 * Modified xim.c to speed up rgb_to_XImage(), by doing TrueColor and
     PseudoColor in separate functions.

17 Mar 2002
 * Modified afni_niml.c to disable NIML listening if all potential sockets
     are busy.  This is to prevent an endless series of error messages
     when 2 AFNIs are running at once.
 * Modified afni.c to add option "-noniml".

18 Mar 2002
 * Modified afni.c to make it necessary to use -niml or AFNI_NIML_START to
     have NIML listening activated from the beginning.

22 Mar 2002
 * Modified mri_dup.c to correctly shift RGB images by 1/2 pixel.
 * Modified afni.c to correctly draw coordinates for lines shifted by 1/2 pixel.
 * Modified afni.c and afni_pplug_env.c to allow user to draw crosshairs with
     lines instead of overlay pixels.

23 Mar 2002
 * Modified imseq.c to zoom and draw overlays on Save One images.

25 Mar 2002
 * Modified imseq.c to crop saved zoomed images if ordered by environment
     variable AFNI_CROP_ZOOMSAVE.

26 Mar 2002
 * Modified imseq.c to save zoomed images in filtered Save many code as well
     (including animations).  Also set "Save to .ppm" as the default save mode,
     if possible.

27 Mar 2002
 * Modified 3dinfo.c, thd_info.c to have a -short option.
 * Modified imseq.c to have isqDR_options save the output filter, rather than
     reset it. (Otherwise, Left-is-Left loses the new default "Save to .ppm".)
 * Modified parser.f and 3dcalc.c to include a mad() function.

28 Mar 2002
 * Added function mri_move_guts() to mri_free.c, in preparation for multi-
     plotting in afni_graph.c.

29 Mar 2002
 * Modified afni_graph.c to accept multi-plot timeseries.
 * Added plug_nth_dataset.c to generate multi-plot timeseries.
 * Fixed bug in to3d.c that disabled -4swap option (from 07 Mar 2002).

05 Apr 2002
 * Added (x,y,z) coord printout to "Where Am I" window.
 * Modified imseq.[ch] to remove ALLOW_ZOOM conditional, and to allow zoom/pan
     from 'z', 'Z', and 'p' keystrokes.

09 Apr 2002
 * Some minor changes to machdep.[ch] to make AFNI work on Mac OS X 10.1.3.

10 Apr 2002
 * Remove malloc.h include from mpeg_encode files for OS X compatibility.
 * Modify thd_automask.c to only keep largest connected component.
 * New program 3dAutomask.
 * Modified a few programs to use -automask as a synonym for -autoclip:
     3dAutoTcorrelate.c, 3dTcorrelate.c, 3dToutcount.c, and 3dTqual.c.

11 Apr 2002
 * New program 3dAFNItoMINC.c, and new function thd_mincwrite.c.
 * Fixed bug in thd_mincread.c: it formerly scaled float inputs, which
     apparently is wrong.

15 Apr 2002
 * Changes to afni.c, afni_func.c, afni_slice.c, afni_warp.c, etc., to allow
     MRI_rgb-valued datasets.  These can be created in to3d from ppm input
     files.

16 Apr 2002
 * Modified thd_mincread.c to correctly use lower end of valid_range[].
 * Modified thd_mincwrite.c to use "-range -scan_range" flags with
     rawtominc program.
 * Modified 3dvolreg.c and 3drotate.c to make -clipit the default.
 * New program 3dThreetoRGB.c to create RGB datasets from 3 bricks.
 * Modified mri_read.c to use new "3Dr:" input format for RGB files.
 * Modified 3dAutomask.c to add history note.
 * Modified afni_plugin.h and NLfit_model.h to read dlfcn.h from
     dlcompat/ subdirectory on Darwin systems.
 * Modified afni.c to allow environment variables to set +tlrc box size.

17 Apr 2002
 * Modified afni_sumafunc.c to allow for MRI_rgb fim overlays.

18 Apr 2002
 * Modified thd_automask.c to erode/dilate the result, so as to clip off
     tenuously connected blobs.
 * Modified edt_clust.c to make MCW_erode_clusters() return void, not
     void *, since it doesn't actually return anything.

19 Apr 2002
 * Modified thd_automask.c to have fill in functions.
 * Modified 3dAutomask.c to have -fillin option.
 * Modified cox_render.c to remove memset() of new image to 0, since
     mri_new() does this since 01 Nov 2001.

22 Apr 2002
 * Modified debugtrace.h to include "last_status" variable: keeps of copy of the
     last STATUS() string, and prints it when the program crashes.
 * Modified thd_dsetdblk.c to deal with NULL dataset at very end - the SUMA stuff
     didn't check for that, which caused a crash if the dataset couldn't be
     constructed.

26 Apr 2002
 * At last seem to have figured out how to make the orientations change
     w.r.t. spatial axes - added these changes to plug_crender.c.

28 Apr 2002
 * Added the orientation changes to plug_render.c as well.

29 Apr 2002
 * New functions in thd_mnicoords.c to translate TT atlas coords to/from
     MNI template coords.
 * Used above in thd_ttatlas_query.c.
 * Samia Saad was born today!

30 Apr 2002
 * Modified 3dclust.c to add -mni option.
 * Modified 3dclust.c, edt_clust.c, edt_clustarr.c, edt_onedset.c to allow
     cluster rmm=0 to imply 6 NN clustering, vmul=0 to mean no volume editing,
     and vmul<0 to mean min volume = fabs(vmul) voxels.
 * Modified plug_drawdset.c to add 'Flood->Val/Zer' option.  Also to turn
     'See Function' on if the edited dataset is functional type.
 * Added edt_clust2.c (NIH_find_clusters) to implement ISOVALUE_MODE and
     ISOMERGE_MODE.
 * Incorporated Ziad Saad's Ifile program into AFNI distribution.

01 May 2002
 * Added "Jump to (MNI)" button to image popup menu (afni_widg.c and afni.c).

07 May 2002
 Changes from Doug Ward:
 * The -one_col option has been added to program RSFgen.  With this option,
   the input stimulus functions are written as a single column of decimal integers
   (rather than multiple columns of binary numbers).
 * The -stim_base option was added to Program 3dDeconvolve.  This modification
   allows the user to specify which input stimulus functions are to be included
   as part of the baseline model.  By default, the input stimulus functions are
   not included in the baseline model.  This option will effect the output values
   for the Full Model R^2 and Full Model F-stat, since these statistics indicate
   the significance of the full regression model relative to the baseline model.
   This option might be useful, for example, when the estimated motion parameters
   are included as input stimulus functions.  In most cases, the user would want
   the motion parameters to be part of the baseline model.  By indicating that
   the motion parameters are part of the baseline model, they will not contribute
   to the full regression model sum of squares.
 * The Deconvolution plugin was also modified to incorporate the above change.
   On the far right of each stimulus function input line of the Deconvolution
   plugin interface, there is a new option chooser labeled "Base", which allows
   the user to specify that this stimulus function is to be considered as part of
   the baseline model.
 * The Deconvolution plugin was modified to allow a better graphical
   representation of the estimated impulse response function when the user selects
   option DC_IRF under Tran 1D of the graph options menu.  When using the DC_IRF
   function, note that the Double Plot option should be set to "Off".
 * The 3dDeconvolve documentation was updated to reflect the above changes.
   In particular, see Examples 1.4.3.2 and 2.3.2 of the Deconvolution manual in
   file 3dDeconvolve.ps.

11 May 2002
 * Modified afni.c to put global session datasets into sessions as they
    are read, rather than later - this allows the anats in the global
    session to allow a session to be used, even if there are no funcs
    in the directory.

14 May 2002
 * Modified 3dZeropad.c to have -master option.
 * Modified thd_zeropad.c to return full copy of dataset if input add/cut
    values are all zero (used to return NULL).

17 May 2002
 * Modified imseq.c to allow image fraction change with 'i', 'I' keys.

28 May 2002
 * Modified 3drefit.c to add -clear_bstat option.
 * Modified 3dAutomask.c to remove -fillin option.
 * Modifed thd_automask.c to make fillin = brick size/60, and to make
     final mask = complement of largest component of zeros.

31 May 2002
 * Adapted shm stuff from thd_iochan.c to niml.c.

04 Jun 2002
 * Modified 3dAutomask.c to print out how many planes are cut off in the
     the mask.
 * Modified thd_automask.c to be faster.

06 Jun 2002
 * New programs 3dAutobox.c and 3dLRflip.c.
 * New function mri_cut_3D() in mri_cut.c.
 * Modified mri_3dalign.c to do trimming to save memory.
 * Modified 3dvolreg.c to add -wtrim and -wtinp options.

07 Jun 2002
 * Refined default threshold for termination of 3dvolreg.c.

10 Jun 2002
 * Modified afni.h and afni.c to incorporate RGBCYC cyclic color map from
     Ziad Saad.

12 Jun 2002
 * Modified imseq.[ch] to add image cropping facility (Shift+Button2).
 * Added function RWC_drag_rectangle() to xutil.c.
 * Put MRI_COPY_AUX() into mri_cut.c (oops).

14 Jun 2002
 * Modified coxplot/plot_x11.c to remove offset of 0.5 pixels from
     line drawing code.
 * Modified imseq.c to fix scaling of memplot overlays when cropping.

17 Jun 2002
 * Added 'crop' pushbutton to imseq.[ch].
 * Modified default font for imseq to 7x13 in afni.c, and
     modified imseq.c to shrink button margins, to squish widgets together.

19 Jun 2002
 * Fixed clipping error in plot_cox.c (dangling else problem, d'oh).

20 Jun 2002
 * Modified mri_read_ascii() to catenate lines that end in '\', and do
     some other minor stuff ('//' as a comment line, etc.).
 * Modified thd_loaddblk.c (etc.) to support STORAGE_BY_VOLUMES.

21 Jun 2002
 * Modified thd_info.c to print out disk storage mode of dataset.
 * Started work on 3dANALYZEtoAFNI.c.

24 Jun 2002
 * Modified mri_read_analyze75() in mri_read.c to store funused1 scale
     factor into dv MRI_IMAGE header field, for use in 3dANALYZEtoAFNI.c.
 * Modified thd_writedset.c to allow re-writing of a VOLUMES dataset
     .HEAD file.
 * Modified plug_realtime.c to allow single slice dataset input (nzz=1).

25 Jun 2002
 * Modified rtfeedme.c a little for debugging purposes.
 * Modified thd_iochan.c to print better messages with PERROR().
 * Modified plug_realtime.c to popup message when disk I/O is finished
     after an acquisition ends.

27 Jun 2002
 * Modified niml.c to add debugging output option (NIML_DEBUG).
 * Fixed scan_for_angles() in niml.c to disable timeouts in case (b).

05 Jul 2002
 * Modified 3dmerge.c to prevent use of -keepthr on fim and fbuc datasets.

14 Jul 2002
 * Removed the dicomm<->surefit functions from Vecwarp.c since they are now
     in libmri.a via afni_suma.c, and the Sun compiler doesn't like this.

15 Jul 2002
 * Added mri_dicom_hdr.c and dicom_hdr.c - function and program to read/print
     DICOM header info.  Adapted from dcm_dump_file.c from RSNA, per the
     suggestion of Jack Lancaster.

19 Jul 2002
 * New function mri_read_dicom() to read images from DICOM files.

23 Jul 2002
 * Modified mri_read_dicom.c to get slice orientation and offsets.

24 Jul 2002
 * Modified UNIQ_idcode() in niml.c to get 4 extra bytes from /dev/urandom,
     if it is readable.

29 Jul 2002
 * Modified AFNI_read_images() in afni.c to use im->dx,dy,dz in "-im" usage
     of program, if images read have voxel spacing (e.g., Analyze).
 * Modified imseq.c to NOT turn off widgets if only 1 slice to display.

30 Jul 2002
 * Modified plug_realtime.c to accept DRIVE_AFNI commands in the image prolog.
 * Modified afni.c to allow plugouts during realtime.
 * Modified rtfeedme.c to send DRIVE_AFNI commands with the -drive option.

31 Jul 2002
 * New function EDIT_wod_copy() to create a warp-on-demand copy, like 3ddup.
 * Use this in afni.c when a directory has only functions, no anats.
 * Modified afni.c to allow -TRACE to work in realtime mode.
 * Modified afni.c, afni_widg.c to make plugouts not crash during realtime
     mode (we hope).

02 Aug 2002
 * Modified plug_realtime.c to deal with multiple input channels.
 * Modified rtfeedme.c to send multiple dataset channels.

05 Aug 2002
 * Removed DEBUGTHISFILE macro from all places that used it.
 * Modified plug_realtime.c to deal with case when more channels than
     controllers are in use.

06 Aug 2002
 * Modified afni_driver.c to allow "iconify" option on OPEN_WINDOW commands.
 * Modified afni_driver.c to return controller index only if the input
     string is only 1 character long or the 2nd character is a '.'.
 * Modified afni_func.c and bbox.c to deal with potential strlist[] overflow
     problems.

07 Aug 2002
 * Fixed cl1.c and incorporated into libmri.a.
 * Added plugin plug_L1fit.c to provide a L1 analog to plug_lsqfit.c.
 * Modified 3dToutcount.c to use cl1_solve to remove trends before
     outlier-ing.

08 Aug 2002
 * Added color save/load to afni_ttren.c.

13 Aug 2002
 * Modified imseq.c to destroy dialog widget before imseq top widget.
 * Fixed array overflow by 1 bug in mri_percents.c.
 * Modified mri_read.c to check for .hdr files before DICOM.
 * Modified 3dToutcount.c to save result as a FIM, and to save history.

14 Aug 2002
 * Modified various things (afni.h, afni.c, afni_niml.c, afni_suma.c)
     to allow for multiple surfaces per dataset.
 * Modified niml.h to disable shm stuff for Cygwin.

16 Aug 2002
 * Modified imseq.[ch] and afni.c to suppress multiple image redraws
     when an image window is first opened.
 * Modified plug_nudge.c to extend range of angle and shift choosers.
 * Modified xutil.h WAIT_for_window() macro to wait a little longer.
     This is in an attempt to get rid of random problems with graph
     windows opening with bad Pixmap contents.

19 Aug 2002
 * Modified afni_sumafunc.c (afni.h, etc.) to have a control panel for
     surface stuff.  At this time, lets user set colors.

20 Aug 2002
 * Modifications to surface controls: hints, help, comments.
 * Added UUID functions to niml.[ch].

21 Aug 2002
 * Modified niml.c to add NI_mktemp(), and change use of /dev/urandom.
 * Modified machdep.c to change use of mallopt() for Linux - seems to
     make big malloc()'s work better (?).
 * Modified thd_fetchdset.c to use niml.c functions, instead of the
     older thd_http.c functions.

23 Aug 2002
 * Modified thd_loaddblk.c to print (stderr) a message when loading a
     large dataset.
 * Modified niml.[ch] to implement NI_reopen_stream() and make a first
     cut at NI_do().

26 Aug 2002
 * Added Htable (string/pointer pair) hash table functions to niml.[ch].
 * Added mri_read3D_analyze75() to mri_read.c, to read an ANALYZE file
     as an array of 3D images, rather than 2D images.

27 Aug 2002
 * Modified mri_read*_analyze() functions to always floatize ANALYZE
     data if the SPM funused1 scale factor is present.
 * Added ANALYZE (thd_analyzeread.c) file input to datasets.

28 Aug 2002
 * Modified thd_initsess.c and thd_analyzeread.c to support FSL/FEAT
     input .map files.

01 Sep 2002
 * Program 3dDespike.c, to patch a problem with the 3T-1 scanner.

03 Sep 2002
 * Modify 3dDespike.c to allow float datasets, print nicer messages, etc.
 * Fix my_tanh() bug in 3dDespike.c, which was returning NaN for very
     large inputs.

04 Sep 2002
 * More cosmetic changes to 3dDespike.c.

09 Sep 2002
 * ISHEADTYPE macro in 3ddata.h used "=" instead of "=="; this was bad.
 * 'Q' and 'q' quits in afni_widg.c and afni_func.c (hidden_EV).

10 Sep 2002
 * Modified mri_read_dicom.c to print out at most 9 warning messages of
     each type.
 * Modified to3d.c to open X11 immediately when -nosave is used.  Also added
     a bunch of ENTRY/RETURNs to ferret out a bug (it's still hidden).
 * Oops.  Forgot to fclose() the fopen()-ed file in mri_read_dicom.c.  This
     was causing the problems in to3d mentioned above.
 * New program dicom_to_raw.c.

30 Sep 2002
 * Modified 3dAFNItoANALYZE.c (and mri_write_analyze.c) to allow output of
     AFNI datasets into a 4D ANALYZE format file.

01 Oct 2002
 * Modified plug_realtime.c to allow input of notes via a NOTE command.
     Also modified rtfeedme.c with -note option to test this out.

03 Oct 2002
 * Modified imseq.c to allow use of Shift+Button1 for drawing as well as
     Button2.  Changes also to afni_graph.c and plug_drawdset.c (the
     latter just to change the help text).
 * Modified 3dTcat.c to use last '+' as marker for '+orig' (etc.)
     rather than 1st.

04 Oct 2002
 * Took modified plug_deconvolve.c from Doug Ward, to fix bug when baseline
     is disabled.
 * Modified thd_analyzeread.c to add AFNI_ANALYZE_AUTOCENTER option.
 * Modified 3drefit.c to add -xorigin_raw (etc.) options.
 * Modified thd_intlist.c to skip blanks in the [] sub-brick selector string.

07 Oct 2002
 * Modified plug_drawdset.c to add "2D Nbhd" and "3D Nbhd" drawing modes.
 * Also rearranged the Copy and Choose Dataset buttons.

08 Oct 2002
 * Modified plug_drawdset.c (and imseq.[ch], afni_receive.c, afni.h) to make
     button2 drawing overlay have thicker lines, closer to what will actually
     be filled.  Also added 1 larger "3D Nbhd" stencil.

10 Oct 2002
 * Modified thd_analyzeread.c to correct signs of origin when orientation has
     some negative axes.

16 Oct 2002
 * Modified plug_drawdset.c to add '2D Circle' and '3D Sphere' drawing modes.

17 Oct 2002
 * Modified plug_drawdset.c sphere/circle insertion not to test for duplicate
     insertions from the 1st input point - this speeds things up for large R.

25 Oct 2002
 * Modified plug_drawdset.c to use sorting to prevent vast numbers of duplicates
     when inserting large R circles/spheres.

28 Oct 2002
 * Changes to mri_dicom_hdr.c and mri_read_dicom.c to deal with Siemens' stupid
     mosaic format.

01 Nov 2002
 * More changes for mosaic input.

04 Nov 2002
 * Added MRI_rgb type to thd_zeropad.c and to BRICK_*_MASK macros in afni_plugin.h.
 * Took changes from Rasmus Birn to add a "-gamd" delay option to waver.c.

05 Nov 2002
 * Added program rotcom.c, to print out matrix+vector from '-rotate ... -ashift ...'
     options that would be input to 3drotate.
 * Fixed mri_read.c, mri_read_dicom.c, mri_dicom_hdr.c to stop annoying printout of
     messages about bad DICOM files when trying to read GE I.* files.

12 Nov 2002
 * Changed MAX_CONTROLLERS in afni.h for Mike Beauchamp.

13 Nov 2002
 * Modified afni_splash.[ch] to allow color top overlays.  Incorporated SSCC group
     picture.

18 Nov 2002
 * Modified niml.[ch] to make the NI_malloc() package use tracking functions,
     which I stole from mcw_malloc.c - of course, I wrote that, too, so "stole"
     may be too strong a verb.

21 Nov 2002
 * Added some extra programs (gifsicle, mpeg_encode, cjpeg, etc.) to the PROGRAMS
     macro in Makefile.INCLUDE.

22 Nov 2002
 * Added mri_read_stuff.c to filter input from JPEGs, TIFFs, BMPs, etc., into
     mri_read.c.
 * Added afni_version.c to check AFNI version at startup.
 * Modified edt_dsetitems.c to strip "+orig" etc. from tail of new prefix.

23 Nov 2002
 * Modified afni_version.c to only do a check once every 12 hours.

25 Nov 2002
 * Modified afni_friends.c to add date-based trivia (also, afni.[ch]).

27 Nov 2002
 * Modified mri_read_dicom.c to allow for stupid GE case where slice spacing is
    incorrectly set to slice gap instead.

29 Nov 2002
 * Modified mri_read_stuff.c to allow for case when initial 4096 byte buffer
     contains all the image data (i.e., for tiny images).
 * Modified coxplot/plot_ps.c to allow output to stdout.
 * Modified 1dplot.c to allout PostScript output to stdout.

30 Nov 2002
 * Modified mcw_graf.[ch] to draw a coordinate label during drag of graf
     handle with Button 3.
 * Modified mri_read_dicom.c to deal with GE's incorrect use of Slice Spacing
     as gap, rather than center-to-center distance.  Ugh.

02 Dec 2002
 * Modified plug_crender.c to use mcw_graf.c stuff of 30 Nov 2002.
 * Modified mri_read_dicom.c to deal with Siemens Mosaic differently, to
     accomodate variations from NYU's Allegra scanner (vs. NIDA's).
 * Modified to3d.c to show NX x NY along with Datum in GUI.

03 Dec 2002
 * Modified niml.c to use setsockopt() to change socket buffer sizes only
     if getsockopt() says they are too small.

04 Dec 2002
 * Added thd_ctfread.c to read CTF MRI files as datasets.
 * Modified thd_initsess.s, thd_opendset.c, thd_loaddblk.c, 3ddata.h to
     use the CTF functions.

05 Dec 2002
 * Added CTF SAM file input to thd_ctfread.c.
 * Modified 3dIntracranial.c to convert input dataset to shorts if it is
     stored as bytes.  The output will still be shorts.

07 Dec 2002
 * Modified imseq.c to change image number on '<' or '>' keys (like
     the graph windows).

09 Dec 2002
 * Modified imseq.c to save temporary files for animated GIF or MPEG
     output with a random suffix, to avoid collisions if 2 copies
     of AFNI (or aiv) are running.
 * Modified niml.[ch] to allow definiton of "NI_rowtypes" to make it easier
     to deal with structs (with all fixed length elements, alas).
 * Modified nids.[ch] to deal with vectors of arbitrary NI_rowtype.

11 Dec 2002
 * Modified plug_realtime.c to allow termination of a dataset without
     closing the data IOCHAN.  Also added new XYZFIRST metadata command,
     to allow setting of all 3 axis offsets.
 * Modified rtfeedme.c to test the above features.

12 Dec 2002
 * Modified afni_niml.c and afni_sumafunc.c to create functional
     colormaps for all surfaces on the anat dataset, not just the
     first surface.  Also fixed it so that fim=0 is not overlaid.
 * Modified thd_iochan.c to use IOCHAN_DELAY_RMID environment variable
     to indicate that deletion of shm segments should only occur when
     no one is attached to them.  This is to get around a problem on
     some Unices.
 * Modified Makefile.INCLUDE rule for cjpeg to remove old Makefile and
     jconfig.h, since these are re-made by the configure script.
 * Modified niml.c to shmdt() before shmctl(IPC_RMID) instead of after.
 * Modified afni.c to skip version check if realtime is on.  Also modified
     afni_version.c to add an atexit() handler to delete the child-parent
     shared memory IOCHAN when the program exit()'s.
 * Modified rtfeedme.c to add a signal handler to close the data IOCHAN
     if the program crashes.

16 Dec 2002
 * Moved niml.[ch] into niml/ subdirectory, and modified Makefile.INCLUDE
     accordingly.

18 Dec 2002
 * Modified plug_realtime.c to add ZGAP and XYZOFF features from Larry Frank.
 * Fixed bug in niml/niml_util.c decode_string_list() function where
     the sar->str array was allocated with sizeof(char)*num rather than
     sizeof(char *)*num.  Not good in the long run.
 * Modified niml/niml_rowtype.c to allow rowtypes to have 1D variable dimension
     arrays.

19 Dec 2002
 * Added THD_mkdir(), THD_is_ondisk(), THD_cwd() to thd_filestuff.c.
 * Modified afni_driver.c to add commands SYSTEM and CHDIR, which call
     system() and chdir() [pretty clever names, huh?].  Also modified
     afni_driver.c to trim trailing blanks from the input command
     before passing it to the handler functions.

20 Dec 2002
 * Modified niml/niml_do.c to add verb "close_this" to close a stream.
     This is to let a stream be closed from the other end.
 * Modified niml/niml_stream.c to send a "close_this" message when
     a tcp: or shm: stream is closed.
 * Modified niml/niml_stream.c to mark NI_stream's for "death" in
     NI_stream_close_keep(), and then avoid using such streams in
     other functions.  This is to let a stream be closed without
     freeing its struct.

23 Dec 2002
 * Modified mri_read_dicom.c to correct error in z-axis orientation from
     multiple 1-slice datasets - code had been copied from mri_read.c, but
     that was for GE LPI coords, and DICOM is RAI.
 * Modified mri_read_dicom.c to use Rescale and Window tags, if turned on
     by the relevant environment variables.
 * Modified aiv.c to use globbing on input filenames.

24 Dec 2002
 * Modified mri_read_dicom.c to save Siemens extra info string even if
     file isn't a mosaic.

27 Dec 2002
 * Modified 3dttest.c to save DOF dataset if -unpooled is used.

28 Dec 2002
 * Modified AFNI_rescan_session() in afni_func.c to NOT clobber existing
     dataset pointers when adding datasets to a session.
 * Removed all instances of OMIT_DATASET_IDCODES.

29 Dec 2002
 * Minor change to afni_version.c to print out "Latest News" web page
     when version comparison fails.

30 Dec 2002
 * Minor change to AFNI_rescan_session() users to print out number of
     new datasets rows.

31 Dec 2002
 * Modified niml/niml_rowtype.c to deal with String type and debugged
     stuff with output of var dim arrays.

02 Jan 2003
 * Added a error message to mcw_malloc.c to note when an allocation fails.

10 Jan 2003
 * Modified edt_blur.c to clip output to input range.

13 Jan 2002
 * Modified Makefile.solaris28_gcc on hador system - plugins would no longer
     load.  Use of GNU ld instead of UCB ld fixes this, but for unknown
     reasons.  Evil spirits?

15 Jan 2003
 * Modified afni.c to let user set SUMA line thickness via environment
     variable.  Also changed afni_pplug_env.c to match.
 * Modified afni_func.c to purge all datasets in a session after rescan.

16 Jan 2003
 * Modified imseq.c to let user setenv AFNI_AGIF_DELAY to control speed
     of animated GIF output.
 * Modified afni_driver.c to allow remote changing of thresholds, the
     addition of overlay colors, and the setting of pbar pane number.

21 Jan 2003
 * More additions to afni_driver.c.
 * Changes to afni.[ch] to allow startup script to drive AFNI setup.

22 Jan 2003
 * Added "Run Script" button to Datamode->Misc menu.
 * Made "Save Layout" button save setup script to .afni.startup_script
     if no filename is entered.

23 Jan 2003
 * Made AFNI_VALUE_LABEL default be YES instead of NO.
 * Added AFNI_DEFAULT_OPACITY environment variable, for image overlay opacity.
 * Added AFNI_DEFAULT_IMSAVE environment variable, for .jpg, .tif, etc.
 * Fixed bug in afni_driver.c SETENV function - space used for putenv() must
     be permanent memory, not temporary!

24 Jan 2003
 * Added special function key stuff to imseq.c (arrows, PgUp/PgDn).

27 Jan 2003
 * Added messages to afni_version.c when version checking is disabled, fails,
     or when the current version is different than the last version.

28 Jan 2003
 * Modified thd_ctfread.c to correct nx,ny,nz calculation for SAM images.
 * Modified afni.c to do the time lock properly when the anat has no
     time axis but the func does.
 * Modified 3dcopy.c to work with copying non-AFNI datasets.

29 Jan 2003
 * Modified 3drefit.t to add -Torg option (for MEG guys).

30 Jan 2003
 * Modified pbar.c, afni_func.c, etc., to add a "big" mode to the pbar, with
     128 colors.  More work is needed here for SUMA, rendering, scripting,
     loading colormaps, etc.

31 Jan 2003
 * Modified afni.c to de-sensitize threshold slider when not needed, rather
     than hide it.  This is to get around a problem with the size of the pbar
     being adjusted slightly incorrectly, for reasonse I don't understand.
 * Modified pbar.c to give choice of colormaps for "big" mode.  Programmed
     a startup set of 4 colormaps.

02 Feb 2003
 * Modified afni_sumafunc.c to use "big" mode colorscales.
 * Modified afni.c, pbar.c (etc.) to read in user-defined colorscales
     from files.

03 Feb 2003
 * Changes to afni_driver.c to support colorscales.
 * Saving .afni.startup_script now also saves the Autorange/funcrange setting.

04 Feb 2003
 * Moved user-defined colorscale setup to pbar.c from afni.c.
 * In afni_widg.c, use AFNI_COLORSCALE_DEFAULT to setup initial colorscale.

05 Feb 2003
 * Added "OPEN_PANEL" command to afni_driver.c, and to afni_splash.c.

06 Feb 2003
 * This time, modified 3ddata.h, afni.c, afni_func.c to ALWAYS keep threshold
     slider active, and when there is no threshold, use the function for the
     threshold.  (However, RGB overlays are not thresholded, so this is the
     only case in which the threshold slider is desensitized.  Also, the first
     time the user switches to a fim dataset, the threshold slider is set to 0.)
 * Modified to3d.c to deal with double input images (to be converted to floats).
     Also changed mri_read.c, mcw_glob.c, mri_swapbytes.c, 3ddata.h to add
     a "3Dd:" input format for reading doubles from arbitrary files.
 * Added some new default colorscales to pbar.c.

07 Feb 2002
 * Modified afni_func.c to allow AFNI_RESCAN_METHOD environment variable to
     choose old rescan method (cf. 28 Dec 2002).

10 Feb 2003
 * Modified afni_graph.[ch] and afni.c to allow initializing graph matrix size
     to value other than 3, through AFNI_graph_matrix environment variable.
 * Modified 3dcalc.c to allow RGB dataset input.

11 Feb 2003
 * Modified 3dfractionize.c to set default clip value to a very tiny positive
     value, rather than 0.
 * Modified pbar.[ch] to use a popup menu to deal with Button-3 events, rather
     than directly do stuff.  Included a value+color label on this menu.

12 Feb 2003
 * Modified niml/ to read/write full type names rather than just abbreviations
     to the "ni_type" attribute of data elements.
 * Modified niml/niml_do.c to add a "typedef" verb, and to let the user program
     define its own verb/callback pairs.
 * Modified afni_niml.c to define a "ni_do" verb "DRIVE_AFNI", to let external
     program (hint: SUMA) access this stuff.

18 Feb 2003
 * Modified afni_func.c to add a hint to the colorscale.
 * Modified NIML stuff to use rowtypes more properly (niml_element.c, etc.).
 * Modified various Makefile.* to define SHOWOFF macro (once again).
 * Modified afni_version.c to print out appropriate wget command for update.
 * Modified afni.c to printout precompiled version, if present.

19 Feb 2003
 * Fixed a couple little points in niml_rowtype.c.
 * Modified afni_sumafunc.c (afni.h, etc.) to change "Control Surface"
     label for each surface into a toggle button, to make it easier to
     turn surface on and off quickly.

20 Feb 2003
 * Changes to imseq.c, afni.[ch], afni_receive.c, and plug_drawdset.c to make
     the keypad "Delete" key(s) operate like the Undo button in the drawing
     plugin.
 * Modified afni_receive.c to have a string name debug output for each
     receive callback (and all the functions that call this).  Also fixed a
     bug that would have functions registered for different receive cases
     get inappropriate calls (forgot to enclose the call in {..} in an if).
 * Modified afni_suma*.c to send closest surface node ID to SUMA when viewpoint
     change callback is invoked.

21 Feb 2003
 * Modified imseq.c to use "-bpp 24" in ppmtobmp output to BMP files, avoiding
     quantization problems.
 * Modified afni.c to add a "#NodeID" string to the Button-3 image viewer popup,
     when a surface is present.

23 Feb 2003
 * Modified afni.[ch] and afni_sumafunc.c to create boxsize and linewidth
     controls on the "Control Surface" popup.
 * Modified coxplot/plot_x11.c to flip line segments if that will make
     them join. Also, initialize thickness of plots to 0, to allow for
     special case (circle, box, ...) that is first item plotted.

24 Feb 2003
 * Modified afni.c to draw a * in the box of the closest surface node.
 * Modified 3dhistog.c to print "#" at start of header lines, so that
     result can be read by mri_read_1D(), etc.
 * Incorporated changes from KRH to fix mri_read_dicom.c for Siemens
     mosaics with incomplete slice coordinates.
 * Modified afni_graph.c to fix problem with double plot introduced
     when multiple timeseries graphing was introduced - forgot to
     reset tsar pointer to original data when graphing double plot
     in plus/minus mode.

26 Feb 2003
 * Modified afni_graph.c and afni_sumafunc.c to allow drawing of triangle
     intersections at edges of slice plane, as well as at center.
 * Modified "view_setter" code to work more intuitively when only one
     image viewer is open, etc.

27 Feb 2003
 * Modified 3dDeconvolve.c to get multiple timeseries at once, to reduce
     cache thrashing.
 * Modified thd_notes.c to add function to append one dataset's history
     to another's.  Used this in 3dcalc.c as a starter.

28 Feb 2003
 * Per Lukas Pezawas of CBDB, modified 1dgrayplot.c to have -ps option,
     like 1dplot.c.  While doing so, also fixed a bug in coxplot/plot_ps2.c
     where the rectangle case didn't have a "break", so fell through and
     drew a circle as well.
 * Modified mritopgm.c to have a clipping option.

03 Mar 2003
 * Created matrix_f.[ch] as float alternatives to matrix.[ch].  Then used this
     in 3dDeconvolve.c and RegAna.c to create a program 3dDeconvolve_f compiled
     from 3dDeconvolve.c when the FLOATIZE C macro is defined.  Speedup on a
     Linux box is about 40% (due to less memory fetch).
 * Modified mri_read_dicom.c to allow user to skip stupid GE fixup entirely.

04 Mar 2003
 * Modified afni.c to get rid of bug when de-sensitizing thr_rowcol for RGB
     images.  Now it is always sensitized.  Also, afni_func.c now will deal
     with RGB images as thresholds (just converts them to floats, though).
 * Added thd_1Dtodset.c, functions to read and write 1D files as AFNI datasets.
 * Added niml/niml_stat.c to be a place to store statistics code for NIML.

05 Mar 2003
 * Fixed a bug in AFNI_setup_viewing() that crept in - assumed existence
     of fim_now, which might not be true.
 * Incorporated fix of mri_read_dicom.c from Rich Hammett, to skip false
     targets in the Siemens extra info.  (Will no one rid me of this
     troublesome mosaic format?)
 * Modified 1dplot.c to accept multiple timeseries file inputs.
 * Modified thd_automask.c to have a mri_automask() function as well.
 * Modified 3dAutomask.c to do fillin and exterior-clipping if -dilate
     option is used.

06 Mar 2003
 * Modified 3dWinsor.c to use -mask option.

07 Mar 2003
 * New program 3dAnhist.c.

10 Mar 2003
 * Modified imseq.[ch] to make F2 button have Button1 operate as Button2,
     and to show cursor as a pencil shape for drawing when this mode is on.

11 Mar 2003
 * Modified tagset.h to increase number of allowed tags.

13 Mar 2003
 * Changes to 3dAnhist to regress histogram and plot it.
 * Changes to coxplot/plot_ts.c to have it avoid "pushing" data limits out.
 * Changes to 1dplot.c: -xzero and -nopush options.
 * Added THD_generic_detrend() to thd_detrend.c, and used this to add a
     -ort option to 3dTcorrelate.
 * Modified thd_notes.c and 3dNotes.c to avoid escaping the '\' character
     for notes input from the command line.

14 Mar 2003
 * A few more changes to 3dAnhist.c.
 * Modified thd_opendset.c to also deal with .1D inputs.

18 Mar 2003
 * Fixed 1dplot.c -stdin option to work again (oops).

19 Mar 2003
 * Modified 3dAFNItoANALYZE.c to add -orient option.
 * Added mri_flip3D.c to flip 3D images around.
 * Added thd_getorient.c to get axis direction in a dataset for
     a given orientation code.
 * Modified mri_copy.c to work if input image doesn't have data array.
 * Added environment variable AFNI_MINC_SLICESCALE to thd_mincread.c.
 * Fixed bug in thd_mincread.c in slice-scaling when datum is floats
     (subtracted intop instead of inbot in scaling formula).
 * Modified thd_mincread.c to downscale short or byte datasets if
     slice scaling would push them past the maxval for that data type.
     Also, use calloc() on im_min and im_max arrays to avoid problems
     when those arrays in the MINC file are incomplete.
 * Modified 3drefit.c, and thd_delete.c to skip CTF and 1D files.
 * Modified 3drotate.c to skip rotation if rotation matrix is identity.
     Also modified 3dvolreg.c and 3drotate.c to use "%.4f" format when
     writing command string to THD_rotcom_to_matvec().

20 Mar 2003
 * Modified afni_func.c, 3ddata.h, afni_graph.c to allow graphing of
     datasets with only 1 point along a spatial dimension (i.e., ".1D"
     files).
 * Modified niml/elemio.c to allow writing and reading of elements
     with the "# ..." line format for header/trailer fields.  Also
     modified thd_1Ddset.c to write .1D dataset files out in this
     format.

21 Mar 2003
 * Added thd_3Ddset.c to read AFNI datasets from NIML-formatted
     .3D files.  Corresponding changes to 3ddata.h, etc.
 * Changes from Doug Ward:
   1) Program 3dDeconvolve:  Added -quiet option to suppress screen output.
   2) Plugin Deconvolve:  Additional input error protection for -censor and
      -concat options.  These options could cause afni to crash if the input
      files were not set up correctly.
   3) Program RSFgen:  Added -table option, to generate random permutations of
      the rows of an input column or table of numbers.  Useful for randomization
      studies of statistical thresholds, about which more later.
   4) Libraries matrix.c and matrix_f.c:  The recently added/modified matrix
      routines vector_multiply and vector_multiply_subtract would produce a
      segmentation fault for certain input matrices (e.g., null baseline model).
      This has now been corrected (hopefully).

23 Mar 2003
 * Added -xyz option to 3dmaskdump.c.

27 Mar 2003
 * Modified NIML to allow ni_dimen=0 on input, and then infer length of vectors
     from input data.

28 Mar 2003
 * Changes to afni_splash.[ch] to include faces!

29 Mar 2003
 * Modified mri_resize() [in mri_warp.c] to properly deal with images of
     MRI_byte, MRI_short, and MRI_rgb types.

09 Apr 2003
 * Fixed thd_shear3d.h function DMAT_svdrot() to work properly when input matrix
     is singular.

11 Apr 2003
 * Modified coxplot/plot_ts.c to allow setting of line colors using
     AFNI_1DPLOT_COLOR_xx environment variables.

12 Apr 2003
 * Modified waver.c -tstim option to skip argv[]'s that start with whitespace
     -- this is to deal with evil Microsoft CR-LF line breaks.

15 Apr 2003
 * Fixed bug in mri_overlay.c (using data from imover instead of imov!).

16 Apr 2003
 * Modified 3dUniformize.c to allow byte-valued datasets, and added to standard
     distributions.  Also modified estpdf3.c and pdf.c to obey the global
     "quiet" variable, if the USE_QUIET macro is defined.

18 Apr 2003
 * New program 3dWarp.c (along with mri_warp3D.c).
 * Minor changes to 3dAnhist.c for Lukas Pezawas.

22 Apr 2003
 * Modified 3dTagalign.c (and thd_shear3d.c) heavily to use THD_warp3D() instead
     of rotation-only functions, and to allow different kinds of transformation
     matrices to be used.

24 Apr 2003
 * Modified 3dTshift.c and thd_tshift.c to negate time shift, since it seems have
     been wrong all these years.

28 Apr 2003
 * Modified 3dcalc to add -taxis option.
 * Added mri_fromstring.c, to input 1D data in the form '1D:5@0,10@1,5@0', etc.

29 Apr 2003
 * Modified imseq.c and machdep.h to add ENFORCE_ASPECT #define (for Mac OS X).

30 Apr 2003
 * Modified thd_intlist.c to let "{}" bound the list as well as "[]".
 * Modifed mri_read_1D() to use intlist of the form "{..}" to do row sub-selection,
     as well as the older "[..]" for column sub-selection.
 * Modified most programs that used mri_read_ascii() to read timeseries files to
     use mri_read_1D() instead, so that the "{..}" feature can be supported.

01 May 2003
 * Modified NLfit.c and plug_nlfit.c to have NLfit_error() be able to use longjmp()
     to deal with errors, rather than exit().
 * Modified afni_func.c to rotate color bar in steps of 4 if Shift key is pressed.

04 May 2003
 * Parallel computation (-jobs option) addtions to 3dDeconvolve.c.

06 May 2003
 * Minor changes to 3dDeconvolve.c.
 * From Rich Hammett, AFNI_TRY_DICOM_LAST environment variable.

07 May 2003
 * Parallel computation (-jobs option) addtions to 3dNLfim.c.
 * Mods to mri_dicom_hdr.c to subtract 1 from rwc_err for each error message.
     This way, will normally only print 1 such message per to3d run, which will
     make the users happier, I hope.
 * Add mri_possibly_dicom() function to mri_read_dicom.c, and use it to censor
     which files get the full DICOM reading treatment.

09 May 2003
 * AFNI_THRESH_BIGSTEP environment variable.
 * Boxes in 3dmaskdump.c.

12 May 2003
 * Modified thd_initdkptr.c to have prefixes that start with '/' override any
     input directory name.
 * Modified waver to allow 'a:b' and 'a%c' durations for '-tstim' input.

13 May 2003
 * Added "-Fourier_nopad" option to 3drotate.c, plug_nudge.c, and thd_rot3d.c.
 * Modified afni.c to have arrowpad keys do wraparound when they hit the edge.

14 May 2003
 * Fixed bug in thd_intlist.c, where ']' or '}' might not stop the scanning of
     the string.  This was a problem when dealing with inputs that have both
     types of selectors -- one might run over another in the parsing.

29 May 2003
 * Modified 3dttest.c to output t-statistic brick in floats if diff brick is
     stored as floats.
 * Modified 3dcalc.c to floatize datasets that don't have constant sub-brick
     datum.
 * Per the request of Ziad Saad, added function NI_add_column_stride() to
     niml/niml_element.c.

06 Jun 2003
 * Modified niml/niml_stream.c to disable reopen of tcp: stream as shm: if
     AFNI_NOSHM environment is set to YES.

11 Jun 2003
 * Modified afni.c NOT to call AFNI_set_thresh_top() in AFNI_setup_viewing()
     when changing functional datasets.

13 Jun 2003
 * Modified imseq.c to prevent resized windows from getting bigger than
     AFNI_IMAGE_MAXFRAC (default=0.9) times the screen dimensions.
 * Modified niml/niml_elemio.c to make attribute string buffer size expand
     when Ziad writes huge attributes, the fiend.  Also put a newline before
     each attribute, whether we want it or not.

16 Jun 2003
 * SUMA+AFNI ROI stuff.

20 Jun 2003
 * Modified imseq.c to add ISQ_snapshot(Widget) functionality.  Tested
     in Xphace program.
 * Modified Makefile.INCLUDE to make libmrix.a that includes all the
     X11 utilities (imseq.c, xutil.c, xim.c, etc.).

25 Jun 2003
 * ISQ_snapfile(Widget) added to imseq.c; other tweaks to ISQ_snapshot().

26 Jun 2003
 * Moved some snapshot stuff to xim.c rather than imseq.c.
 * Modified afni.c to have it continue after fatal X11 errors.
 * New program 1ddot.c.

01 Jul 2003
 * Modified afni_func.c to change pbar hints when "Func=Threshold" is pressed.
 * Added RWC_XtPopdown() to xutil.[ch], and modified most code to use this
     rather than XtPopdown().
 * Added empty XtErrorHandler to afni.c to try to avoid crashes when an Xt
     error occurs.
 * Added mri_equal.c, which checks if 2 images are equal.  Used in ISQ_snapshot()
     to avoid saving duplicate images in succession.

03 Jul 2003
 * Added ISQ_snapsave() to imseq.c, which lets the user supply the image to be
     saved in a snapshot, rather than acquire it from a widget like ISQ_snapshot().

06 Jul 2003
 * Modified 3dmaskave.c to add -median option.

10 Jul 2003
 * Fixed bug in afni_graph.c of colors in dplots from Dataset#N plugin.

15 Jul 2003
 * Included FreeBSD patches from Jason Bacon.

18 Jul 2003
 * Modifed imseq.[ch] (etc.) to include a "pen" box to turn on the "pen drawing"
     Button-1 mode (only available when drawing has been enabled).

21 Jul 2003
 * Modified all uses of XmCreatePopupMenu() to make parent widget different than
     the Button-3 popup widget when using Solaris -- some bug in Solaris seems to
     cause a popup problem when the parent of the menu is also the one getting
     the ButtonPress event.
 * Modified afni_graph.c, imseq.c, afni.c, plug_nth_dataset.c, etc., to have
     the Dataset#N, Dataset#2, and Expr0D plugin windows open when these
     transformations are selected from menus.
 * Modified the parser to take longer expressions.

22 Jul 2003
 * More expansion in parser.f, etc.
 * Modified coxplot/plot_ts.c and 1dplot.c to let user control x- and y-axes
     in more detail.

23 Jul 2003
 * Changes to thd_info.c to print more than 8000 characters from the History.
 * Changes to thd_notes.c to make Addto_History work right.
 * Changes to 3dcalc.c to use Addto_History correctly.

28 Jul 2003
 * Modified 3dcalc.c to force scaling for short and byte output datum when
     non-integer values are found in the dataset.

29 Jul 2003
 * Many many changes to make func and anat datasets work interchangeably in
     the interactive AFNI.
 * 3dmerge.c now has -verb option.

30 Jul 2003
 * Modified plug_nudge.c to add NN interpolation option.
 * Modified THD_open_3dcalc() to make dataset directory "./" after it is input,
     so that EDIT_empty_copy() of it will not put new dataset into /tmp.
 * Modified afni_func.c and afni_sumafunc.c to threshold byte and short
     overlays in float rather than int.
 * Modified FUNC_IS_STAT() and FUNC_HAVE_PVAL() macros in 3ddata.h to return 1
     only if the code supplied corresponds to a valid statistic code.
 * Various fixes to the anat/func interchangeability stuff.

05 Aug 2003
 * Modified thd_1Ddset.c to read a multi-column .1D file as a 3D+time dataset
     rather than a bucket, if AFNI_1D_TIME is set to YES.
 * Modified mri_write_ascii() to write the stdout if the filename is "-".
 * Modified various *.c files to avoid warning messages on OS X compiles.

06 Aug 2003
 * Somehow, a bug crept into the Read Session function (in afni_func.c) that
     rejected new sessions with # datasets > 0 rather than # datasets == 0.
 * Added quintic interpolation to mri_warp3D.c, and 3dWarp.c.
 * Added -fsl_matvec option to 3dWarp.c.
 * plug_3ddup.c created (but not part of the binaries, yet).

07 Aug 2003
 * Fixed small typo in index in mri_warp3D.c quintic code.
 * Fixed CYGWIN bracket placement at end of thd_loaddblk.c.

08 Aug 2003
 * Problem: when anat_now == fim_now, and fim_now got set to
     "Warp Func on Demand", then trouble.  Solutions:
     - make AFNI_VIEW_FUNC_BRICK and AFNI_VIEW_ANAT_BRICK default to YES.
     - make sure if anat_now == fim_now, Func WOD is turned off.

11 Aug 2003
 * Fixed bug in afni_sumafunc.c, where func threshold image is bytes -- was
     using index ar_thr[ii] instead of ar_thr[jj] -- not good.

15 Aug 2003
 * Added -version option to afni.c, per Rick Reynolds.

23 Aug 2003
 * Added AFNI_MAX_OPTMENU environment variable (bbox.c, etc.).
 * Modified Makefile.INCLUDE to chmog ugo+x the ./configure files
     in a couple of subdirectories.

24 Aug 2003
 * Modified 3dLRflip.c to give output dataset a new prefix (oops).

26 Aug 2003
 * Modified afni_func.c to skip printing adoption warnings unless user
     explicitly requests them with an environment variable.

28 Aug 2003
 * Widespread changes, including addition of thd_niftiread.c, to read
     NIFTI-1 formatted files as datasets.
 * Modified afni.c to read datasets individually from command line argv's
     if they can't be read as sessions.

15 Oct 2003
 * Added poetry.
 * Removed 'points'.
 * Added Dtables to niml.

20 Oct 2003
 * Fixed scaling bug in mri_warp3D.c -- datasets with scaling factors were
     being scaled before warp, but not unscaled after warp, so that the
     surviving scale factor would be applied twice.
 * Added labelizing to Draw Dataset plugin.

21 Oct 2003
 * Added label popup menu to Draw Dataset plugin.
 * Added Button1 click in intensity bar to re-aspect image window.
     Also, skip attempt to reconfigure if happened before within last 33 ms.
     This is to avoid getting into fights with the window manager.

22 Oct 2003
 * Inten->Save Palette with colorscales now saves a colorscale file.
 * Inten->Read Palette with colorscales now reads a colorscale file.
 * AFNI_MPEG_FRAMERATE in imseq.c.
 * Extend short input time series in 3dDeconvolve.c.

23 Oct 2003
 * Modified Button1 in intensity bar to always do re-aspect, even if free
     aspect is on.
 * Added Button1 stroke right/left in image window to change contrast and
     brightness together; changes to imseq.[ch], display.[ch], and
     afni_pplug_env.c.

24 Oct 2003
 * Added 'Graymap Plot' to imseq.c.

27 Oct 2003
 * Auto-popup and auto-place graymap plot.
 * Change plug_drawdset.c to disable auto-popup of graymap plot when plugin
     is open, and re-enable it when plugin closes.

28 Oct 2003
 * Changes to thd_automask.c and 3dAutomask.c to implement -eclip option.

29 Oct 2003
 * Allow "# " as a comment in .afnirc -- changes to afni_setup.c GETSTR macro.

30 Oct 2003
 * Some changes (f2cdir/ and afni_plugin.c) for Mac OS X 10.3 compilation.

04 Nov 2003
 * Modified imseq.c to move crosshair focus on Button1 release, rather than
     press.  This makes the graylevel change via Button1 motion not have
     the annoying focus change side effect.
 * Modified afni.c, etc., to implement new environment variables
     AFNI_IMAGE_MINTOMAX and AFNI_IMAGE_GLOBALRANGE.
 * Modified afni_plugin.[ch] to allow plugins to change the "Run" button
     labels to something else.

05 Nov 2003
 * Modified imseq.c to auto-popdown graymap plot if it was auto-popupped
     in the first place.
 * Also added "Edit Environment" button to image window popup menu.

13 Nov 2003
 * Added argmax() and argnum() functions to parser.f and 3dcalc.c.
 * Modified Makefile.solaris28_suncc per Vince Hradil's experience.
 * Split up load vector loops in PAREVEC() in parser.c, for speed.

14 Nov 2003
 * More minor changes to 3dcalc.c and parser.f for slight speedups.

18 Nov 2003
 * Modified imseq.c to prevent beep when user tries to zoom when Mont
     is on, or vice-versa.

19 Nov 2003
 * Multiple level undo/redo in plug_drawdset.c.

20 Nov 2003
 * Fixed bug in arrowpad movement, in afni.c: must do LOAD_DSET_VIEWS(im3d).
 * Modified afni.c and afni_version.c to write UPDATER script, if possible.

21 Nov 2003
 * Added ability to undo Linear Fillin to plug_drawdset.c.

24 Nov 2003
 * Fun with Apple's speech synthesis.

01 Dec 2003
 * Modified imseq.c to add AFNI_IMAGE_ZEROCOLOR environment variable.
 * Modified mcw_glob.[ch] to add simple-to-use function MCW_wildcards().
     Used this in afni_splash.c as a test.

03 Dec 2003
 * Program mpegtoppm -- in mpegtoppm_dir/.
 * Read images and datasets from MPEG files, via mpegtoppm.
 * 'm' and 'M' keys in imseq.c.

04 Dec 2003
 * Change 'm/M' to 'v/V', and also add to afni_graph.c.

05 Dec 2003
 * Some tweaks to mpegtoppm and mri_read_mpeg.
 * Fixed bug in niml/niml_element.c -- NI_free_element() would fail if
     nel->vec was NULL.
 * Similar problem in thd_3Ddset.c.

07 Dec 2003
 * Modified ts.c to allow '#' comments in RWC_read_time_series().

16 Dec 2003
 * Changes to niml/ functions to make them g++ compatible.
 * Added 'r/R' to imseq.[ch] and afni_graph.[ch].

17 Dec 2003
 * Fixed Amalloc.h bug.

23 Dec 2003
 * Checked in many changes to deal with compilation of afni with g++
     (version 3.2 or later).

30 Dec 2003
 * Fixed annoying bugs in NIML stream I/O.
 * Modified niml/niml_do.c to allow user to register callbacks that
     supplement builtin verbs.

02 Jan 2004
 * More annoying bugs in NIML stream I/O.  Also, when a socket is
     closed, send 1 byte of OOB data so that the receiving process
     will receive SIGURG.  The new SIGURG handler will then shut
     the socket down on the other end, without the user having to
     read the "close_this" element.

07 Jan 2004
 * Modifications to plugins and models to make them work with g++.

08 Jan 2004
 * Modifications to mcw_malloc.c to print out traceback chain when
     corruption is detected.
 * Added ENTRY()/RETURN() to a number of mri_*.c functions.
 * Modified afni.c to display surface overlay from other datasets in
     the same directory, if the current underlay datasets doesn't have
     any surfaces.

10 Jan 2004
 * Modified mrilib.h, mri_read.c, and to3d.c to allow use of inter-slice
     spacing to override slice thickness, at least for GE I.* files.

12 Jan 2004
 * Modified imseq.c to draw graymap in histogram style.  Also added
     "ent=" entropy value to numerical range display.

13 Jan 2004
 * Modified mri_read_dicom.c to alter operation of AFNI_SLICE_SPACING_IS_GAP
     so that "NO" means use the Spacing attribute even if it is smaller than
     the Thickness attribute.  Seems to be needed for Phillips.

14 Jan 2004
 * Modified coxplot/pwritf.f to allow color changes in the text, and to
     allow disabling of the escape mechanism (so filenames with "_" are OK).
 * Modified 3drotate.c, 3AnatNudge.c, 3dLRflip.c, 3dTagalign.c, 3copy.c to
     allow processing of non-AFNI (e.g., MINC) datasets.  The problem was
     that these program open/load a dataset, modify it in-place, rename it,
     then write it out.  That won't quite work for non-AFNI datasets, since
     the dataset is still marked as being MINC (say), and we can't write
     those directly.  Solution: mark the dataset as AFNI-format, after
     loading it and before changing its name.
 * Modified Makefile.* to use a "MAKE" macro instead of the fixed "make"
     command.

15 Jan 2004
 * Modified afni.c so that -skip_afnirc option works again (was being screwed
     up in machdep() function).  Also added a couple friends.
 * When re-f2c-ing a .f file, must remove declarations of built-in functions
     from the C code, since they cause the g++ compilation to fail to link.
     Also, in coxplot/*.c functions, must manually change the COMMON struct
     definitions to extern.
 * Added SHORTIZE() and BYTEIZE() to mri_to_short.c and mri_to_byte.c to
     avoid integer overflow problems when scaling and/or changing data types.

16 Jan 2004
 * Modified 3dFDR.c to produce some output when -input1D option is used!

23 Jan 2004
 * Modifications to put surfaces into sessions rather than directories.
 * Modified ISQ_show_zoom() in imseq.c to avoid infinite recursion that
     seems to happen when user zooms, crops, then changes image fraction
     (with the "i" arrows). WTF?
 * Modified imseq.[ch] to NOT place dialog near changed window when closing
     the Montage control dialog, since that hangs up for a while on the Mac.
 * Modified afni.c to make sure surface boxes are plotted with line
     thickness zero.

27 Jan 2004
 * Added "WinAver" feature to afni_graph.[ch] and afni.c.  This shows the
     "ideal" waveform as the average of all the timeseries in a graphing
     window.
 * Modified afni.[ch] and afni_widg.c to set a flag in each im3d, so that
     if it is created when the dummy dataset is present, then when a real
     dataset becomes available, the controller will get set to the middle
     of THAT dataset's coordinates, rather than the dummy's middle.  This
     is useful for realtime imaging (which is why the dummy is there).

28 Jan 2004
 * Added hints to various menu items that were lacking them in afni_graph.c.

29 Jan 2004
 * Added the cute little diagonal 'AFNI' to various windows.
 * Modified rtfeedme.c to add the '-gyr' option to test GRAPH_[XY]RANGE.

06 Feb 2004
 * Added threshold locking (via environment variable AFNI_THRESH_LOCK).
     Also, moved lock code from afni.c to new file afni_lock.c.

07 Feb 2004
 * Added pbar locking (via environment variable AFNI_PBAR_LOCK), and
     threshold p-value locking.
 * Added AFNI_DISP_SCROLLBARS to afni_pplug_env.c, to control if Disp
     menu in image viewer gets scrollbars.

10 Feb 2004
 * Made threshold locking move sliders during drag, not just end of drag.
     Also change pval at bottom of locked sliders during drag.  Also put
     Edit Environment button on top-of-pbar popup menu.

11 Feb 2004
 * Fixed bug in afni_graph.c about average time series, when graph is
     too short.  I think.  [cf. 27 Jan 2004]

12 Feb 2004
 * Oooops.  "\noesc" should be "\\noesc" in several places.  My bad.
 * Modified mri_read.c to allow GE "IMGF" flag to be anywhere in 1st 4K
     of file, if file starts with "GEMS" instead of "IMGF".

19 Feb 2004
 * Added -mask and -srad and 5th-value=radius features to 3dUndump.c.

23 Feb 2004
 * Added range locking to afni_lock.c and afni_func.c.
 * Added tick marks to imseq.c.
 * Rick Reynolds added NN interpolation option for zooming to mri_dup.c.

24 Feb 2004
 * Fixed bug in thd_sheard3d.c, when input matrix to rot_to_shear_matvec()
     is identity, could get a bad shear.  In this case, just manually put
     the correct shear into place.
