Attachment 'README-MNI-MGH.txt'

Download

------------------------------------------------------------------------
        MNI-BIC software bundle for the Freesurfer environment
------------------------------------------------------------------------

Contained in mni.srcbuild.tar.gz are the source files for a subset of  
the MNI-BIC software commonly used in a Freesurfer working environment.

(Note that the MNI-BIC binaries necessary to run Freesurfer are already
included with the current Freesurfer distribution, so building from
source is generally not necessary.)
  
A Makefile has been created to build, install and test this software.  
Some of the source files have been modified to ensure correct build and 
test across the many platforms that Freesurfer supports.  These mods
should not affect the functionality of the software.  The files
prefaced with 'diffs-*' detail the changes.  Not shown in these diffs
is the change made to numerous files whereby 'Status' was changed to
'VIO_Status', after removing the 'typedef Status VIO_Status' in the
minc/volume_io.h file, to allow building with the gcc flag -Werror.

The software included in this special bundle:

        NetCDF          v3.6.0-p1
        MINC            v1.4
        MNI Perllib     v0.07
        N3              v1.10
        EBTKS           v1.4
        Getopt-Tabular  v0.3
        MNI autoreg     v0.98r
        MNI models      v1.03
        BICPL           v1.4.1
        Register        v1.3.5
        Display         v1.3.9

Note: the software was downloaded from the main MNI-BIC website:

        http://www.bic.mni.mcgill.ca/software/distribution/

except netcdf, which was downloaded from:

        http://www.unidata.ucar.edu/software/netcdf/

The platforms upon which that this bundle has successfully built and 
tested, using the given Makefile, include:

        Linux CENTOS 4
        Linux RHEL 4
        Linux Redhat 9.0
        Linux Redhat 7.3
        Max OS X Darwin 8.1.0 (Tiger)
        Mac OS X Darwin 7.9.0 (Panther)
        Windows Cygwin

To build, install and test this bundle on your system, assuming you 
have already untar'd/gunzip'd the file mni.srcbuild.tar.gz, first,
declare MNI_INSTALL_DIR, which defines where the files are to be 
installed.  The ideal (default) location on non-MGH machine (which 
already have MNI installed in this location) is:

        setenv MNI_INSTALL_DIR   /usr/pubsw/packages/mni/current

Root access is usually required to install here.  Installing here
creates the least conflicts with certain Freesurfer tools that
assume this path.

Next, PERL5LIB must be declared.  PERL5LIB defines where perl will 
look for its MNI utils, like MNI/Startup.pm.  Usually, for Linux
systems, this location is $MNI_INSTALL_DIR/lib/perl5/5.8.5, but, the 
version of perl seems to vary considerably across platform, and so
the proper PERL5LIB must be determined manually.  Type:

        make mni_perllib

to build the mni Perl libs, which will install them somewhere in the 
$MNI_INSTALL_DIR/lib dir.  Go there and look for something like a 
'perl5/5.8.5' directory (the actual version number might be different). 
PERL5LIB should be set to whatever directory contains the 'MNI' 
directory (which contains the file Startup.pm).  Once this directory
is determined, then declared PERL5LIB, for instance:

        setenv PERL5LIB $MNI_INSTALL_DIR/lib/perl5/5.8.5
 
If PERL5LIB is not set properly, then the autoreg package will fail 
to build. 

Now that MNI_INSTALL_DIR and PERL5LIB are declared, type

        source SetupMniEnv.csh

Notice that you can declare your own MNI_INSTALL_DIR and PERL5LIB
settings in your .cshrc, and follow that with the 
'source SetupMniEnv.csh' statement to setup the remaining vars.

Once these are declared in your environment, type the following to
build and install all the remaining packages:

        make

Following this, to run all the built-in tests, type:

        make check

If all checks pass (ie, if the message 'Successful make check' appears
after all tests execute), then the object files and other non-essentials
can be removed by typing:

        make distclean

Remember that it will be necessary to declare MNI_INSTALL_DIR and 
PERL5LIB, followed by SetupMniEnv.csh, in your .cshrc file.

Common sources of build failures include:

1) Improper PERL5LIB.  
If building autoreg fails with a complaint about not finding 
MNI/Startup.pm, or it says 'Can't locate Getopt/Tabular.pm in @INC',
then the PERL5LIB path is incorrect.  To discover the correct path 
for PERL5LIB, type:

        make mni_perllib

to create and install the MNI perl files.  It puts them where it deems 
appropriate, ie, not completely a user-defined spec.  Note that in 
this instance, the PERL5LIB variable is not used, and can be wrong.
Next, goto $MNI_INSTALL_DIR/lib and hunt around for the file Startup.pm.  
It should be in a directory called MNI.  
PERL5LIB should be set to the directory containing MNI. Edit your
SetupMniEnv.csh file with this new PERL5LIB (usually involving just a
few minor edits to the existing PERL5LIB setting) and source it again.

2) tag=CC not recognized.  
This can happen when building Register or Display, and the default
configure settings are not working for your platform.
The correction is to change to the offending directory (such as 
Register-1.3.5-src or Display-1.3.9-src) and type:

        aclocal
        libtoolize --force 
        autoreconf --force

a few times, then change back to the main directory, and rebuild 
the failed-build package by typing:

        make register

or

        make display

3) 'make_model' not found.
The SetupMniEnv.csh script must be executed, which sets the path to
the $MIN_INSTALL_DIR/bin directory.

Note: The minc 'make check' tests fail if built with gcc 4.0. 
Note: Succesful build/install/tests have used gcc versions 2.9.6, 3.3, 
& 3.4.3.

Please let me know if additional packages should be included in this 
special bundle, if build failures occur, or if it is successful for you.

------------------------------------------------------------------------
Nick Schmansky, Engineer             email: nicks at nmr.mgh.harvard.edu
MGH/MIT/HMS Martinos Center for Biomedical Imaging
149 Thirteenth Street, Room 2301     Charlestown, MA 02129           USA
------------------------------------------------------------------------
Document update: 15 November 2005

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.

You are not allowed to attach a file to this page.