Comment lines begin with a '#' character; blank lines are skipped. Data lines begin with a word directive followed by data. Some directives will assume data on new lines.
The first data line must begin with the word 'imod' followed by the number of objects in the model on the same line.
imod (Number of Objects)
The ref... directives specify the relation between model and image coordinates for the last image file that the model was loaded with. The refcurscale and refcurrot values are based on the pixel spacing and rotation angles of the image file; refoldtrans values are based on the origin values in the image file, but with the original, internal IMOD sign convention (subareas have negative values); and refcurtrans values are based on the starting coordinate that was loaded in the image file. For example, if there is no rotation, then to get from an X coordinate in the model to the X pixel coordinate in the full image file, one would add ((refoldtrans x) - (refcurtrans x)) / (refcurscale x).
offsets (x) (y) (z)
max (x) (y) (z)
scale (x) (y) (z)
angles (x) (y) (z)
refcurscale (x) (y) (z)
refcurtrans (x) (y) (z)
refcurrot (x) (y) (z)
refoldtrans (x) (y) (z)
Additional model directives are as follows. The units should be nm, um, or mm.
The slicerAngle entry specifies X, Y, and Z angles then the X, Y, Z
center position.
drawmode (1 to draw model, -1 not to)
b&w_level (black_slider,white_slider)
resolution (pixel spacing for drawing model points)
threshold (threshold for autocontouring)
pixsize (pixel size)
units (units)
slicerAngle (time) (x) (y) (z) (x)
(y) (z) (label)
currentview (view number)
view (index)
viewfovy (perspective)
viewcnear (near Z clipping plane value)
viewcfar (far Z clipping plane value)
viewflags (flags for lighting and transformation properties)
viewtrans (x shift) (y shift) (z shift)
viewrot (x rotation) (y rotation) (z rotation)
viewlight (x position) (y position)
depthcue (starting distance) (ending distance)
viewlabel (text string with view name)
globalclips (# of planes) (flags) (trans) (current plane)
The globalclips line is followed by one line per clip plane, containing the X, Y, Z components of the normal vector and X, Y, Z coordinates of a point in the plane. Bits 0-6 of flags indicate which planes are on.
object (index) (number of contours in object) (number of meshes in object)
color (red) (green) (blue) (trans)
Fillcolor (red) (green) (blue)
name (text string with object name)
linewidth (2D line width)
surfsize (maximum surface number in object)
pointsize (3D sphere size)
axis (unused)
drawmode (unused)
width2D (2D line width)
symbol (symbol type)
symsize (symbol size)
symflags (flags for end symbols: bit 0 fill, bit 1 draw
beginning/end symbols)
ambient (ambient light value)
diffuse (diffuse light value)
specular (specular setting)
shininess (shininess setting)
obquality (sphere drawing quality)
valblack (black level for value display)
valwhite (white level for value display)
matflags2 (flags for value drawing: bit 0 skip low, bit 1 skip
high, bit 2 constant color)
objclips (# of planes) (flags) (trans) (current plane)
The objclips line is followed by one line per clip plane, containing the X, Y, Z components of the normal vector and X, Y, Z coordinates of a point in the plane. Bits 0-6 of flags indicate which planes are on, and bit 7 indicates whether to ignore global clipping planes.
The following are object flags.
open: Contours are open
closed: Contours are not open
scattered: Do not connect points
fill: Draw model filled
drawmesh: Draw mesh
nolines: Do not draw lines with mesh
nodraw: Turn off object
bothsides: Light both sides
insideout: Light the inside surface
usefill: Use fill color to draw mesh
pntusefill: Use fill color for 3D points
pntonsec: Draw 3D points only on section
antialias: Antialias line drawing
hastimes: Contour data has times
usevalue: Draw values in mesh display
valcolor: Show values in false color
contour (index) (surface)
(number of points in contour) [value]
(x) (y) (z)
(x) (y) (z) [point size>] [value]
... for each point.
Following the contour data may be two optional directives:
contflags (contour flags: bit 3 open, bit 4 wild, bit 17 scan
contour)
conttime (contour time)
mesh (index)
(# of vertices + # of normals) (index list size)
vertex
(x) (y) (z)
normal
(x) (y) (z)
vertex
(x) (y) (z)
normal ... for each vertex
(x) (y) (z)
... for each list index
(index)
(index)
negative index values give the following drawing instructions.
-1 end of list array -20 next item on list is normal vector. -21 begin concave polygon -22 end polygon -23 begin vertex,normal polygon pairs. -24 begin large convex polygon with normals. -25 begin vertex,normal polygon pairs with vertex indicesCurrently, meshes in model files consist only of polygons with vertex, normal pairs, starting with -23 or -25 and ending with -22. In polygons starting with -23, each set of 6 indices describes a triangle as follows:
index to normal 1 index to vertex 1 index to normal 2 index to vertex 2 index to normal 3 index to vertex 3In polygons starting with -25, each normal is assumed to follow its corresponding vertex, and each triangle is described by only 3 indices:
index to vertex 1 index to vertex 2 index to vertex 3It is also legal to have polygons consisting only of vertices, without normals; these polygons start with -21 and each triangle is described by 3 indices as above for the polygons starting with -25.
Following all of the mesh data may be three optional directives:
Meshflags (mesh flags; bit 16 normals have magnitudes; bits 20-23
resolution)
Meshsurf (mesh surface number)
Meshtime (mesh time)