Double-clicking TIFF opens ImageJ but not the image with Java 8

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

Double-clicking TIFF opens ImageJ but not the image with Java 8

vischer
Hello all,
when I double-click a tiff file in the MacOS Finder, ImageJ will be activated, i.e. the "Open With" setting is correct. However, that image is not opened. This always worked correctly when using Java 6.

version:
ImageJ 1.51h; Java 1.8.0_101 [64-bit]; Mac OS X 10.10.3; 12MB of 6222MB (<1%)


Can anyone confirm this behaviour?

Norbert

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

Re: Double-clicking TIFF opens ImageJ but not the image with Java 8

Rasband, Wayne (NIH/NIMH) [E]
> On Nov 10, 2016, at 6:59 PM, Norbert Vischer <[hidden email]> wrote:
>
> Hello all,
> when I double-click a tiff file in the MacOS Finder, ImageJ will be activated, i.e. the "Open With" setting is correct. However, that image is not opened. This always worked correctly when using Java 6.
>
> version:
> ImageJ 1.51h; Java 1.8.0_101 [64-bit]; Mac OS X 10.10.3; 12MB of 6222MB (<1%)
>
>
> Can anyone confirm this behaviour?

There is an upgraded distribution of ImageJ for OS X (bundled with Java 1.8.0_101) at

    https://imagej.nih.gov/ij/download.html

that should work better when using the "Open With” setting. The ImageJ.app bundle in the previous distribution did not have a CFBundleDocumentTypes key in the Info.plist file.

-wayne


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

Re: Double-clicking TIFF opens ImageJ but not the image with Java 8

vischer
Hi Wayne,
so far I didn't succeed. I downloaded the distribution from 11-Nov-2016. Still a ".tif" (or other) file does not open after double-clicking.
When I go to ImageJ.app>Show Package contents, I don't find a "CFBundleDocumentTypes" entry in the Info.plist file. The date of Info.plist is also 11-Nov-2016.


On the other hand, when using Fiji, double-clicking works.

Norbert



> On 11. Nov 2016, at 20:35, Rasband, Wayne (NIH/NIMH) [E] <[hidden email]> wrote:
>
>> On Nov 10, 2016, at 6:59 PM, Norbert Vischer <[hidden email]> wrote:
>>
>> Hello all,
>> when I double-click a tiff file in the MacOS Finder, ImageJ will be activated, i.e. the "Open With" setting is correct. However, that image is not opened. This always worked correctly when using Java 6.
>>
>> version:
>> ImageJ 1.51h; Java 1.8.0_101 [64-bit]; Mac OS X 10.10.3; 12MB of 6222MB (<1%)
>>
>>
>> Can anyone confirm this behaviour?
>
> There is an upgraded distribution of ImageJ for OS X (bundled with Java 1.8.0_101) at
>
>    https://imagej.nih.gov/ij/download.html
>
> that should work better when using the "Open With” setting. The ImageJ.app bundle in the previous distribution did not have a CFBundleDocumentTypes key in the Info.plist file.
>
> -wayne
>
>
--
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
|

Set options for Overlay Brush Tool in a macro

PEARSON Matthew
In reply to this post by Rasband, Wayne (NIH/NIMH) [E]
Hi all,

Could someone please remind me how i can set the options such as colour, size and transparency for the overlay brush tool within a macro.

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




On 11 Nov 2016, at 19:35, "Rasband, Wayne (NIH/NIMH) [E]" <[hidden email]<mailto:[hidden email]>> wrote:

On Nov 10, 2016, at 6:59 PM, Norbert Vischer <[hidden email]<mailto:[hidden email]>> wrote:

Hello all,
when I double-click a tiff file in the MacOS Finder, ImageJ will be activated, i.e. the "Open With" setting is correct. However, that image is not opened. This always worked correctly when using Java 6.

version:
ImageJ 1.51h; Java 1.8.0_101 [64-bit]; Mac OS X 10.10.3; 12MB of 6222MB (<1%)


Can anyone confirm this behaviour?

