In order to make the MNI_AutoReg package:
perl -Vthat it is version 5.003 or later)
Getopt::Tabularmodule for Perl.
configure' script that will automatically determine various system- dependent values and generate Makefiles needed to build the package.
In the directory where you unpacked the MNI_AutoReg tar file,
configure' works by poking around your system to determine all
the system-specific values needed to build and install
MNI_AutoReg. Once it has done that, it creates
which is the granddaddy
Makefile used by all the programs in the
package. If `
configure' runs successfully, skip to step 7 below.
configure' complains about not being able to find certain
things, though, you may have to give it some hints. In
particular, this be necessary if you have installed netCDF, MINC,
Volume_IO, or Perl 5 in weird places. The easiest way to do that
is with the
--prefix option; for instance, at the MNI, we keep
home-grown software under
/usr/local/mni, so here we run
configure' like this:
/usr/local/mni. (netCDF is not home-grown, so we keep it under
/usr/local. Luckily, `
configure' is smart enough to look there if all else fails.) If you simply can't get `
configure' to find some files, you can set various environment variables, e.g.
NETCDF_INCLUDEto specify the directory where
netcdf.hlives. For instance, if you installed netCDF to
/tmp, its include file would be in
/tmp/include, and you could say:
env NETCDF_INCLUDE=/tmp/include ./configure
||where to find netCDF header (
||where to find netCDF library (
||where to find MINC header (
||where to find MINC library (
||where to find Volume_io headers
||where to find Volume_io library
||where to find Perl binary (must be Perl 5.003)|
Note that these are all inputs required to build MNI_AutoReg.
There are also a number of output directories that determine where
various files are installed to; these are explained below.
If you have built shared-library versions of netCDF, MINC, or
Volume_io, configure should be able to find these. It looks for
libraries first with a "
.a" extension, then with
.so"; this appears to be a quite common convention under
various Unices, and is known to work under IRIX and Linux. If
your system has a different scheme for naming shared libraries,
you might need to set the
LIBEXT variable; e.g. to only look for
env LIBEXT=".so" ./configure
LIBEXTis just a space-separated list of extensions, including the dot on each one.)
configure'. MNI_AutoReg installs many files in various directories, and expects to find other files in certain directories, so it's important to know where you want stuff to go. By default, it all gets put under
/usr/local, unless you specify a different base directory with `
--prefix'). In particular:
|Perl libraries:||(see "Important point #2", below)|
|stereotaxic brain model:||
/usr/local/share.) All of these directories can be customized, either by setting an environment variable before running `
configure' or by editing Makefile.include after `
configure' has run. If you wish to use environment variables, set them as follows:
||directory for binary executables|
||directory for scripts (machine-independent executables)|
||Perl library files|
||stereotaxic brain model files|
Note that if you feel like setting ALL of these (e.g., to install
/tmp or your home directory), you're probably
better off to use `
--prefix'. If you want to impose a more
centralized structure (eg. with all MNI_AutoReg-related files
/usr/local/lib/mni_autoreg), you'll have to override most of
the defaults with environment variables.
If you prefer to edit
Makefile.include, just read the instructions
there - but be warned that any changes you make will be lost if
you re-reun `
Important point #1: MNI_AutoReg doesn't actually install anything
to MODELDIR; that is done by another package, the MNI Average
Brain Stereotaxic Registration Model (which you should have
mni_autoreg_model-1.0.tar.gz). However, MNI_AutoReg
produces a custom version of the mritotal program (the main driver
for stereotaxic registration) with MODELDIR hard-coded into it.
Be sure to use the same MODELDIR when configuring and installing
the two packages, or you will always need to use mritotal's
`-modeldir' option to override the (incorrect) built-in default.
Important point #2: the directory where Perl library files are
installed is determined, logically enough, by asking Perl. (In
particular, the "
installsitelib" configuration variable is checked.)
For Perl 5.002 and later, this is enough; if Perl was installed using
all the default directories, the Perl library files will end up in
However, if you're still running Perl 5.001, "
not set. In this case, `configure' will use a default directory
lib/perl5/site_perl under your prefix directory, which (if
prefix is /usr/local), will be the same as you would have got
using Perl 5.002's default installation directories. In this
case, though, the directory is most likely not on Perl's default
search path. You will be warned if this is the case when you do
make install"; if you get this warning, you should set the
PERLLIB variable with
setenv PERLLIB /usr/local/mni/lib/perl5
~/.cshrcor the global
/etc/cshrcfile. (Or, if you're a Bourne-shell, ksh, zsh, or bash type of person, put
PERLLIB=/usr/local/mni/lib/perl5/site_perl ; export PERLLIB
/etc/profile.) Just remember: when you upgrade to Perl 5.002 or later, this setting of
PERLLIBDIRmight be redundant, so you'll probably want to remove it at that time.
and you're ready to build the model files needed to perform
full-blown MRI->Talairach fitting with perl script mritotal.
Note that you may need to set the environment variable
to some more appropriate place than
/usr/tmp on systems where
/usr/tmp has little available space.
mni_autoreg_model-1.0.tar.gzsomewhere, and follow the instructions in the README there. When editing the Makefile, be sure to set MODELDIR to the directory used for MODELDIR above! When you have done "
make build" and "
make install", then the model will be ready to go; and, as long as you set MODELDIR correctly in both packages, mritotal will be ready to run with that model.