Hexadecimal Code and image tools

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

Hexadecimal Code and image tools

P Roman
Hi all,

I am just starting using imageJ and do some macros. However I have some doubts about how to customize the ImageJ toolbar. I have read that in order to create a tool for a certain macro you have to know its hexadecimal code, like in this case:

macro "Adjust Brightness and Contrast Action Tool - C037D04D05D06D07D08D09D0aD0bD0cD14D18D1cD24D28D2cD34D38D3cD45D46D47D49D4aD4bD6bD6cD76D77D78D79D7aD84D85Da6Da7Da8Da9DaaDb5DbbDc4DccDd4DdcDe5DebDf6Dfa" {
        run("Brightness/Contrast...");
   }


Nevertheless, I am not sure about how I can create a tool icon for other types of functions in imageJ such as Make Binary or Watershed, or where can I find the hexadecimal code correspondent to a macro.

Any advice about how can I create tool icons would be great

Thanks in advace
Reply | Threaded
Open this post in threaded view
|

Re: Hexadecimal Code and image tools

Michael Schmid
Hi P,

the description of the code for the tool icons is here:
   https://imagej.nih.gov/ij/developer/macro/macros.html#icons

Best make a sketch on squared paper with 20x20 fields and mark the
positions in the margin (left to right and top to bottom). Use 'set base
location' if you want to go beyond 15 in any direction.

Michael
________________________________________________________________
On 14/03/2017 17:40, P Roman wrote:

> Hi all,
>
> I am just starting using imageJ and do some macros. However I have some
> doubts about how to customize the ImageJ toolbar. I have read that in order
> to create a tool for a certain macro you have to know its hexadecimal code,
> like in this case:
> /
> macro "Adjust Brightness and Contrast Action Tool -
> C037D04D05D06D07D08D09D0aD0bD0cD14D18D1cD24D28D2cD34D38D3cD45D46D47D49D4aD4bD6bD6cD76D77D78D79D7aD84D85Da6Da7Da8Da9DaaDb5DbbDc4DccDd4DdcDe5DebDf6Dfa"
> {
>         run("Brightness/Contrast...");
>    }/
>
> Nevertheless, I am not sure about how I can create a tool icon for other
> types of functions in imageJ such as Make Binary or Watershed, or where can
> I find the hexadecimal code correspondent to a macro.
>
> Any advice about how can I create tool icons would be great
>
> Thanks in advace

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

Re: Hexadecimal Code and image tools

ctrueden
Hi,

There is also a macro to help generate these code sequences, if you have a
16x16 input image:

https://imagej.net/macros/tools/Image_To_Tool_Icon.txt

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Tue, Mar 14, 2017 at 12:01 PM, Michael Schmid <[hidden email]>
wrote:

> Hi P,
>
> the description of the code for the tool icons is here:
>   https://imagej.nih.gov/ij/developer/macro/macros.html#icons
>
> Best make a sketch on squared paper with 20x20 fields and mark the
> positions in the margin (left to right and top to bottom). Use 'set base
> location' if you want to go beyond 15 in any direction.
>
> Michael
> ________________________________________________________________
> On 14/03/2017 17:40, P Roman wrote:
>
>> Hi all,
>>
>> I am just starting using imageJ and do some macros. However I have some
>> doubts about how to customize the ImageJ toolbar. I have read that in
>> order
>> to create a tool for a certain macro you have to know its hexadecimal
>> code,
>> like in this case:
>> /
>> macro "Adjust Brightness and Contrast Action Tool -
>> C037D04D05D06D07D08D09D0aD0bD0cD14D18D1cD24D28D2cD34D38D3cD4
>> 5D46D47D49D4aD4bD6bD6cD76D77D78D79D7aD84D85Da6Da7Da8Da9DaaDb
>> 5DbbDc4DccDd4DdcDe5DebDf6Dfa"
>> {
>>         run("Brightness/Contrast...");
>>    }/
>>
>> Nevertheless, I am not sure about how I can create a tool icon for other
>> types of functions in imageJ such as Make Binary or Watershed, or where
>> can
>> I find the hexadecimal code correspondent to a macro.
>>
>> Any advice about how can I create tool icons would be great
>>
>> Thanks in advace
>>
>
> --
> 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: Hexadecimal Code and image tools

P Roman
In reply to this post by Michael Schmid
Hi,
Thanks a lot for your answers, Curtis and Michael.
But i'm still doubtful, I have already seen this reference (https://imagej.nih.gov/ij/developer/macro/macros.html#icons) but it seems to me that these instructions are only valid for obtaining the hex codes for drawing tools. So I wonder, how could is include in my ImageJ toolbar the tool linked to a fuction such as Make binary? Is there anywhere in the imageJ documentation where I can find this kind of information?