There is an upgraded distribution of ImageJ for OS X (bundled with Java 1.8.0_101) at

   https://imagej.nih.gov/ij/download.html

that should work better when using the "Open With” setting. The ImageJ.app bundle in the previous distribution did not have a CFBundleDocumentTypes key in the Info.plist file.

-wayne


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


--
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: Set options for Overlay Brush Tool in a macro

Herbie
Matt,

AFAIK the topic is "Overlay Functions" at

<https://imagej.nih.gov/ij/developer/macro/functions.html>

but I'm sure you've already consulted this webpage. In this case what
else do you need?

Best

Herbie

:::::::::::::::::::::::::::::::::::::::::::::
Am 06.12.16 um 11:57 schrieb PEARSON Matthew:

> Hi all,
>
> Could someone please remind me how i can set the options such as
> colour, size and transparency for the overlay brush tool within a
> macro.
>
> 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
>
>
>
>
> On 11 Nov 2016, at 19:35, "Rasband, Wayne (NIH/NIMH) [E]"
> <[hidden email]<mailto:[hidden email]>> wrote:
>
> On Nov 10, 2016, at 6:59 PM, Norbert Vischer
> <[hidden email]<mailto:[hidden email]>> wrote:
>
> Hello all, when I double-click a tiff file in the MacOS Finder,
> ImageJ will be activated, i.e. the "Open With" setting is correct.
> However, that image is not opened. This always worked correctly when
> using Java 6.
>
> version: ImageJ 1.51h; Java 1.8.0_101 [64-bit]; Mac OS X 10.10.3;
> 12MB of 6222MB (<1%)
>
>
> Can anyone confirm this behaviour?
>
> There is an upgraded distribution of ImageJ for OS X (bundled with
> Java 1.8.0_101) at
>
> https://imagej.nih.gov/ij/download.html
>
> that should work better when using the "Open With” setting. The
> ImageJ.app bundle in the previous distribution did not have a
> CFBundleDocumentTypes key in the Info.plist file.
>
> -wayne
>
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>
> -- 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: Set options for Overlay Brush Tool in a macro

Michael Schmid
In reply to this post by PEARSON Matthew
On 2016-12-06 11:57, PEARSON Matthew wrote:

> Could someone please remind me how i can set the options such as
> colour, size and transparency for the overlay brush tool within a
> macro.

Hi Matt,

the foreground and background colors used by the Overlay Brush Tool are
those of the color picker; you can set them with the macro calls
setForegroundColor and setBackgroundColor
 
https://imagej.nih.gov/ij/developer/macro/functions.html#setForegroundColor

The width is in the Preferences. In principle you could use
   oBrushWidth=5;
   call("ij.Prefs.set", "obrush.width", toString(oBrushWidth));

Unfortunately, this has an effect only if the Overlay Brush has not been
used in the current session yet. Otherwise it will effect the Overlay
brush width after ImageJ is closed and opened. I see nothing better.

Transparency: With the current ImageJ code, I see no way to set this
from a macro.

What you can also try is activating a given overlay and modifying it
after it has been drawn, see
   https://imagej.nih.gov/ij/developer/macro/functions.html#Overlay


[ As a side note, if it's a new topic, please don't reply to a previous
thread but write a new mail to [hidden email]. Otherwise the mail
threads will be messed up ]


hth,

Michael

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

Re: Set options for Overlay Brush Tool in a macro

PEARSON Matthew
Hi Michael and Herbie,

Thanks for the suggestions i will play with changing the overlay brush colours etc.

I now have a somewhat related query concerning overlays.  What i'm looking for is a tool that allows discrete spots to be selected on an image and really the overlay brush or standard paintbrush are ideal for me.  However,  these are not really tools for creating selections.  I have used the "selection brush" in the past but you have to hold the shift key to mark discrete areas and then it is still one selection until i split it.  I know i can use Image>Overlay>To ROI Manager to create selections from overlays but then when i try to threshold based on one of these selections it doesn't show the thresholded pixels on the image for some reason, also sometimes when i click on a selection made from an overlay it then doesn't show it on the image either but this seems intermittent.  Once i do "To ROI Manager" can the overlays be considered selections as standard selections would be?  I don't really understand the above behaviour however.

