LUTs Tool, Changing the icons ?

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

LUTs Tool, Changing the icons ?

Gabriel Landini
Hi,
Following the previous LUTs thread, I wrote a little macro tool to load at
startup (the corresponding fragment is below) .
Pressing the new icon changes the LUT of the current greyscale image (cycles 4
LUTs).

Is this possible to change the picture in the button each time it is pressed?

Cheers,

Gabriel

//-------------------->8--------------------
var GLlut=0;

macro 'Look Up Tables
Tool-C900L222eCf00L323eCfa0L424eCff5L525eCde7L626eC7f0L727eCbfdL828eC7ffL929eC58fLa2aeC60fLb2beCd0dLc2ceCf8fLd2deCfcfLe2eeCfffLf2fe'{
         restorePreviousTool();
   }

  macro "Look Up Tables Tool Selected" {
    if (bitDepth()!=24){
      if (GLlut==0){
        run("Fire");
        GLlut++;
      }
      else if (GLlut==1){
        run("Spectrum");
        GLlut++;
      }
      else if (GLlut==2){
        run("Ice");
        GLlut++;
      }
      else if (GLlut==3){
        run("Grays");
        GLlut=0;
      }
     }
    restorePreviousTool();
  }

//-------------------->8--------------------
Reply | Threaded
Open this post in threaded view
|

Re: LUTs Tool, Changing the icons ?

Bo de Lange
Thanks Gabriel,


Once I'd changed the single ' to double " in the first macro, it worked.
I'm not too bothered about the icon remaining as it is flicking throught
the different LUTs, although it would be fancy to have them change with
the LUT. That  would of course require designing a new  toolbutton for
each LUT.

I've changed two things for myself:
-I've assigned a function key [F2] to cycle through the different LUTs
-I've replaced one of the LUTs with my own specific LUT (pointer to a
file in the plugins folder)

In the course of playing around with these LUTs I learned that the image
I use a lot to test things, Blobs, in fact has an inverted Grays LUT.
This caused me some headaches yesterday. Must be Wayne's idea to keep us
focused, ;-)

//-------------------->8--------------------
var GLlut=0;

macro "Look Up Tables
Tool-C900L222eCf00L323eCfa0L424eCff5L525eCde7L626eC7f0L727eCbfdL828eC7ffL929eC58fLa2aeC60fLb2beCd0dLc2ceCf8fLd2deCfcfLe2eeCfffLf2fe"{
         restorePreviousTool();
   }

  macro "Look Up Tables Tool Selected [F2]" {
    if (bitDepth()!=24){
      if (GLlut==0){
        run("Fire");
        GLlut++;
      }
      else if (GLlut==1){
        open("C:\\Program
Files\\ImageJ\\plugins\\Lookup_Tables\\Spect2-MCID.lut");
        GLlut++;
      }
      else if (GLlut==2){
        run("Ice");
        GLlut++;
      }
      else if (GLlut==3){
        run("Grays");
        GLlut=0;
      }
     }
    restorePreviousTool();
  }

//-------------------->8--------------------

Bo


Gabriel Landini wrote:

> Hi,
> Following the previous LUTs thread, I wrote a little macro tool to load at
> startup (the corresponding fragment is below) .
> Pressing the new icon changes the LUT of the current greyscale image (cycles 4
> LUTs).
>
> Is this possible to change the picture in the button each time it is pressed?
>
> Cheers,
>
> Gabriel
>
> //-------------------->8--------------------
> var GLlut=0;
>
> macro 'Look Up Tables
> Tool-C900L222eCf00L323eCfa0L424eCff5L525eCde7L626eC7f0L727eCbfdL828eC7ffL929eC58fLa2aeC60fLb2beCd0dLc2ceCf8fLd2deCfcfLe2eeCfffLf2fe'{
>          restorePreviousTool();
>    }
>
>   macro "Look Up Tables Tool Selected" {
>     if (bitDepth()!=24){
>       if (GLlut==0){
>         run("Fire");
>         GLlut++;
>       }
>       else if (GLlut==1){
>         run("Spectrum");
>         GLlut++;
>       }
>       else if (GLlut==2){
>         run("Ice");
>         GLlut++;
>       }
>       else if (GLlut==3){
>         run("Grays");
>         GLlut=0;
>       }
>      }
>     restorePreviousTool();
>   }
>
> //-------------------->8--------------------
>  


--
R.P.J. de Lange, PhD
Rudolf Magnus Institute of Neurosciences
P.O. box 80040
3508 TA Utrecht
The Netherlands

visiting address:
Stratenum, room 4.241
Universiteitsweg 100
3584 CG Utrecht

tel: +31-30-253 8924
        +31-30-253 8837 (lab)
fax: +31-30-253 9032
Reply | Threaded
Open this post in threaded view
|

Re: LUTs Tool, Changing the icons ?

Tony Collins-2
In reply to this post by Gabriel Landini
Nice one. One problem I have with buttons that cycle is that I tend to
whizz past the option I'd like.

Could you use the isKeyDown("shift") to cycle backwards?

Tony




Gabriel Landini wrote:

