Save image with selection overlay

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

Save image with selection overlay

Ofra Golani
Hi,

I processed my original image, and then segmented it using Analyze Particles.
I use Create Selection and Restore Selection to overlay the selection over the original image.
How can I save an Image with the overlay selection ?

Thanks,
Ofra Golani


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

Re: Save image with selection overlay

Michael Schmid
Hi Ofra,

if you save an image as TIFF or ZIP (=zip-compressed TIFF), the current selection and overlays are saved with the image and restored if you load it.

Michael
________________________________________________________________
On Mar 5, 2013, at 13:42, Ofra Golani wrote:

> Hi,
>
> I processed my original image, and then segmented it using Analyze Particles.
> I use Create Selection and Restore Selection to overlay the selection over the original image.
> How can I save an Image with the overlay selection ?
>
> Thanks,
> Ofra Golani
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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

Re: Save image with selection overlay

Rainer M. Engel
Hello Michael,

I wouldn't have known that either. I knew that TIF is a mature and
flexible format and that its library offers ZIP/Deflate algorithm for
lossless compression. But that ZIP in the Save As menu would mean TIF
with ZIP lossless compression.. :)

What about TIF LZW which is supported by ImageMagick/GraphicsMagick? Is
it bound to a license?

Regards,
Rainer



Am 06.03.2013 10:20, schrieb Michael Schmid:

> Hi Ofra,
>
> if you save an image as TIFF or ZIP (=zip-compressed TIFF), the current selection and overlays are saved with the image and restored if you load it.
>
> Michael
> ________________________________________________________________
> On Mar 5, 2013, at 13:42, Ofra Golani wrote:
>
>> Hi,
>>
>> I processed my original image, and then segmented it using Analyze Particles.
>> I use Create Selection and Restore Selection to overlay the selection over the original image.
>> How can I save an Image with the overlay selection ?
>>
>> Thanks,
>> Ofra Golani
>>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>

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

Re: Save image with selection overlay

Michael Schmid
Hi Rainer,

LZW encoding was protected by a patent until 2004 or so; the origins of ImageJ are older than this. Thus, ImageJ only supports LZW decompression, not compresssion. Anyhow, I guess that LZW is not much better than ZIP compression?

Michael
________________________________________________________________
On Mar 6, 2013, at 11:41, Rainer M. Engel wrote:

> Hello Michael,
>
> I wouldn't have known that either. I knew that TIF is a mature and
> flexible format and that its library offers ZIP/Deflate algorithm for
> lossless compression. But that ZIP in the Save As menu would mean TIF
> with ZIP lossless compression.. :)
>
> What about TIF LZW which is supported by ImageMagick/GraphicsMagick? Is
> it bound to a license?
>
> Regards,
> Rainer
>
>
>
> Am 06.03.2013 10:20, schrieb Michael Schmid:
>> Hi Ofra,
>>
>> if you save an image as TIFF or ZIP (=zip-compressed TIFF), the current selection and overlays are saved with the image and restored if you load it.
>>
>> Michael
>> ________________________________________________________________
>> On Mar 5, 2013, at 13:42, Ofra Golani wrote:
>>
>>> Hi,
>>>
>>> I processed my original image, and then segmented it using Analyze Particles.
>>> I use Create Selection and Restore Selection to overlay the selection over the original image.
>>> How can I save an Image with the overlay selection ?
>>>
>>> Thanks,
>>> Ofra Golani
>>>
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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

Re: Save image with selection overlay

ctrueden
Hi Rainer, Michael, everyone,

> LZW encoding was protected by a patent until 2004 or so; the origins
> of ImageJ are older than this. Thus, ImageJ only supports LZW
> decompression, not compresssion. Anyhow, I guess that LZW is not much
> better than ZIP compression?

You can write LZW-compressed TIFF using the Bio-Formats Exporter plugin.
(It also supports JPEG2000, JPEG2000 Lossy, and JPEG.)

I wrote an article comparing LZW TIFF vs. zipped TIFF vs. some other
compression types. You can read about it at:


https://www.openmicroscopy.org/site/support/file-formats/ome-tiff/ome-tiff-data/

I did not compare with the JPEG-based compression schemes though, since we
had not yet implemented those at the time. Feedback welcome from those who
have tried it.

Regards,
Curtis


On Wed, Mar 6, 2013 at 8:05 AM, Michael Schmid <[hidden email]>wrote:

> Hi Rainer,
>
> LZW encoding was protected by a patent until 2004 or so; the origins of
> ImageJ are older than this. Thus, ImageJ only supports LZW decompression,
> not compresssion. Anyhow, I guess that LZW is not much better than ZIP
> compression?
>
> Michael
> ________________________________________________________________
> On Mar 6, 2013, at 11:41, Rainer M. Engel wrote:
>
> > Hello Michael,
> >
> > I wouldn't have known that either. I knew that TIF is a mature and
> > flexible format and that its library offers ZIP/Deflate algorithm for
> > lossless compression. But that ZIP in the Save As menu would mean TIF
> > with ZIP lossless compression.. :)
> >
> > What about TIF LZW which is supported by ImageMagick/GraphicsMagick? Is
> > it bound to a license?
> >
> > Regards,
> > Rainer
> >
> >
> >
> > Am 06.03.2013 10:20, schrieb Michael Schmid:
> >> Hi Ofra,
> >>
> >> if you save an image as TIFF or ZIP (=zip-compressed TIFF), the current
> selection and overlays are saved with the image and restored if you load it.
> >>
> >> Michael
> >> ________________________________________________________________
> >> On Mar 5, 2013, at 13:42, Ofra Golani wrote:
> >>
> >>> Hi,
> >>>
> >>> I processed my original image, and then segmented it using Analyze
> Particles.
> >>> I use Create Selection and Restore Selection to overlay the selection
> over the original image.
> >>> How can I save an Image with the overlay selection ?
> >>>
> >>> Thanks,
> >>> Ofra Golani
> >>>
> >>>
> >>> --
> >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >>
> >> --
> >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >>
> >>
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Re: Save image with selection overlay - TIFF, BIOFORMATS and OpenEXR

Rainer M. Engel
Hello everyone, hey Curtis,

thank you for your insight and the provided link. We've made similar
tests in the past and like your summary this can provide useful guidance
for projects and the handling of footage/data.

In digital post-production lossless compression is mandatory (should be
used) especially for masks in hight bit depths and resolutions since
encoding/decoding + I/O-Time mostly outperforms writing/reading of "raw"
data.

My experience is that LZW is faster but ZIP creates smaller files. In
our pipeline we noticed that LZW is supported more often by different
software tools.

Having mentioned these truly lossless compression schemes I want to
express that OpenEXR seems to become a format of increasing importance
in the archive area of digital film.
http://openexr.com/

It offers some more built in methods and is implemented in every
HighEnd-Software focusing on 3D, Compositing, Grading and such with no
limit in used channels. Beyond that TimeCode/KeyCode or other MetaData
like DPX.

Maybe I'm wrong at this. But I like the though of that concept, working
with lossless compression, since every decoded image provides the same
information that was encoded before. With no compression there might be
artefacts in your data which were caused by bad media or transmission
somehow. Hopefully not, but lossless compression gives you silent proof
by every single frame that was successful read.


Best Regards,
Rainer




Am 06.03.2013 17:38, schrieb Curtis Rueden:

> Hi Rainer, Michael, everyone,
>
>> LZW encoding was protected by a patent until 2004 or so; the origins
>> of ImageJ are older than this. Thus, ImageJ only supports LZW
>> decompression, not compresssion. Anyhow, I guess that LZW is not much
>> better than ZIP compression?
>
> You can write LZW-compressed TIFF using the Bio-Formats Exporter plugin.
> (It also supports JPEG2000, JPEG2000 Lossy, and JPEG.)
>
> I wrote an article comparing LZW TIFF vs. zipped TIFF vs. some other
> compression types. You can read about it at:
>
>
> https://www.openmicroscopy.org/site/support/file-formats/ome-tiff/ome-tiff-data/
>
> I did not compare with the JPEG-based compression schemes though, since we
> had not yet implemented those at the time. Feedback welcome from those who
> have tried it.
>
> Regards,
> Curtis
>
>
> On Wed, Mar 6, 2013 at 8:05 AM, Michael Schmid <[hidden email]>wrote:
>
>> Hi Rainer,
>>
>> LZW encoding was protected by a patent until 2004 or so; the origins of
>> ImageJ are older than this. Thus, ImageJ only supports LZW decompression,
>> not compresssion. Anyhow, I guess that LZW is not much better than ZIP
>> compression?
>>
>> Michael
>> ________________________________________________________________
>> On Mar 6, 2013, at 11:41, Rainer M. Engel wrote:
>>
>>> Hello Michael,
>>>
>>> I wouldn't have known that either. I knew that TIF is a mature and
>>> flexible format and that its library offers ZIP/Deflate algorithm for
>>> lossless compression. But that ZIP in the Save As menu would mean TIF
>>> with ZIP lossless compression.. :)
>>>
>>> What about TIF LZW which is supported by ImageMagick/GraphicsMagick? Is
>>> it bound to a license?
>>>
>>> Regards,
>>> Rainer
>>>
>>>
>>>
>>> Am 06.03.2013 10:20, schrieb Michael Schmid:
>>>> Hi Ofra,
>>>>
>>>> if you save an image as TIFF or ZIP (=zip-compressed TIFF), the current
>> selection and overlays are saved with the image and restored if you load it.
>>>>
>>>> Michael
>>>> ________________________________________________________________
>>>> On Mar 5, 2013, at 13:42, Ofra Golani wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I processed my original image, and then segmented it using Analyze
>> Particles.
>>>>> I use Create Selection and Restore Selection to overlay the selection
>> over the original image.
>>>>> How can I save an Image with the overlay selection ?
>>>>>
>>>>> Thanks,
>>>>> Ofra Golani
>>>>>
>>>>>
>>>>> --
>>>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>>
>>>> --
>>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>>
>>>>
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Re: Save image with selection overlay

Ofra Golani
In reply to this post by Ofra Golani
Hi Michael,

Thanks for the Tip, Saving as Zip does the work.
However, saving as Tiff does not save the overlay but only the underlying image.

Ofra


-----Original Message-----
From: Michael Schmid [mailto:[hidden email]]
Sent: Wednesday, March 06, 2013 11:20 AM
Subject: Re: Save image with selection overlay

Hi Ofra,

if you save an image as TIFF or ZIP (=zip-compressed TIFF), the current selection and overlays are saved with the image and restored if you load it.

Michael
________________________________________________________________
On Mar 5, 2013, at 13:42, Ofra Golani wrote:

> Hi,
>
> I processed my original image, and then segmented it using Analyze Particles.
> I use Create Selection and Restore Selection to overlay the selection over the original image.
> How can I save an Image with the overlay selection ?
>
> Thanks,
> Ofra Golani
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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

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

Re: Save image with selection overlay

Michael Schmid
Hi Ofra,

strange that you don't get the overlay saved in TIFF. The following macro works perfectly well for me (ImageJ 1.47k, Mac OS X). It loads the image together with the overlay and the selection.

run("Blobs (25K)");
makeRectangle(34, 30, 77, 122);
run("Add Selection...");
makeLine(175, 15, 174, 241);
run("Add Selection...");
makeLine(89, 213, 226, 73);
saveAs("Tiff", getDirectory("home")+"/blobs.tif");
close();
open(getDirectory("home")+"/blobs.tif");


Michael
________________________________________________________________
On Mar 7, 2013, at 07:20, Ofra Golani wrote:

> Hi Michael,
>
> Thanks for the Tip, Saving as Zip does the work.
> However, saving as Tiff does not save the overlay but only the underlying image.
>
> Ofra
>
>
> -----Original Message-----
> From: Michael Schmid [mailto:[hidden email]]
> Sent: Wednesday, March 06, 2013 11:20 AM
> Subject: Re: Save image with selection overlay
>
> Hi Ofra,
>
> if you save an image as TIFF or ZIP (=zip-compressed TIFF), the current selection and overlays are saved with the image and restored if you load it.
>
> Michael
> ________________________________________________________________
> On Mar 5, 2013, at 13:42, Ofra Golani wrote:
>
>> Hi,
>>
>> I processed my original image, and then segmented it using Analyze Particles.
>> I use Create Selection and Restore Selection to overlay the selection over the original image.
>> How can I save an Image with the overlay selection ?
>>
>> Thanks,
>> Ofra Golani
>>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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

Re: Save image with selection overlay

Mohamed Tleis
In reply to this post by Ofra Golani
Hi Ofra,

I had a similar problem before; and it turned out that I should update
imageJ. I think this option is new in imageJ, and don't work on old
versions (maybe I am wrong, but you can try).

Best Regards,
M. Tleis


On 03/07/2013 07:20 AM, Ofra Golani wrote:

> Hi Michael,
>
> Thanks for the Tip, Saving as Zip does the work.
> However, saving as Tiff does not save the overlay but only the underlying image.
>
> Ofra
>
>
> -----Original Message-----
> From: Michael Schmid [mailto:[hidden email]]
> Sent: Wednesday, March 06, 2013 11:20 AM
> Subject: Re: Save image with selection overlay
>
> Hi Ofra,
>
> if you save an image as TIFF or ZIP (=zip-compressed TIFF), the current selection and overlays are saved with the image and restored if you load it.
>
> Michael
> ________________________________________________________________
> On Mar 5, 2013, at 13:42, Ofra Golani wrote:
>
>> Hi,
>>
>> I processed my original image, and then segmented it using Analyze Particles.
>> I use Create Selection and Restore Selection to overlay the selection over the original image.
>> How can I save an Image with the overlay selection ?
>>
>> Thanks,
>> Ofra Golani
>>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> .
>

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