Again, related to this analysis i'd like to add different selections to a couple of open images and keep track of which image they were drawn on as they will be selecting different structures in each image and i need to analyse them.  I'd normally add all selections to the ROI Manager for processing but this doesn't work so well if you want to process more than one image with different selections, what would be the best way to go about this?  I could process one image after the other so that the ROI manger only contains selections from one of the images at any one time but this isn't ideal in my case.

Sorry michael for replying to another thread i forgot to compose a new mail.

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




On 6 Dec 2016, at 21:03, Michael Schmid <[hidden email]<mailto:[hidden email]>>
 wrote:

On 2016-12-06 11:57, PEARSON Matthew wrote:

Could someone please remind me how i can set the options such as
colour, size and transparency for the overlay brush tool within a
macro.

Hi Matt,

the foreground and background colors used by the Overlay Brush Tool are those of the color picker; you can set them with the macro calls setForegroundColor and setBackgroundColor
https://imagej.nih.gov/ij/developer/macro/functions.html#setForegroundColor

The width is in the Preferences. In principle you could use
 oBrushWidth=5;
 call("ij.Prefs.set", "obrush.width", toString(oBrushWidth));

Unfortunately, this has an effect only if the Overlay Brush has not been used in the current session yet. Otherwise it will effect the Overlay brush width after ImageJ is closed and opened. I see nothing better.

Transparency: With the current ImageJ code, I see no way to set this from a macro.

What you can also try is activating a given overlay and modifying it after it has been drawn, see
 https://imagej.nih.gov/ij/developer/macro/functions.html#Overlay


[ As a side note, if it's a new topic, please don't reply to a previous thread but write a new mail to [hidden email]. Otherwise the mail threads will be messed up ]


hth,

Michael

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


--
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: Set options for Overlay Brush Tool in a macro

Michael Schmid
Hi Matt,

concerning multiple selections in the ROI Manager:
You will see all of them if you enable the 'Show All' checkbox.
Nevertheless, the current selection will be just one ROI, or no ROI.
You need More>>Or (Combine) to select all ROIs of the ROIs at once, or
more specifically, make one combined ROI from them.

Concerning the workflow, having several selections for different images,
it depends a lot what you want to do.
If you can have a stack of your images, you can associate the ROIs with
stack slices, which can also affect the 'show all' (More>>Options).
For single images, having the (combined?) ROI as overlay and saving the
image as tiff or zip (which preserves overlays) might be helpful.

Michael
________________________________________________________________

On 2016-12-07 10:20, PEARSON Matthew wrote:

> Hi Michael and Herbie,
>
> Thanks for the suggestions i will play with changing the overlay
> brush colours etc.
>
> I now have a somewhat related query concerning overlays.  What i'm
> looking for is a tool that allows discrete spots to be selected on an
> image and really the overlay brush or standard paintbrush are ideal
> for me.  However,  these are not really tools for creating
> selections.  I have used the "selection brush" in the past but you
> have to hold the shift key to mark discrete areas and then it is
> still one selection until i split it.  I know i can use
> Image>Overlay>To ROI Manager to create selections from overlays but
> then when i try to threshold based on one of these selections it
> doesn't show the thresholded pixels on the image for some reason,
> also sometimes when i click on a selection made from an overlay it
> then doesn't show it on the image either but this seems intermittent.
> Once i do "To ROI Manager" can the overlays be considered selections
> as standard selections would be?  I don't really understand the above
> behaviour however.
>
> Again, related to this analysis i'd like to add different selections
> to a couple of open images and keep track of which image they were
> drawn on as they will be selecting different structures in each image
> and i need to analyse them.  I'd normally add all selections to the
> ROI Manager for processing but this doesn't work so well if you want
> to process more than one image with different selections, what would
> be the best way to go about this?  I could process one image after
> the other so that the ROI manger only contains selections from one of
> the images at any one time but this isn't ideal in my case.
>
> Sorry michael for replying to another thread i forgot to compose a
> new mail.
>
> 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
>
>
>
>
> On 6 Dec 2016, at 21:03, Michael Schmid
> <[hidden email]<mailto:[hidden email]>> wrote:
>
> On 2016-12-06 11:57, PEARSON Matthew wrote:
>
> Could someone please remind me how i can set the options such as
> colour, size and transparency for the overlay brush tool within a
> macro.
>
> Hi Matt,
>
> the foreground and background colors used by the Overlay Brush Tool
> are those of the color picker; you can set them with the macro calls
> setForegroundColor and setBackgroundColor
> https://imagej.nih.gov/ij/developer/macro/functions.html#setForegroundColor
>
>  The width is in the Preferences. In principle you could use
> oBrushWidth=5; call("ij.Prefs.set", "obrush.width",
> toString(oBrushWidth));
>
> Unfortunately, this has an effect only if the Overlay Brush has not
> been used in the current session yet. Otherwise it will effect the
> Overlay brush width after ImageJ is closed and opened. I see nothing
> better.
>
> Transparency: With the current ImageJ code, I see no way to set this
> from a macro.
>
> What you can also try is activating a given overlay and modifying it
> after it has been drawn, see
> https://imagej.nih.gov/ij/developer/macro/functions.html#Overlay
>
>
> [ As a side note, if it's a new topic, please don't reply to a
> previous thread but write a new mail to [hidden email].
> Otherwise the mail threads will be messed up ]
>
>
> hth,
>
> Michael
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>
> -- 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: Set options for Overlay Brush Tool in a macro

Krs5
According to a post from Wayne on Aug 6, 2013:

"Deselect" in the ROI Manager is the same as "select all" since all ROIs are processed if none are selected.

Best wishes

Kees


Dr Ir K.R. Straatman
Senior Experimental Officer
Advanced Imaging Facility
Centre for Core Biotechnology Services
University of Leicester
http://www2.le.ac.uk/colleges/medbiopsych/facilities-and-services/cbs/lite/aif


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Michael Schmid
Sent: 07 December 2016 09:35
To: [hidden email]
Subject: Re: Set options for Overlay Brush Tool in a macro

Hi Matt,

concerning multiple selections in the ROI Manager:
You will see all of them if you enable the 'Show All' checkbox.
Nevertheless, the current selection will be just one ROI, or no ROI.
You need More>>Or (Combine) to select all ROIs of the ROIs at once, or more specifically, make one combined ROI from them.

Concerning the workflow, having several selections for different images, it depends a lot what you want to do.
If you can have a stack of your images, you can associate the ROIs with stack slices, which can also affect the 'show all' (More>>Options).
For single images, having the (combined?) ROI as overlay and saving the image as tiff or zip (which preserves overlays) might be helpful.

Michael
________________________________________________________________

On 2016-12-07 10:20, PEARSON Matthew wrote:

