An introduction to 3dmod, the image display and modeling program in IMOD, is now a separate document.
There is also a reference guide that gives a description of each IMOD program and a link to its man page.
csh -f imod_4.1.2_RHEL5.csh
csh -f imod_4.1.2_RHEL5.csh -dir /opt
csh -f imod_4.1.2_RHEL5.csh -extract
IMODtempDir.
There are several
other
useful options: -script
to install
startup scripts to a different location, -skip
to
skip installing startup scripts, -name
to have the IMOD
directory be renamed to the given name. Use:csh -f imod_4.1.2_RHEL5.csh -help
Processor: Almost any Intel or AMD processor from the last few years,
or medium- to high-end processors from the last 5 years, will run
adequately
Video Card: any relatively modern Nvidia card (GeForce or Quadro, 256
MB or higher cards preferred)
Minimum memory size: 2 GB
Minimum disk size: 50 GB
Operating System: Red Hat Workstation 5 or Fedora 6 or higher
Recent Nvidia Linux device drivers and OpenGL libraries from Nvidia
Nvidia installation. Installing Nvidia
drivers is now straightforward, but
here are some instructions that may
be helpful. The latest versions of the drivers change the Driver line
in /etc/X11/xorg.conf from "nv" to "nvidia" if you accept their offer
to modify the file. On Ubuntu, the installation through Synaptic Package
Manager should be adequate.
Window manager settings. To keep 3dmod from
bogging down when it is displaying complex models, some window managers
can be set to display only the outline and not the contents of
windows when they are moved or resized. This cannot be done under
Gnome but it can generallt be done under KDE. For example, on RHEL5 you can
run kcontrol
at the command line to open the
Control Center and selecting "Look and Feel" or "Desktop" (depending on
KDE version), then "Window Behavior" then the "Moving" panel.
On Fedora 11, open System Settings from the main menu, select "Look and Feel"
and "Window Behavior" and "Window Behavior" again, then the "Moving"
panel. Also, on the "Advanced" panel you should turn off "Hide utility
windows for inactive applications" to keep undocked toolbars in 3dmod from
disappearing.
Both 3dmod
and eTomo
have problems under
Compiz, so you should disable this. On Ubuntu, open the menu
entry System - Preferences - Visual Effects and select "No effects".
tcsh for Ubuntu. You
must install tcsh
even if you also have csh
installed.
Things should work with both installed, but it would be safer to have
only tcsh
. You can install tcsh
through
the Synaptic Package Manager or with:
sudo apt-get install tcsh
The self-installing package will install to a directory named IMOD
under /usr/local
unless given an alternate location to /usr/local
with the
-dir
option. It will copy the startup scripts IMOD-linux.sh
and
IMOD-linux.csh
to /etc/profile.d
.
unless given an alternate
location with the -script
option or told to skip this
step with the -skip
option, or unless you are running
Ubuntu or give the -debian
option. It the latter
cases, it will modify /etc/bash.bashrc
and /etc/csh.cshrc
to source the startup scripts from the IMOD directory, unless you give
the -skip
option. To accomplish all
of this, change directory to the place where the package is located and
enter, for example:
sudo csh
-f
imod_4.1.2_RHEL5.csh
You will have to open a new window, or possibly even log out and
log back in, for the installation to take effect.
/etc/cshrc
,
/usr/local/etc/cshrc
,
or users' .cshrc
, .bashrc
, or .bash_profile
files. The advantage of the current procedure is that future
upgrades
will be easier, especially if the startup files change..cshrc
files of individual users of tcsh
(where <location of
IMOD> is the absolute path to the IMOD directory):setenv IMOD_DIR <location of IMOD>
if (-e $IMOD_DIR/IMOD-linux.csh) source
$IMOD_DIR/IMOD-linux.csh
.bashrc
or .bash_profile
of
individual
users under bash
:export IMOD_DIR=<location of IMOD>
if [ -e $IMOD_DIR/IMOD-linux.sh ] ; then source
$IMOD_DIR/IMOD-linux.sh ; fi
.cshrc
or .basrc/.bash_profile
,
you would place these commands in the system-wide startup
scripts. You should always source the startup script that comes
with an IMOD distribution, not make a copy of the startup script and
incorporate it into other scripts.To install manually from the tar file, do the following steps
after running the self-installing file with the -extract
option:
mv imod_4.1.2_RHEL5.tar.gz /usr/local
cd /usr/local
tar -xzf imod_4.1.2_RHEL5.tar.gz
ls -l
IMOD -> imod_2.7.6
), then enter rm IMOD
mv IMOD oldIMOD
ln -s imod_4.1.2 IMOD
cp IMOD/IMOD-linux.* /etc/profile.d
/etc/csh.cshrc
and /etc/bash.bashrc
just like those given above for inserting in users' .cshrc
and .bash_profile
files, respectively. If your
system does not have /usr/lib/libtiff.so.3
, then cd $IMOD_DIR/lib
sudo ln -s /usr/lib/libtiff.so.4 libtiff.so.3
If your Ubuntu system does not have /usr/lib/libg2c.so
,
then rename each of the libg2c
files in the IMOD lib
directory, for example:cd $IMOD_DIR/lib
sudo mv imod-libg2c.so libg2c.so
sudo mv imod-libg2c.so.0 libg2c.so.0
sudo mv imod-libg2c.so.0.0.0 libg2c.so.0.0.0
tcsh
,
enter:setenv IMOD_DIR `pwd`
source IMOD-linux.csh
3dmod
may fail to run if another
installed package has placed an incompatible OpenGL library on
your library load path. The remedy for this problem would be to
edit IMOD-linux.sh
and IMOD-linux.csh
in /etc/profile.d
to change the definition of IMOD_QTLIBDIR from "$IMOD_DIR/qtlib"
to "$IMOD_DIR/qtlib:/usr/lib:/usr/X11R6/lib"
.sun-java6-jre
package
available in the Synaptic Package Manager seems to work well, and
openjdk-6-jre
is known to give display problems.
If you do want to install a Sun package in /usr/local
instead, then be aware that you need a 64-bit version for a 64-bit
system. Sun's 64-bit JRE version 1.6.0_20 is available here;
if you use this, modify all the commands given next appropriately.
To
install the JRE for Linux first move the jre-6u20-linux-i586.bin
file
to /usr/local
sudo
mv
jre-6u20-linux-i586.bin /usr/local
Next change your working directory to /usr/local
and execute the bin by entering
cd
/usr/local
sudo
sh
jre-6u20-linux-i586.bin
on the command line.
This will install the JRE in /usr/local/jre1.6.0_20
.
The IMOD startup scripts assume that the JRE is in /usr/local/java
,
so next create a link:
sudo
ln
-s jre1.6.0_20 java
If you upgrade to a different JRE, then you just
need to change the link. If you wish to use a different JRE than
the one pointed to by /usr/local/java
, you must
redefine the environment variable IMOD_JAVADIR to specify the
directory where the
JRE you wish to use is installed. The best way to do this is to
make files IMOD.csh
and IMOD.sh
in /usr/local/ImodCalib
that set this environment variable, rather than modifying the IMOD-linux.sh
and IMOD-linux.csh
scripts in /etc/profile.d
(see Using the ImodCalib Directory).
_osx_ppc
for a PowerPC (G4, G5, etc) or _osx_intel
for an Intel
processor. The self-installing package will install to
/Applications or to
an alternate location with the -dir
option. It will
not work by clicking on it, only by running it at the command
line. It will
place appropriate "source" commands for defining the user environment
in /etc/csh.login
and
/etc/profile
. You
need to be able to use sudo. Open a terminal window (under
Applications-Utilities), change
directory to the place where the package is located, and enter, e.g.:sudo csh -f imod_4.1.2_osx_intel.csh
/etc/csh.login
(if
you
are
running tcsh) or /etc/profile
(if you are running
bash).
If you are upgrading IMOD with the
default installation
procedures and your previous installation used another method of
setting environment variables, then you may need to remove "source" or
other environment-setting commands from various files, such as /etc/csh.login
,
/etc/profile
, or users' .cshrc
, .bashrc
,
or .profile
files./usr/lib
to
libraries
in the IMOD directories that will allow you to start 3dmod by clicking
on its icon. Run the linklibs-mac
script by
entering: sudo $IMOD_DIR/linklibs-mac -i
sudo $IMOD_DIR/linklibs-mac -u
If you are upgrading IMOD and have done this before, you
should run $IMOD_DIR/linklibs-mac -u
before installing
the new version.-extract
option, you have
two
alternatives. To do it from the command line, open a Terminal
window and:sudo mv imod_4.1.2_osx_ppc.tar.gz /Applications
cd /Applications
sudo tar xzf imod_4.1.2_osx_intel.tar.gz
ls -l
IMOD -> imod_3.1.6
), then enter sudo rm IMOD
sudo mv IMOD oldIMOD
sudo mv imod_4.1.2 IMOD
imod_4.1.2
/etc/csh.login
and /etc/profile
,
unless they are already there from a previous installation of
IMOD. Use sudo to invoke emacs
or pico
on
these files, .e.g.: sudo emacs /etc/csh.login
IMOD/mac.cshrc
to
the
end of /etc/csh.login
, specifically the command if (-e /Applications/IMOD/IMOD-mac.csh) source
/Applications/IMOD/IMOD-mac.csh
Similarly, copy the text in IMOD/mac.bashrc
to
the end of /etc/profile
, specifically the command [ -r /Applications/IMOD/IMOD-mac.sh ] && source
/Applications/IMOD/IMOD-mac.sh
/Applications/IMOD
to
the name of the top IMOD directory in IMOD-mac.csh
and IMOD-mac.sh
and
in the source commands placed in /etc/csh.login
and
/etc/profile.
If you are sure you are not going to install
somewhere else in the future, you can avoid modifying IMOD-mac.csh
and IMOD-mac.sh
by defining IMOD_DIR before the source
commands, i.e. with setenv IMOD_DIR <Location_of_IMOD>
/etc/csh.login,
or with export IMOD_DIR=<Location_of_IMOD>
/etc/profile
. 3dmod
with
some keyboard modifiers, but this is painful. Just get a 3-button
mouse. It may just work when you plug it in, so try it in 3dmod
before installing drivers. Installing Logitech and some other
drivers may actually make it stop working, and the solution is to
uninstall the drivers.bin
, etc
, usr
, and home
)
under its top directory,
which is C:\cygwin
by default. Terminal
windows and Cygwin programs such as the Unix tools will
display and work with Unix-type paths that are relative to the top Cygwin
directory. For example, if you install Cygwin in
C:\cygwin
,
then the location where IMOD will be installed is referred to as
/usr/local/IMOD
from within Cygwin and will exist in the
Windows file systems as C:\cygwin\usr\local\IMOD
.mintty
and a lightweight text
editor, nano
(derived from pico
and
similar
to the editor in the pine
email program).
We used to include rxvt
and have now switched to
mintty
because it has a better interface and because
rxvt
is no longer supported and has developed problems in this
Cygwin release.
The primary advantage of the mintty
window is that you can
copy and paste just like under Unix (highlight with left mouse button,
paste with middle mouse button). This capability uses the Windows
clipboard, so you can copy text in a Windows program (Ctrl-C) and paste
with the mouse in the mintty
window, or highlight in the mintty
window
and paste in a Windows program with Ctrl-V. Another
advantage is that you can resize the mintty
window
horizontally as well as vertically.cygwin
as the directory name.mintty
window running either a
bash
or a tcsh
shell..minttyrc
there that
will give good starting properties for a mintty
window..minttyrc
will also be left in /usr/local for other users to copy.setup.exe
program and a cygwinMaster
folder with all the packages.setup.exe
C:\cygwin
unless you want
it
on a different disk. Do not install under a directory with spaces in
its name. In the rest of this document, C:\ is used in the examples,
and you need to substitute your location if it is different.cygwinMaster
folder as the Local
Package Directory/home
(C:\cygwin\home
)
and some bash
startup files are copied there.cygwinMaster
folder
contains two shortcuts and a configuration file that make it
easy to use mintty.
To use mintty:Cygwin-bash.lnk
or Cygwin-tcsh.lnk
from cygwinMaster
to your desktop, depending on your
preferred shell.minttyrc
from cygwinMaster
to your Cygwin home directory.minttyrc
to
.minttyrc
with the command mv minttyrc .minttyrc
(you cannot do this in Windows Explorer). mintty
window. You can right-click in the title bar of the window and select
Options to get a dialog for adjusting font
size and style, colors, default window size, etc..Cygwin-bash
or Cygwin-tcsh
shortcut to Cygwin.
minttyrc
from the cygwinMaster
folder
to some other place where the users can access them (such as /usr/local
).tcsh
from the Shells
category. Changes in Cygwin used to periodically
break
something in IMOD. We try to keep up with these problems and
release updated packages of the current release version of IMOD, but it
is safer to use the package that we provide if it is adequate./usr/local
, copies the startup scripts
IMOD-cygwin.sh
and IMOD-cygwin.csh
to
/etc/profile.d
, and takes care of putting Cygwin on the system
path and setting the environment
variables IMOD_DIR
and HOME
as described below.
Old versions of IMOD are
automatically deleted. If you need something
besides this behavior, you can still run a self-installing package
(e.g., a csh
file like imod_4.1.2_win.csh
) at the
command line, as described below. bin
directory (e.g.,
C:\cygwin\usr\local\IMOD\bin
) to the
Windows
path, in which case you will be able to run everything, including shell
scripts,
from a DOS window.nda, mtk, mtoverlap
),
you can install ghostscript and
gsview for
Windows.IMOD-cygwin.sh
and IMOD-cygwin.csh
to
/etc/profile.d
, unless given options telling it to do something
else. It will not work by
clicking on it, only
by executing it from the command line. To
install or upgrade IMOD this way, start a Cygwin terminal window, change to the
directory where the package is located, and enter, e.g.:csh -f imod_4.1.2_win.csh
IMOD_DIR
to be C:\cygwin\usr\local\IMOD
HOME
to be C:\cygwin\home\username
PATH
, press "Edit", and
add C:\cygwin\bin;
to the front of the path (the ";" is
a separator).IMOD_DIR
as an environment variable in Windows as described above, but with the
appropriate letter instead of C, so that 3dmod
will be
able to find help files if it is started by clicking on an icon./usr/local
either from the command line or from an Explorer window, where the
location will appear as C:\cygwin\usr\local
./usr/local
and, if you have
an existing IMOD installed, rename it.cd /usr/local
mv IMOD oldIMOD
tar -xzf imod_4.1.2.tar.gz
mv imod_4.1.2 IMOD
cp IMOD/IMOD-cygwin.* /etc/profile.d
.tar.gz
distribution
instead of the self-installing distribution and use Winzip to
unpack it somewhere, (e.g., C:\Program Files
), rename the
top directory to IMOD, and add the IMOD\bin
directory
(e.g., C:\Program Files\IMOD\bin
) to your path in
Windows, as described above.
The GPU can be enabled for use through eTomo in one of two ways. If you have a cpu.adoc file to specify machines available for parallel processing, then you need to add a line
gpu = 1to the section for each computer with a usable GPU. If you do not have a
cpu.adoc
file, then select Settings from the
Options menu of eTomo. In the box User Level Enhanced
Processing, check Enable graphics processing
The easiest way to test whether the GPU is functioning is to select it when
building a tomogram. After you start generating the tomogram, there will
be a warning message if the GPU cannot be used. A few
cards have given variable results - two EVGA GeForce GT 220 and one GTX
295. Thus, it is important to test whether your GPU is
functioning correctly. The easiest way to do this is to generate a
tomogram twice in a row with the GPU.
Then, at the command line, enter
subimage setname_full.rec | tailfor a single axis data set, where
setname
is the root name of the
data set, or
subimage setnamea.rec | tailfor the A axis of a dual-axis data set. The output should be all zeros.
If you want to know how much speed improvement your system has or do more
exhaustive tests for reproducibility, get tilttimers.tar.gz
from
our ftp site and follow the
instructions in the README
file there.
On Linux, permissions on the files /dev/nvidia*
can prevent the
GPU from being used by someone ssh'd into the computer while someone else is
logged in to the
workstation. In RHEL5 and related systems, this is solved by editing
/etc/security/console.perms.d/50-default.perms
and changing the
entries on the
line for <dri> from 0600 to 0666, i.e.,
<console> 0666 <dri> 0666 root
cpu.adoc
file for enabling parallel
processing,
distortion correction files, noise files for microscope CTF correction,
and
local startup files.
The default
value for IMOD_CALIB_DIR is /usr/local/ImodCalib
on all
platforms, and it is set in the IMOD startup scripts if it is not
already
defined. We have designed this directory as a place for local files
that
should not be replaced when IMOD is upgraded.
Minimally, then, you may want to create this directory and place a cpu.adoc
there defining the number of processors on one or more
machines. In addition, the IMOD startup scripts will try to source
local
startup scripts in this directory: IMOD-...csh
will
source $IMOD_CALIB_DIR/IMOD.csh
and IMOD-...sh
will source $IMOD_CALIB_DIR/IMOD.sh
. You can use these
startup
scripts for
customizations, such as redefining IMOD_JAVADIR
, instead
of
modifying the startup scripts that come with IMOD and get replaced with
each
new version. However, if you are going to take advantage of this
mechanism
and want to redefine IMOD_CALIB_DIR
to point to a
different
location, your startup must set this environment variable before
sourcing the
IMOD startup scripts.
3dmod
is the central graphical tool
of
the IMOD package. If you are doing tomography, you should start with the
eTomo tutorial. For access to the
complete IMOD documentation, just enter imodhelp
at the command
line to open it in the Qt Assistant, where it can be browsed and
searched. Beyond this, your initial problem may be getting
data into a format usable by the IMOD programs. If you are having
problems getting your data into a format usable by IMOD contact us for
help. 3dmod
can read some common formats like JPEG,
TIFF, PNG, and BMP; it recognizes several specialized image formats
(DigitalMicrograph, EM, Hanspeter Winkler's NFF, PIF files from Bsoft);
and it has a dialog
box and options for specifying how to read raw data.
Use the program tif2mrc to
convert a series of TIFF image files into a single MRC image file. The tif2mrc
program has an option for converting 24-bit color to 8-bit grayscale
images, and options for dealing with unsigned 16 bit images, which are
a
potential problem because the standard MRC format supports only signed
16-bit
images. The following example will create a MRC file from a list of
TIFF files (cell01.tif, cell02.tif ...).
tif2mrc cell*.tif cell.mrc
See the tif2mrc manual page
for
more information on how to use tif2mrc
.
newstack cell*.mrc cell.st
raw2mrc
, you need to know the
size of the images, the type of data, and the size of any header
information preceding the image. For example, if you have a set
of files (cell01.em, cell02.em, ...) with 1024 x 1024 images of signed
16-bit integers, and a header of 512 bytes, use:raw2mrc -t short -x 1024 -y 1024 -o 512 cell*.em cell.mrc
If the data need to have their bytes swapped because they come from a machine with the opposite byte ordering (e.g. PPC Mac versus Intel), use the -s option. If you do not know something about the image, such as the header size or whether the data are unsigned or need swapping, you may be able to figure it out just by trying different options for data types and swapping. If you do not know the header size, convert one file without the -o option, load it into 3dmod, and try to see where the image data start. If the final MRC image is upside down use the -f option in the initial conversion or use the program clip to flip the image back.
When 3dmod
is started with an image file that it
does not recognize, it brings up a dialog that allows you to specify
the image and header size and the data type. Alternatively, you
can specify these features with options at the command line, which
could be the most convenient way to experiment and find the right
values. For example, the files in the previous command could be
displayed with:
3dmod -r 1024,1024,1 -H 512 -t 1 cell*.em
If you already have a 3-D model and wish to view it within
the IMOD model viewing program, 3dmodv
, you will need to
convert the file into the IMOD format. See the IMOD model file
format ASCII and binary
specifications if you wish to write your own conversion program.
Model files from the HVEM3D program can be converted to the IMOD
model format using the rec2imod
program.
The IMOD model format can be either binary or ASCII. Currently supported machines can all read and write binary model files interchangeably, so the main use of the ASCII format would be to access the data for analysis or conversion by other programs. To convert a binary IMOD file (binary.imod) to an ASCII IMOD file (ascii.imod) use the imodinfo command :
imodinfo -a binary.imod > ascii.imod
or
imodinfo -a -f ascii.imod binary.imod
will both create an ASCII model file from the binary.imod model.
The ASCII format preserves many but not all possible features in the
model. It is moderately complex and may not be the most
convenient format to use for exporting or importing data. There
are also two programs, model2point
and point2model, that can be
used to convert an IMOD model to or from a simple list of point
coordinates.
eTomo
program. Conversely, the tilt series alignment procedures there
cannot be use dThere are three general methods for obtaining alignment transforms: manual adjustment of transformation parameters, solving for a transform from a set of fiducial points that correspond between two sections, and automated search for the best fit between two images.
Midas
can be used to create a transform list or to edit an existing list; it
can work with either "f" or "g" transform lists. To get a "g" transform
list from an "f" transform list use the xftoxg
program. xftoxg
has options to leave long term trends in
the data, which are invoked by default when you run the program with
command-line arguments. Steps and Programs used in fiducial marker alignment.
3dmod
: Creates a model in which points in each
contour
are placed on adjacent sections that mark the same area on both
sections. Note that a single contour corresponds to a single fiducial
marker, and the contour contains a point on each of the sections where
the marker appears. These are contours that pass between sections
rather than being confined to a single section. xfmodel
: Creates a "f" transform list. xftoxg
: Creates a "g" transform list, leaving
in
long term trends in the data. newstack
: Creates an aligned image stack. Steps and programs used in automatic image alignment:
xfalign cell.mrc cell.xf
xftoxg to
create a global "g"
transform list from the "f" transform list:
xftoxg cell.xf
newstack -xform test.xg test.mrc newtest.mrc
If the automatic alignment is not always correct, it can be adjusted with the midas program. Start the program with:
midas test.mrc test.xf
A window will open up and you can view the alignment
between
any given pair of adjacent images. After making adjustments for any
sections that are out of alignment, save the transforms and exit the
program. Then rerun the xftoxg
and newstack
commands shown above.
Note that newstack
and some of the other programs will not work with 24-bit color
images. Use the "-g" option to tif2mrc
to convert to gray scale when making the MRC stack. If you do
need to preserve the color information, then you can split the color
into three separate byte-mode files with the clip
program, determine the alignment
with one color channel, apply the trasnformations to each of the 3
files separately, then merge the data again with clip.
For more background and explanation of the topics in this
section, see the guide to serial section
alignment.
Use the imodinfo command to get basic information from a model and print it out to a terminal or file. For example:
imodinfo cell.imod
# MODEL cell.imod
# NAME A little cell
# PIX SCALE: x = 1
# y = 1
# z = 9.17
# PIX SIZE = 0.00654
# UNITS: um
OBJECT 1
NAME: spindle pole
5 contours
object uses closed contours.
color (red, green, blue) = (0, 1, 1)
CONTOUR #1,2,0 16 points, length = 0.464513, area = 0.0134249
CONTOUR #2,2,0 14 points, length = 0.458311, area = 0.0125642
CONTOUR #3,2,0 8 points, length = 0.200755, area = 0.00277481
CONTOUR #4,2,0 13 points, length = 0.313501, area = 0.00664029
CONTOUR #5,2,0 9 points, length = 0.232374, area = 0.00272134
Total volume = 0.00228646
Total contour cylinder surface area = 0.10012.
Total mesh surface area = 0.0349499.
See also: Manual pages for 3dmodv
,imodmesh
, and imodinfo
.