Question

I am working on decoding an image file derived from an x-ray machine which is of unknown format.

The extension is .img, however this does not match any known formats of this extension, nor does the magic number heading match any references I've been able to find online (including DICOM specifications).

The data appears to be uncompressed, so I am able to attain an image by simply parsing the bytes after chopping off a randomly sized header (example images are chopped by ~512 bytes).

Here is the funny part - there appear to be two images embedded in every file, neither of which appears to be rendered correctly, as seen below:

http://ogaard.no/out.jpg

And the original:

http://ogaard.no/in.img

I have little experience with image encoding, and after bedding with Google for a couple of days on the subject I have to give in to the greater forces available on the interwebs - hopefully you.

Does anyone know what this kind of distortion indicates or knows about tools for decomposing/analysing image headers/data structure?

Was it helpful?

Solution

I couldn't figure out what the file format is, but the data appears to consist of signed little-endian 16-bit integers.

This is what I got after stripping the first 2562 bytes: recovered x-ray images

The white snow appearing below the X-rays is caused by negative values wrapping round to +255

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top