> Hi Michael and Herbie,
>
> Thanks for the suggestions i will play with changing the overlay brush
> colours etc.
>
> I now have a somewhat related query concerning overlays.  What i'm
> looking for is a tool that allows discrete spots to be selected on an
> image and really the overlay brush or standard paintbrush are ideal
> for me.  However,  these are not really tools for creating selections.  
> I have used the "selection brush" in the past but you have to hold the
> shift key to mark discrete areas and then it is still one selection
> until i split it.  I know i can use
> Image>Overlay>To ROI Manager to create selections from overlays but
> then when i try to threshold based on one of these selections it
> doesn't show the thresholded pixels on the image for some reason, also
> sometimes when i click on a selection made from an overlay it then
> doesn't show it on the image either but this seems intermittent.
> Once i do "To ROI Manager" can the overlays be considered selections
> as standard selections would be?  I don't really understand the above
> behaviour however.
>
> Again, related to this analysis i'd like to add different selections
> to a couple of open images and keep track of which image they were
> drawn on as they will be selecting different structures in each image
> and i need to analyse them.  I'd normally add all selections to the
> ROI Manager for processing but this doesn't work so well if you want
> to process more than one image with different selections, what would
> be the best way to go about this?  I could process one image after the
> other so that the ROI manger only contains selections from one of the
> images at any one time but this isn't ideal in my case.
>
> Sorry michael for replying to another thread i forgot to compose a new
> mail.
>
> 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
>
>
>
>
> On 6 Dec 2016, at 21:03, Michael Schmid
> <[hidden email]<mailto:[hidden email]>> wrote:
>
> On 2016-12-06 11:57, PEARSON Matthew wrote:
>
> Could someone please remind me how i can set the options such as
> colour, size and transparency for the overlay brush tool within a
> macro.
>
> Hi Matt,
>
> the foreground and background colors used by the Overlay Brush Tool
> are those of the color picker; you can set them with the macro calls
> setForegroundColor and setBackgroundColor
> https://imagej.nih.gov/ij/developer/macro/functions.html#setForeground
> Color
>
>  The width is in the Preferences. In principle you could use
> oBrushWidth=5; call("ij.Prefs.set", "obrush.width",
> toString(oBrushWidth));
>
> Unfortunately, this has an effect only if the Overlay Brush has not
> been used in the current session yet. Otherwise it will effect the
> Overlay brush width after ImageJ is closed and opened. I see nothing
> better.
>
> Transparency: With the current ImageJ code, I see no way to set this
> from a macro.
>
> What you can also try is activating a given overlay and modifying it
> after it has been drawn, see
> https://imagej.nih.gov/ij/developer/macro/functions.html#Overlay
>
>
> [ As a side note, if it's a new topic, please don't reply to a
> previous thread but write a new mail to [hidden email].
> Otherwise the mail threads will be messed up ]
>
>
> hth,
>
> Michael
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>
> -- 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
Reply | Threaded
Open this post in threaded view
|

Re: Set options for Overlay Brush Tool in a macro

PEARSON Matthew
Hi Michael,

It might be easier i explain the analysis a little to see what options are available.  Say i have a 3 channel image as shown below and i have split the channels.  I add a wait for user so the user can mark different points on each image using the overlay brush.  I then need to analyse the pixels under each overlay spot separately, specifically the auto-thresholded pixels under each spot.  Once the interactive step is complete each channel image's different overlays would be analysed somehow.. I'd prefer not to put them in a stack if possible.

Thanks,

Matt


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




On 7 Dec 2016, at 10:17, "Straatman, Kees (Dr.)" <[hidden email]<mailto:[hidden email]>>
 wrote:

According to a post from Wayne on Aug 6, 2013:

"Deselect" in the ROI Manager is the same as "select all" since all ROIs are processed if none are selected.

Best wishes

Kees


Dr Ir K.R. Straatman
Senior Experimental Officer
Advanced Imaging Facility
Centre for Core Biotechnology Services
University of Leicester
http://www2.le.ac.uk/colleges/medbiopsych/facilities-and-services/cbs/lite/aif


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Michael Schmid
Sent: 07 December 2016 09:35
To: [hidden email]
Subject: Re: Set options for Overlay Brush Tool in a macro

Hi Matt,

concerning multiple selections in the ROI Manager:
You will see all of them if you enable the 'Show All' checkbox.
Nevertheless, the current selection will be just one ROI, or no ROI.
You need More>>Or (Combine) to select all ROIs of the ROIs at once, or more specifically, make one combined ROI from them.

Concerning the workflow, having several selections for different images, it depends a lot what you want to do.
If you can have a stack of your images, you can associate the ROIs with stack slices, which can also affect the 'show all' (More>>Options).
For single images, having the (combined?) ROI as overlay and saving the image as tiff or zip (which preserves overlays) might be helpful.

Michael
________________________________________________________________

On 2016-12-07 10:20, PEARSON Matthew wrote:
Hi Michael and Herbie,

Thanks for the suggestions i will play with changing the overlay brush
colours etc.

