logo       

Re: Open every nth image in a stack?: msg#00174

java.imagej

Subject: Re: Open every nth image in a stack?

How do I find the offset in a tiff stack?

It is the value of tag 273 (StripOffsets), which you find by opening the stack in ImageJ with "Debug Mode" checked in Edit>Options>Misc.

-wayne


On Nov 22, 2005, at 10:44 AM, Wayne Rasband wrote:

>>  I am generating very large stacks and it would often be useful
>>  when  importing a stack of images to only open a subset of
>>  the stack.  Such  as the first 100 slices or every third slice.
>>  Is there a way to do  this?
>
> You may be able to do this using the File>Import>Raw command if the 
> images are uncompressed TIFFs, you know the offset to the first 
> image, and the images are stored consecutively. For example, you 
> can import the first 10 slices of a 100 slice stack of 512x512 16-
> bit images using the macro
>
>   run("Raw...", "width=512 height=512 offset=768 number=10 gap=0")
>
> You can import every third slice using the macro
>
>   run("Raw...", "width=512 height=512 offset=768 number=33 
> gap=1048576")
>
> These macros assumes the TIFF stack was created by ImageJ, where 
> the offset to the start of the image data is always 768. To import 
> every third slice the gap must be set to 512*512*2*2 (1048576).
>
> -wayne
>



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise