How to permanently add selections to images

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

How to permanently add selections to images

PEARSON Matthew
Hi all,

I'm having some issues making selections permanent on images.  The idea is that the macro makes various selections, then at the end an image should be produced that has those selections "flattened" on.  This image is purely to show the user where the selections are and what has been measured, it doesn't have to be the raw image its merely representative.

I have tried using the run("Draw") option but the lines are quite thick & blocky and don't seem to be able to make them thinner.  I have also tried roiManager("deselect") which is equivalent to selecting all ROI's in the manager then using run("Flatten"); i get a flattened image but the ROI's are not present on it.  This is what i tried:

roiManager("show all without labels");
roiManager("deselect");
run("From ROI Manager");
run("Flatten");

Is there an alternative?  It would be nice if you could simply show all ROI's and then if there was a function to create an image as it is currently displayed-like a screenshot.  I assumed this is what run("Flatten") does?

Thanks for the help,

Matt


--
Matt Pearson
Microscopy Facility
MRC Human Genetics Unit
Institute of Genetics and Molecular Medicine (IGMM)
University of Edinburgh
Crewe Road
EH4 2XU





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

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

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

Re: How to permanently add selections to images

Herbie
Good day Matt,

I think overlays are made for this.

If you have your ROIs in the ROI-manager, you may use
Image > Overlay > From ROI Manager

I you save the image as .tif, the overlay is saved with it.

You may show or hide the overlay but you may also make it permanent by
flattening it.

HTH

Herbie

:::::::::::::::::::::::::::::::::::::::::::::
Am 02.11.16 um 10:33 schrieb PEARSON Matthew:

> Hi all,
>
> I'm having some issues making selections permanent on images.  The
> idea is that the macro makes various selections, then at the end an
> image should be produced that has those selections "flattened" on.
> This image is purely to show the user where the selections are and
> what has been measured, it doesn't have to be the raw image its
> merely representative.
>
> I have tried using the run("Draw") option but the lines are quite
> thick & blocky and don't seem to be able to make them thinner.  I
> have also tried roiManager("deselect") which is equivalent to
> selecting all ROI's in the manager then using run("Flatten"); i get a
> flattened image but the ROI's are not present on it.  This is what i
> tried:
>
> roiManager("show all without labels"); roiManager("deselect");
> run("From ROI Manager"); run("Flatten");
>
> Is there an alternative?  It would be nice if you could simply show
> all ROI's and then if there was a function to create an image as it
> is currently displayed-like a screenshot.  I assumed this is what
> run("Flatten") does?
>
> Thanks for the help,
>
> Matt
>
>
> -- Matt Pearson Microscopy Facility MRC Human Genetics Unit Institute
> of Genetics and Molecular Medicine (IGMM) University of Edinburgh
> Crewe Road EH4 2XU
>
>
>
>
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>
>
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
> -- 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: How to permanently add selections to images

Jeremy Adler-2
In reply to this post by PEARSON Matthew
Select the ROIs you want to combine/show in the ROI Manager
Then from the ROI manager
More/Or(combine)
This creates a single selection that includes the selections you chose.

To make the selection part of the image
Use Overlay
Add the selection as an overlay
Then flatten the image - the selection is now embedded in the pixels.

By adding your initial selections one by one (using Overlay) you could colour them differently

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of PEARSON Matthew
Sent: den 2 november 2016 10:34
To: [hidden email]
Subject: How to permanently add selections to images

Hi all,

I'm having some issues making selections permanent on images.  The idea is that the macro makes various selections, then at the end an image should be produced that has those selections "flattened" on.  This image is purely to show the user where the selections are and what has been measured, it doesn't have to be the raw image its merely representative.

I have tried using the run("Draw") option but the lines are quite thick & blocky and don't seem to be able to make them thinner.  I have also tried roiManager("deselect") which is equivalent to selecting all ROI's in the manager then using run("Flatten"); i get a flattened image but the ROI's are not present on it.  This is what i tried:

roiManager("show all without labels");
roiManager("deselect");
run("From ROI Manager");
run("Flatten");

Is there an alternative?  It would be nice if you could simply show all ROI's and then if there was a function to create an image as it is currently displayed-like a screenshot.  I assumed this is what run("Flatten") does?

Thanks for the help,

Matt


--
Matt Pearson
Microscopy Facility
MRC Human Genetics Unit
Institute of Genetics and Molecular Medicine (IGMM) University of Edinburgh Crewe Road
EH4 2XU





--
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: How to permanently add selections to images

PEARSON Matthew
In reply to this post by Herbie
Hi Herbie,

Thanks for that, i didn't know overlays could be saved and recalled like that.  For this situation i would like to flatten the image to make it permanent and initially when i did this the overlays were not shown on the flattened image and i realised that this is because i have set my line selections to be very thin using ROI.setStrokeWidth(0.1) at this width the selections do not appear on the flattened image for some reason.  If i increase the width to 0.5 then they do appear, i'm not sure why this is.  Ideally i would like them set to 0.1 for these images as i have to zoom in to see structures and at 0.5 width the lines are quite wide and blocky and obscure the structures i'm looking at.

Any ideas why this is happening?

Thanks,

Matt


--
Matt Pearson
Microscopy Facility
MRC Human Genetics Unit
Institute of Genetics and Molecular Medicine (IGMM)
University of Edinburgh
Crewe Road
EH4 2XU




On 2 Nov 2016, at 09:57, Herbie <[hidden email]<mailto:[hidden email]>> wrote:

Good day Matt,

I think overlays are made for this.

If you have your ROIs in the ROI-manager, you may use
Image > Overlay > From ROI Manager

I you save the image as .tif, the overlay is saved with it.

You may show or hide the overlay but you may also make it permanent by flattening it.

HTH

Herbie

:::::::::::::::::::::::::::::::::::::::::::::
Am 02.11.16 um 10:33 schrieb PEARSON Matthew:
Hi all,

I'm having some issues making selections permanent on images.  The
idea is that the macro makes various selections, then at the end an
image should be produced that has those selections "flattened" on.
This image is purely to show the user where the selections are and
what has been measured, it doesn't have to be the raw image its
merely representative.

I have tried using the run("Draw") option but the lines are quite
thick & blocky and don't seem to be able to make them thinner.  I
have also tried roiManager("deselect") which is equivalent to
selecting all ROI's in the manager then using run("Flatten"); i get a
flattened image but the ROI's are not present on it.  This is what i
tried:

roiManager("show all without labels"); roiManager("deselect");
run("From ROI Manager"); run("Flatten");

Is there an alternative?  It would be nice if you could simply show
all ROI's and then if there was a function to create an image as it
is currently displayed-like a screenshot.  I assumed this is what
run("Flatten") does?

Thanks for the help,

Matt


-- Matt Pearson Microscopy Facility MRC Human Genetics Unit Institute
of Genetics and Molecular Medicine (IGMM) University of Edinburgh
Crewe Road EH4 2XU





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



The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

-- 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