I now have a somewhat related query concerning overlays.  What i'm
looking for is a tool that allows discrete spots to be selected on an
image and really the overlay brush or standard paintbrush are ideal
for me.  However,  these are not really tools for creating selections.
I have used the "selection brush" in the past but you have to hold the
shift key to mark discrete areas and then it is still one selection
until i split it.  I know i can use
Image>Overlay>To ROI Manager to create selections from overlays but
then when i try to threshold based on one of these selections it
doesn't show the thresholded pixels on the image for some reason, also
sometimes when i click on a selection made from an overlay it then
doesn't show it on the image either but this seems intermittent.
Once i do "To ROI Manager" can the overlays be considered selections
as standard selections would be?  I don't really understand the above
behaviour however.

Again, related to this analysis i'd like to add different selections
to a couple of open images and keep track of which image they were
drawn on as they will be selecting different structures in each image
and i need to analyse them.  I'd normally add all selections to the
ROI Manager for processing but this doesn't work so well if you want
to process more than one image with different selections, what would
be the best way to go about this?  I could process one image after the
other so that the ROI manger only contains selections from one of the
images at any one time but this isn't ideal in my case.

Sorry michael for replying to another thread i forgot to compose a new
mail.

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




On 6 Dec 2016, at 21:03, Michael Schmid
<[hidden email]<mailto:[hidden email]>> wrote:

On 2016-12-06 11:57, PEARSON Matthew wrote:

Could someone please remind me how i can set the options such as
colour, size and transparency for the overlay brush tool within a
macro.

Hi Matt,

the foreground and background colors used by the Overlay Brush Tool
are those of the color picker; you can set them with the macro calls
setForegroundColor and setBackgroundColor
https://imagej.nih.gov/ij/developer/macro/functions.html#setForeground
Color

The width is in the Preferences. In principle you could use
oBrushWidth=5; call("ij.Prefs.set", "obrush.width",
toString(oBrushWidth));

Unfortunately, this has an effect only if the Overlay Brush has not
been used in the current session yet. Otherwise it will effect the
Overlay brush width after ImageJ is closed and opened. I see nothing
better.

Transparency: With the current ImageJ code, I see no way to set this
from a macro.

What you can also try is activating a given overlay and modifying it
after it has been drawn, see
https://imagej.nih.gov/ij/developer/macro/functions.html#Overlay


[ As a side note, if it's a new topic, please don't reply to a
previous thread but write a new mail to [hidden email].
Otherwise the mail threads will be messed up ]


hth,

Michael

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


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


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

