Merge multiple BufferedImages into one Image Plus Object

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Merge multiple BufferedImages into one Image Plus Object

Mahsa Naseri
Dear guys,

I am creating a big Image using multiple threads.
When the thread works are done, I collect all the small images as BufferedImages.
Now, I would like to write them all into one imagePlus object.
I checked all the methods of ImagePlus but I could not find one which would help me with my  problem.

Does anyone has an idea of how this could be done ?

Thanks a lot in advance.

Mahsa


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Merge multiple BufferedImages into one Image Plus Object

ctrueden
Hi Mahsa,

> I collect all the small images as BufferedImages. Now, I would like to
> write them all into one imagePlus object.

For unsigned 8-bit BufferedImages, use:
   new ByteProcessor(myBufferedImage);

For unsigned 16-bit BufferedImages, use:
   new ShortProcessor(myBufferedImage);

Then add the ImageProcessor into your ImageStack as you wish using the
addSlice(ImageProcessor) method.

Finally, create your ImagePlus using "new ImagePlus(String title,
ImageStack stack)"

Regards,
Curtis


On Thu, Feb 20, 2014 at 11:57 AM, Mahsa Naseri <[hidden email]>wrote:

> Dear guys,
>
> I am creating a big Image using multiple threads.
> When the thread works are done, I collect all the small images as
> BufferedImages.
> Now, I would like to write them all into one imagePlus object.
> I checked all the methods of ImagePlus but I could not find one which
> would help me with my  problem.
>
> Does anyone has an idea of how this could be done ?
>
> Thanks a lot in advance.
>
> Mahsa
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html