I have raw images that I can import and view with ImageJ. They are the output of a program which I don't have the source code for, so I'm stuck with the output format.
They are imported as follows with ImageJ:
Image type: 16 bit Unsigned
Width: 320
Height: 25600
Offset to fist image: 0 bytes
Number of images: 1
Gap Between images: 0 bytes
White is zero unchecked
Little-endian byte order unchecked
Open all files in folder unchecked
use virtual stack unchecked.
Essentially each RAW file is a stack of 100 320 x 256 images.
When I try importing via Import[]
in Mathematica, I get
LibraryFunction::rterr: An error with return code -2 was encountered evaluating the function ReadImageRAW.
Import::fmterr: Cannot import data as Raw format.
I can't seem to find any info on the first error message.
"RawBitmap"
or"BMP"
with their various options may help. Have a look at their documentation. Since you do not provide example files, you have to try it on your own. $\endgroup$Import[file, "UnsignedInteger16"]
and convert it to an image withImage
. $\endgroup$