Screen Shot 2016-12-07 at 10.24.43.png (221K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Set options for Overlay Brush Tool in a macro

Michael Schmid
In reply to this post by Krs5
On 2016-12-07 11:17, Straatman, Kees (Dr.) wrote:
 > According to a post from Wayne on Aug 6, 2013:
 >
 > "Deselect" in the ROI Manager is the same as "select all" since all
 > ROIs are processed if none are selected.


Hi Kees,

yes, I agree, concerning what is selected in the list of the ROI Manager.
This is different from what is selected in the image, however!

What is selected in the ROI Manager list determines which ROIs in the
list are used for ROI Manager commands, such as 'Delete', setting the
stroke color with 'Properties', the binary operations in More>>>, etc.

The selection in the image is independent of this. You can have one of
the ROIs in the ROI Manager selected, none of them, a very different
selection. The current selection in the image determines the scope of
most ImageJ commands on the image.


Michael
________________________________________________________________

On 2016-12-07 11:17, Straatman, Kees (Dr.) wrote:

> According to a post from Wayne on Aug 6, 2013:
>
> "Deselect" in the ROI Manager is the same as "select all" since all
> ROIs are processed if none are selected.
>
> Best wishes
>
> Kees
>
>
> Dr Ir K.R. Straatman Senior Experimental Officer Advanced Imaging
> Facility Centre for Core Biotechnology Services University of
> Leicester
> http://www2.le.ac.uk/colleges/medbiopsych/facilities-and-services/cbs/lite/aif
>
>
>
> -----Original Message----- From: ImageJ Interest Group
> [mailto:[hidden email]] On Behalf Of Michael Schmid Sent: 07
> December 2016 09:35 To: [hidden email] Subject: Re: Set options
> for Overlay Brush Tool in a macro
>
> Hi Matt,
>
> concerning multiple selections in the ROI Manager: You will see all
> of them if you enable the 'Show All' checkbox. Nevertheless, the
> current selection will be just one ROI, or no ROI. You need More>>Or
> (Combine) to select all ROIs of the ROIs at once, or more
> specifically, make one combined ROI from them.
>
> Concerning the workflow, having several selections for different
> images, it depends a lot what you want to do. If you can have a stack
> of your images, you can associate the ROIs with stack slices, which
> can also affect the 'show all' (More>>Options). For single images,
> having the (combined?) ROI as overlay and saving the image as tiff or
> zip (which preserves overlays) might be helpful.
>
> Michael
> ________________________________________________________________
>
> On 2016-12-07 10:20, PEARSON Matthew wrote:
>> Hi Michael and Herbie,
>>
>> Thanks for the suggestions i will play with changing the overlay
>> brush colours etc.
>>
>> I now have a somewhat related query concerning overlays.  What i'm
>>  looking for is a tool that allows discrete spots to be selected on
>> an image and really the overlay brush or standard paintbrush are
>> ideal for me.  However,  these are not really tools for creating
>> selections. I have used the "selection brush" in the past but you
>> have to hold the shift key to mark discrete areas and then it is
>> still one selection until i split it.  I know i can use
>> Image>Overlay>To ROI Manager to create selections from overlays
>> but then when i try to threshold based on one of these selections
>> it doesn't show the thresholded pixels on the image for some
>> reason, also sometimes when i click on a selection made from an
>> overlay it then doesn't show it on the image either but this seems
>> intermittent. Once i do "To ROI Manager" can the overlays be
>> considered selections as standard selections would be?  I don't
>> really understand the above behaviour however.
>>
>> Again, related to this analysis i'd like to add different
>> selections to a couple of open images and keep track of which image
>> they were drawn on as they will be selecting different structures
>> in each image and i need to analyse them.  I'd normally add all
>> selections to the ROI Manager for processing but this doesn't work
>> so well if you want to process more than one image with different
>> selections, what would be the best way to go about this?  I could
>> process one image after the other so that the ROI manger only
>> contains selections from one of the images at any one time but this
>> isn't ideal in my case.
>>
>> Sorry michael for replying to another thread i forgot to compose a
>> new mail.
>>
>> 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
>>
>>
>>
>>
>> On 6 Dec 2016, at 21:03, Michael Schmid
>> <[hidden email]<mailto:[hidden email]>> wrote:
>>
>> On 2016-12-06 11:57, PEARSON Matthew wrote:
>>
>> Could someone please remind me how i can set the options such as
>> colour, size and transparency for the overlay brush tool within a
>> macro.
>>
>> Hi Matt,
>>
>> the foreground and background colors used by the Overlay Brush Tool
>>  are those of the color picker; you can set them with the macro
>> calls setForegroundColor and setBackgroundColor
>> https://imagej.nih.gov/ij/developer/macro/functions.html#setForeground
>>
>>
Color

>>
>> The width is in the Preferences. In principle you could use
>> oBrushWidth=5; call("ij.Prefs.set", "obrush.width",
>> toString(oBrushWidth));
>>
>> Unfortunately, this has an effect only if the Overlay Brush has not
>>  been used in the current session yet. Otherwise it will effect the
>>  Overlay brush width after ImageJ is closed and opened. I see
>> nothing better.
>>
>> Transparency: With the current ImageJ code, I see no way to set
>> this from a macro.
>>
>> What you can also try is activating a given overlay and modifying
>> it after it has been drawn, see
>> https://imagej.nih.gov/ij/developer/macro/functions.html#Overlay
>>
>>
>> [ As a side note, if it's a new topic, please don't reply to a
>> previous thread but write a new mail to [hidden email].
>> Otherwise the mail threads will be messed up ]
>>
>>
>> hth,
>>
>> Michael
>>
>> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>>
>> -- 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
>

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