> Hi,
> Following the previous LUTs thread, I wrote a little macro tool to load at
> startup (the corresponding fragment is below) .
> Pressing the new icon changes the LUT of the current greyscale image (cycles 4
> LUTs).
>
> Is this possible to change the picture in the button each time it is pressed?
>
> Cheers,
>
> Gabriel
>
> //-------------------->8--------------------
> var GLlut=0;
>
> macro 'Look Up Tables
> Tool-C900L222eCf00L323eCfa0L424eCff5L525eCde7L626eC7f0L727eCbfdL828eC7ffL929eC58fLa2aeC60fLb2beCd0dLc2ceCf8fLd2deCfcfLe2eeCfffLf2fe'{
>          restorePreviousTool();
>    }
>
>   macro "Look Up Tables Tool Selected" {
>     if (bitDepth()!=24){
>       if (GLlut==0){
>         run("Fire");
>         GLlut++;
>       }
>       else if (GLlut==1){
>         run("Spectrum");
>         GLlut++;
>       }
>       else if (GLlut==2){
>         run("Ice");
>         GLlut++;
>       }
>       else if (GLlut==3){
>         run("Grays");
>         GLlut=0;
>       }
>      }
>     restorePreviousTool();
>   }
>
> //-------------------->8--------------------

--
Tony Collins, Ph.D.
http://www.uhnresearch.ca/wcif               
tel. (416) 603 5367
                                       
*New Address from May 1st 2006*
McMaster Biophotonics Imaging Facility
Department of Biochemistry and Biomedical Sciences
McMaster University, 1200 Main Street West,
Hamilton, ON, L8N 3Z5
Reply | Threaded
Open this post in threaded view
|

Re: LUTs Tool, Changing the icons ?

Gabriel Landini
On Thursday 30 March 2006 15:38, Tony Collins wrote:
> Could you use the isKeyDown("shift") to cycle backwards?

Yes, good idea. Below is the new version.

If anybody wants to add more LUTs, change the 3s in

   if (GLlut<0) GLlut=3;
   if (GLlut>3) GLlut=0;

for the number of LUTs-1.

Cheers,

Gabriel


 //-------------------->8--------------------
 var GLlut=0;

   macro "Look Up Tables
Tool-C900L222eCf00L323eCfa0L424eCff5L525eCde7L626eC7f0L727eCbfdL828eC7ffL929eC58fLa2aeC60fLb2beCd0dLc2ceCf8fLd2deCfcfLe2eeCfffLf2fe"{
      restorePreviousTool();
   }

  macro "Look Up Tables Tool Selected" {
    if (isKeyDown("shift"))
     GLlut-=1;
   else
     GLlut+=1;

   if (GLlut<0) GLlut=3;
   if (GLlut>3) GLlut=0;

    if (bitDepth()!=24){
      if (GLlut==1) run("Fire");
      else if (GLlut==2) run("Spectrum");
      else if (GLlut==3) run("Ice");
      else if (GLlut==0) run("Grays");
     }
    restorePreviousTool();
  }
 //-------------------->8--------------------
Reply | Threaded
Open this post in threaded view
|

Re: LUTs Tool, Changing the icons ?

Gabriel Landini
I discovered a bug in the macro. Here is an update.
Cheers,

G.

//---------------------->8------------------------
 var GLlut=0;
 macro "Look Up Tables Tool -
C900L222eCf00L323eCfa0L424eCff5L525eCce6L626eC7f0L727eCbfdL828eC6ddL929eC79fLa2aeC60fLb2beCd0dLc2ceCf8fLd2deCfcfLe2eeCfffLf2fe"{
   }
   
   macro "Look Up Tables Tool Options" {
         requires("1.34j");
         restorePreviousTool();
    }

   macro "Look Up Tables Tool Selected" {
    if (isKeyDown("shift"))
     GLlut-=1;
    else
     GLlut+=1;

    if (GLlut<0) GLlut=3;
    if (GLlut>3) GLlut=0;

    if (bitDepth()!=24){
      if (GLlut==1) run("Fire");
      else if (GLlut==2) run("Spectrum");
      else if (GLlut==3) run("Ice");
      else if (GLlut==0) run("Grays");
     }
   wait(20);
   restorePreviousTool();
  }

//---------------------->8------------------------
Reply | Threaded
Open this post in threaded view
|

Object-Image for ImageJ

simone codeluppi-2
Hi List!!!!
Does anybody know if there is a version of Object-Image that run on  
ImageJ in os X?
Thanks a lot
Simone


--------------------------------
Simone Codeluppi
Molecular Pathology PhD program, UCSD
Pasquale Lab
Burnham Institute for Medical Research
10901 N. Torrey Pines RD.
La Jolla, CA 92037
Tel. 1-858-646-3100 ext 3264
Cell. 1-858-3611337
email: [hidden email]
-------------------------------------

"Here and elsewhere we shall not obtain the best insight into things  
until we actually see them growing from the beginning..." Aristotele,  
Politica


This email message is for the sole use of the intended recipient(s)  
and may contain confidential and privileged information. Any  
unauthorized review, use, disclosure or distribution is prohibited.  
If you are not the intended recipient, please contact the sender by  
reply email and destroy all copies of the original message.
Reply | Threaded
Open this post in threaded view
|

Re: Object-Image for ImageJ

Wayne Rasband
> Does anybody know if there is a version of Object-Image that run on  
> ImageJ in os X?

  Norbert Vischer, the author of Object-Image, it giving a  
presentation titled "Non-destructive marking and integrated image  
analysis using ObjectJ" at the ImageJ conference in Luxembourg. The  
conference program is available online at

     http://imagejconf.tudor.lu/programme

-wayne