[Image-SIG] convert images -> stack

W. Bryan Smith wbsmith at gmail.com
Wed Jul 18 23:29:47 CEST 2007


create a numpy zeros array of the required
size... for example:

imgArray = numpy.zeros( ( yourImageSize[0], yourImageSize[1], numImages ),
dType )

where dType is the bit depth of your images.  so, for example, with
8-bit unsigned data, dType would be:

numpy.uint8

then you just have to loop through, reading your images and
dropping them into your numpy array.

maybe there is a better way to do this, but this is what i have used
and it works so far!

bryan

On 7/18/07, sittner at lkb.ens.fr <sittner at lkb.ens.fr> wrote:
>
> Hi there,
> I am looking for a way to convert a group of images (.tif in my case) into
> one stack, using python.
> can anyone give a hint ?
> thanks,
> t.
>
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/image-sig/attachments/20070718/0a9f9dcb/attachment.htm 


More information about the Image-SIG mailing list