[Chimera-users] visualizing a confocal image stack
Thomas Goddard
goddard at cgl.ucsf.edu
Tue Sep 19 09:02:33 PDT 2006
Hi William,
Here is a page that documents the MRC format and gives MATLAB routines
for reading and writing an MRC file.
http://ami.scripps.edu/prtl_data/mrc_specification.htm
Unfortunately I see that the MATLAB writeMRCfile() routine does not
initialize some header values that Chimera requires. If you want to
write an MRC file that Chimera can read you will need to add some
lines to the writeMRCfile() routine. The MAPC, MAPR, MAPS header
values have to be set to 1,2,3 respectively. The three CELLB header
values (cell angles) have to be 90.0, 90.0, 90.0 -- but since the
MATLAB routine writes only integer header values and not float values
as required by the MRC specification, use 0, 0, 0 which will produce
default 90 degree cell angles. NSYMBT has to be 0. I think the
following added lines will set these:
dims(17) = 1
dims(18) = 2
dims(19) = 3
dims(14) = 0
dims(15) = 0
dims(16) = 0
dims(24) = 0
You mention that you have 8-bit intensity values. You can use MRC mode = 0
for 8-bit values.
dims(4) = 0
In the MRC specification this indicates signed 8-bit values -127 -> 128.
But Chimera actually reads the values as unsigned 0 -> 255. This seems
like a Chimera bug and I will fix it. But current Chimera versions will
treat mode 0 as unsigned. If you have signed 8-bit I suggest writing
the values from writeMRCfile() as 16-bit and using MRC mode = 1. This
16-bit signed MRC mode is correctly treated as signed in Chimera.
I have not tested the above modifications because I do not have MATLAB
installed. If you encounter a problem send me the Chimera error message
when reading the MRC file and I will help.
For multi-wavelength data I suggest writing each wavelength to a
separate MRC file.
What format are your 8-bit images currently in? Perhaps I can write
a Chimera file reader that just reads those directly into Chimera.
Tom
More information about the Chimera-users
mailing list