Print

When reading raw unsigned 16 bit integer data I run into problems with voxel values larger than 32767. How to deal with that?


Voxel values larger than 32767 are represented as negative numbers in the signed format used by the software.

You can solve the problem by running some Tcl operations. Suppose you named the image with the wrap around problem `wrapped' you can correct this with the following Tcl operations:
<1> wrapped clip -> a
<2> wrapped - a -> c
<3> a convert -type float
<4> c convert -type float
<5> c * -1 -> b
<6> b max 1 -> b
<7> c + 65536 -> c
<8> c * b -> c
<9> a + c -> psf
This gets you the corrected image in float format.



Keywords: file I/O raw unsigned 16 bit integer data
Categories: Faq Files, Huygens Faq, Imported Faqs
Platforms: Linux
Related products: Hu Pro