Determine the voxel type for an EMPIAR deposition
While finalizing a deposition to EMPIAR, I found myself once again stumbling on the “voxel type” field in the metadata entry form. I looked up how to determine this type from the raw images in the past, and even have notes about it at different places. Here is one more note, hopefully easier to find.
This method was first explained to me by Takanori Nakane
after I asked this question on the CCPEM list in 2020. It requires the
libtiff-tools
package.
To determine the voxel type for an EMPIAR deposition, run this command:
tiffdump -h one-of-your-movies.tiff | grep 339
The output will look like this (with as many lines as there are frames in the tiff file):
SampleFormat (339) SHORT (3) 1<0x1>
...
If the hexadecimal number between <>
is 0x1
(1 in decimal), it means
unsigned
. If it is 0x2
(2 in decimal), it means signed
.
Then run this other command:
tiffdump -h one-of-your-movies.tiff | grep 258
The output will look like this:
BitsPerSample (258) SHORT (3) 1<0x8>
...
If the hexadecimal number is 0x8
(8 in decimal), it means byte
. If it is
0x10
(16 in decimal), it means short
.
For the data I work with, I typically get a voxel type of unsigned byte
, as
shown above. But this depends on the settings used during data collection.
There are several hexadecimal to decimal converters online, I used this one at the time I first wrote this note.
One can also probably use the header
command from IMOD and figure out
the map mode
, but I found it not straightforward to relate to the EMPIAR voxel
types, at least based on the documentation I found.