Login  Register

Re: Open unrecognised stack

Posted by Michael Schmid on Apr 18, 2007; 11:38am
URL: http://imagej.273.s1.nabble.com/Open-unrecognised-stack-tp3699734p3699735.html

Hi Mike,

Yes, there is such a trick:

First open the file as single 16-bit raw image with offset = 0, 3 x 1  
pixels size.

Read the first three pixel values - these are the first three 16-bit  
numbers.

For an example of such a macro, see
   http://rsb.info.nih.gov/ij/macros/OpenMacIPLab.txt

Michael

On 18 Apr 2007, at 11:44, Michael Doube wrote:

> Hi all
>
> I have some stacks that I'd like to open with ImageJ, more quickly  
> than having to go File->Import->Raw, and recovering stack  
> dimensions with a hex editor.
>
> The recorded macro command goes like this:
> run("Raw...", "open="+imagename+" image=8-bit width=900 height=160  
> offset=512 number=496 gap=0");
>
> I can get the stack dimensions from the first 6 bytes of the header  
> (512 B header) e.g. hex 84 03 A0 00 F0 01 = 900 x 160 x 496 pixels.
>
> Is there a quick and dirty way to get the stack dimensions from the  
> header so that I can make a wee macro, or could a file opener  
> plugin be extended?
>
> Cheers,
>
> Mike
>