Regards
Reply | Threaded
Open this post in threaded view
|

Re: Hexadecimal Code and image tools

Jerome Mutterer-3
Hi,
ImageJ (standard) tools are for interacting with the image. This means they
are triggered (run) when you click inside an image.
If you want a command to be run when you click on the tool button, you need
an "Action Tool" sort of tool.

macro "binary Action Tool - C000T0f18B" {
 run ("Make Binary");
}

install this, and the code will be run when you click the button.

Read https://imagej.nih.gov/ij/developer/macro/macros.html#tools for the
explanations about the different kinds of tools.

Sincerely,

Jerome.





2017-03-14 20:57 GMT+01:00 P Roman <[hidden email]>:

> Hi,
> Thanks a lot for your answers, Curtis and Michael.
> But i'm still doubtful, I have already seen this reference
> (https://imagej.nih.gov/ij/developer/macro/macros.html#icons) but it seems
> to me that these instructions are only valid for obtaining the hex codes
> for
> drawing tools. So I wonder, how could is include in my ImageJ toolbar the
> tool linked to a fuction such as Make binary? Is there anywhere in the
> imageJ documentation where I can find this kind of information?
>
> Regards
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.
> com/Hexadecimal-Code-and-image-tools-tp5018295p5018301.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex
www.ibmp.cnrs.fr

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

Re: Hexadecimal Code and image tools

P Roman
Hi Jerome,

Thank you very much for the information. But where did you find the binary action tool code (I mean "C000T0f18B")? That's what I want to know in order to install any command on the StarupMacros, so I can run any command that I wish just by clicking on its tool button.

Regards
Reply | Threaded
Open this post in threaded view
|

Re: Hexadecimal Code and image tools

Jerome Mutterer-3
Hi,
I think you're mixing up two different things here.
1- The C000T0f18B that is part of the macro name is the instructions set
for drawing the tool's icon and these instructions are described here:
https://imagej.nih.gov/ij/developer/macro/macros.html#icons as Michael
originally relied.
2- A separate thing is the code that is run when you use the tool by either
click on the tool for an Action Tool, or clicking in the image for a
standard Tool. This code is defined between the main set of curly braces in
the macro definition, just after the macro name. In the example I sent,
run("Make Binary"); is the code that is run and that calls the Make Binary
command.

Jerome.


2017-03-15 17:17 GMT+01:00 P Roman <[hidden email]>:

> Hi Jerome,
>
> Thank you very much for the information. But where did you find the binary
> action tool code (I mean "C000T0f18B")? That's what I want to know in order
> to install any command on the StarupMacros, so I can run any command that I
> wish just by clicking on its tool button.
>
> Regards
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.
> com/Hexadecimal-Code-and-image-tools-tp5018295p5018315.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex
www.ibmp.cnrs.fr

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

Re: Hexadecimal Code and image tools

P Roman
Oh, ok,  now I see it. I was completely mistaken and I thought that the hexadecimal code determined more than the icon tool appearance.
Thank you so much for your help!
Regards

El 16 mar. 2017 9:01, "Jerome Mutterer-3 [via ImageJ]" <[hidden email]> escribió:
Hi,
I think you're mixing up two different things here.
1- The C000T0f18B that is part of the macro name is the instructions set
for drawing the tool's icon and these instructions are described here:
https://imagej.nih.gov/ij/developer/macro/macros.html#icons as Michael
originally relied.
2- A separate thing is the code that is run when you use the tool by either
click on the tool for an Action Tool, or clicking in the image for a
standard Tool. This code is defined between the main set of curly braces in
the macro definition, just after the macro name. In the example I sent,
run("Make Binary"); is the code that is run and that calls the Make Binary
command.

Jerome.


2017-03-15 17:17 GMT+01:00 P Roman <[hidden email]>:

> Hi Jerome,
>
> Thank you very much for the information. But where did you find the binary
> action tool code (I mean "C000T0f18B")? That's what I want to know in order
> to install any command on the StarupMacros, so I can run any command that I
> wish just by clicking on its tool button.
>
> Regards
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.
> com/Hexadecimal-Code-and-image-tools-tp5018295p5018315.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>


--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex
www.ibmp.cnrs.fr

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



If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.x6.nabble.com/Hexadecimal-Code-and-image-tools-tp5018295p5018322.html
To unsubscribe from Hexadecimal Code and image tools, click here.
NAML