-
Notifications
You must be signed in to change notification settings - Fork 1
OpenDX
http://www.opendx.org/ is a visualization program to produce high quality images based on 2- or 3-D data. Its possibilities are similar to those of AVS or Iris Explorer with the advantage that it is open source. These pages comment on how to visualize XMIPP/SPIDER volumes using opendx. (In general any format that stores a volume as a header and an array of numbers can be visualized following the instructions described in this page).
Disclaimer You will need to read theOpenDX http://www.opendx.org/support Quickstart Guide manual to understand these pages, but at least we will tell you how to import the data soOpenDX understands it.
I. Auxiliary file for importing the data
Let us imagine that we have an XMIPP/SPIDER volume called asy.vol with dimensions 64x64x64 and header size 1024 bytes. With a test editor create a file like the following (In this example we will name this file asy.dx)
object 1 class gridpositions counts 64 64 64
origin -32 -32 -32
delta 0 0 1
delta 0 1 0
delta 1 0 0
attribute "dep" string "positions"
#
object 2 class gridconnections counts 64 64 64
attribute "element type" string "cubes"
attribute "dep" string "connections"
attribute "ref" string "positions"
#
#linux-intel alpha-native
#sgi, aix, sun
#format = msb ieee
object 3 class array type float rank 1 shape 1 items 262144 lsb ieee data file asy.vol,1024
attribute "dep" string "positions"
#
object "default" class field
component "positions" value 1
component "connections" value 2
component "data" value 3
end
In addition to the file, grid and header fields you may need to modify the format and type fields. Format refers to the type of float point representation (usually lsb ieee for linux machines and msb ieee for all the other UNIX machines except alpha based ones) and type is the kind of variable assigned to each voxel (usually float in XMIPP/SPIDER format).
II. Loading the network
StartOpenDX (typedx
for this) and load one of the following sample nets:
- /volume.net (Simplest example, just volume rendering)
- /distance.net (Compute distance between two points in a volume)
- /virus.net (Color depend on the distance to the center)
volume.net
is the simplest example. You can change the threshold value by clicking on the scalar module.
distance.net
measures the distance between two points on the volume surface. In order to measure distances, do the following:
- select at the display window: Options->viewcontrol and then mode->pick
- click in the image
- select picks->pick_2
- pick again in the image.
The use of colormaps is much more interesting in this second net that in the first one.
virus.net
is used mainly for viruses when we need the color to vary as a function of the distance to the origin of coordinates.
NOTE: Step 2 is identical to the previous case, only step 1 changes. The nets are the same and the file that need to be selected by theFileName module is the "header" file (see next section for a description of the header file)
I. Data conversion
This example is only valid for FCC grid produced as a single non orthogonal CC grid.
Header file
The header file (for the FCC grid) looks like:
object 1 class gridpositions counts 81 81 81
origin 0 0 0
delta 0.5 0.5 0
delta 0.5 0.0 0.5
delta 0 0.5 0.5
attribute "dep" string "positions"
#
object 2 class gridconnections counts 81 81 81
attribute "element type" string "cubes"
attribute "dep" string "connections"
attribute "ref" string "positions"
#
object 3 class array type float rank 1 shape 1 items 531441 sb ieee data file asy.vol,1024
attribute "dep" string "positions"
#
object "default" class field
component "positions" value 1
component "connections" value 2
component "data" value 3
#
end
The fields you may need to modify are:
-
81 81 81
this is the volume size (be aware that these values appear two times in the header file) -
1024
is the header size -
531441
number of voxels -
asy.vol
name of the file with the data
If a BCC grid is desired instead of a FCC, change:
object 1 class gridpositions counts 81 81 81
origin 0 0 0
delta 0.5 0.5 0
delta 0.5 0.0 0.5
delta 0 0.5 0.5
attribute "dep" string "positions"
to
object 1 class gridpositions counts 81 81 81
origin 0 0 0
delta 0.5 0.5 -0.5
delta 0.5 -0.5 0.5
delta -0.5 0.5 0.5
attribute "dep" string "positions"