Add & name macro don't work on 1.43q

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

Add & name macro don't work on 1.43q

alejo-4
Hi, I need to take several measures and the roi macro "add & name" was
extremely useful for me in past versions. Now in version 1.43q I had put
this macron in Startup.txt file, for startup load, but when pressing the
shortcut key (2) only add the selection, no rename. Any tip? I paste below
the code of my Startup.txt
Thanks in advance.





/ "RoiManagerMacros"
// This macro set provides several macros for
// using the ROI Manager. The ROI Manager
// is opened if it is not already open.
// Add these macros to StartupMacros.txt and they
// will be automatically installed when ImageJ starts up.

  macro "Add [1]" {
      roiManager("add");
  }

  macro "Add and Name [2]" {
      requires("1.35c")
 //     setKeyDown("alt");
      roiManager("add");
  }

  macro "Add and Draw [3]" {
      roiManager("Add & Draw");
  }

  macro "Add, Name and Draw [4]" {
      requires("1.35c")
      setKeyDown("alt shift");
      roiManager("add");
  }

  macro "Add and Advance [5]" {
      if (nSlices==1)
          exit("This macro requires a stack");
      roiManager("add");
      run("Next Slice [>]");
  }

  macro "Fill..." {
      n = roiManager("count");
      showMessageWithCancel("Fill...", "Fill all "+n+" selectons?");
      for (i=0; i<n; i++) {
         roiManager('select', i);
         // run("Clear Outside", "slice");
         run("Fill", "slice");
      }
  }

  macro "Open All" {
      dir = getDirectory("Choose a Directory ");
      list = getFileList(dir);
      for (i=0; i<list.length; i++) {
          if (endsWith(list[i], ".roi"))
              roiManager("open", dir+list[i]);
      }
  }
Reply | Threaded
Open this post in threaded view
|

Re: Add & name macro don't work on 1.43q

Rasband, Wayne (NIH/NIMH) [E]
On Feb 18, 2010, at 5:58 PM, Alejo C.S. wrote:

> Hi, I need to take several measures and the roi macro "add & name" was
> extremely useful for me in past versions. Now in version 1.43q I had put
> this macron in Startup.txt file, for startup load, but when pressing the
> shortcut key (2) only add the selection, no rename. Any tip? I paste
> below the code of my Startup.txt
> Thanks in advance.

This bug is fixed in the v1.43r6 daily build. The "Add and Name" macro should look like this:

 macro "Add and Name [2]" {
      setKeyDown("alt");
      roiManager("add");
  }

-wayne


> // "RoiManagerMacros"
> // This macro set provides several macros for
> // using the ROI Manager. The ROI Manager
> // is opened if it is not already open.
> // Add these macros to StartupMacros.txt and they
> // will be automatically installed when ImageJ starts up.
>
>  macro "Add [1]" {
>      roiManager("add");
>  }
>
>  macro "Add and Name [2]" {
>      requires("1.35c")
> //     setKeyDown("alt");
>      roiManager("add");
>  }
>
>  macro "Add and Draw [3]" {
>      roiManager("Add & Draw");
>  }
>
>  macro "Add, Name and Draw [4]" {
>      requires("1.35c")
>      setKeyDown("alt shift");
>      roiManager("add");
>  }
>
>  macro "Add and Advance [5]" {
>      if (nSlices==1)
>          exit("This macro requires a stack");
>      roiManager("add");
>      run("Next Slice [>]");
>  }
>
>  macro "Fill..." {
>      n = roiManager("count");
>      showMessageWithCancel("Fill...", "Fill all "+n+" selectons?");
>      for (i=0; i<n; i++) {
>         roiManager('select', i);
>         // run("Clear Outside", "slice");
>         run("Fill", "slice");
>      }
>  }
>
>  macro "Open All" {
>      dir = getDirectory("Choose a Directory ");
>      list = getFileList(dir);
>      for (i=0; i<list.length; i++) {
>          if (endsWith(list[i], ".roi"))
>              roiManager("open", dir+list[i]);
>      }
>  }
Reply | Threaded
Open this post in threaded view
|

Re: Add & name macro don't work on 1.43q

alejo-4
Hi, Is there a way to download the ij.jar file of the v1.43r6 daily build?
Thanks

Conar

2010/2/19 Rasband, Wayne (NIH/NIMH) [E] <[hidden email]>

> On Feb 18, 2010, at 5:58 PM, Alejo C.S. wrote:
>
> > Hi, I need to take several measures and the roi macro "add & name" was
> > extremely useful for me in past versions. Now in version 1.43q I had put
> > this macron in Startup.txt file, for startup load, but when pressing the
> > shortcut key (2) only add the selection, no rename. Any tip? I paste
> > below the code of my Startup.txt
> > Thanks in advance.
>
> This bug is fixed in the v1.43r6 daily build. The "Add and Name" macro
> should look like this:
>
>  macro "Add and Name [2]" {
>       setKeyDown("alt");
>      roiManager("add");
>  }
>
> -wayne
>
>
> > // "RoiManagerMacros"
> > // This macro set provides several macros for
> > // using the ROI Manager. The ROI Manager
> > // is opened if it is not already open.
> > // Add these macros to StartupMacros.txt and they
> > // will be automatically installed when ImageJ starts up.
> >
> >  macro "Add [1]" {
> >      roiManager("add");
> >  }
> >
> >  macro "Add and Name [2]" {
> >      requires("1.35c")
> > //     setKeyDown("alt");
> >      roiManager("add");
> >  }
> >
> >  macro "Add and Draw [3]" {
> >      roiManager("Add & Draw");
> >  }
> >
> >  macro "Add, Name and Draw [4]" {
> >      requires("1.35c")
> >      setKeyDown("alt shift");
> >      roiManager("add");
> >  }
> >
> >  macro "Add and Advance [5]" {
> >      if (nSlices==1)
> >          exit("This macro requires a stack");
> >      roiManager("add");
> >      run("Next Slice [>]");
> >  }
> >
> >  macro "Fill..." {
> >      n = roiManager("count");
> >      showMessageWithCancel("Fill...", "Fill all "+n+" selectons?");
> >      for (i=0; i<n; i++) {
> >         roiManager('select', i);
> >         // run("Clear Outside", "slice");
> >         run("Fill", "slice");
> >      }
> >  }
> >
> >  macro "Open All" {
> >      dir = getDirectory("Choose a Directory ");
> >      list = getFileList(dir);
> >      for (i=0; i<list.length; i++) {
> >          if (endsWith(list[i], ".roi"))
> >              roiManager("open", dir+list[i]);
> >      }
> >  }
>
Reply | Threaded
Open this post in threaded view
|

Re: Add & name macro don't work on 1.43q

Gluender-3
Conar,

you might want to read the ImageJ-manual.

Regarding the ImageJ Help-menu you will find:

"Update ImageJ...
Upgrades ImageJ to the latest ij.jar at rsb.info.nih.gov/ij/upgrade/,
or downgrades to one of the earlier versions at
rsb.info.nih.gov/ij/download/jars/. Select "daily build" from the
drop down menu and it will upgrade to the latest daily build at
rsb.info.nih.gov/ij/ij.jar."

>Hi, Is there a way to download the ij.jar file of the v1.43r6 daily build?
>Thanks
>
>Conar

HTH
--

                   Herbie

          ------------------------
          <http://www.gluender.de>
Reply | Threaded
Open this post in threaded view
|

Re: Add & name macro don't work on 1.43q

alejo-4
In reply to this post by alejo-4
Thanks, your're right, it was there.

Thanks again.

2010/2/20 Gluender <[hidden email]>

> Conar,
>
> you might want to read the ImageJ-manual.
>
> Regarding the ImageJ Help-menu you will find:
>
> "Update ImageJ...
> Upgrades ImageJ to the latest ij.jar at rsb.info.nih.gov/ij/upgrade/, or
> downgrades to one of the earlier versions at
> rsb.info.nih.gov/ij/download/jars/. Select "daily build" from the drop
> down menu and it will upgrade to the latest daily build at
> rsb.info.nih.gov/ij/ij.jar."
>
>
>  Hi, Is there a way to download the ij.jar file of the v1.43r6 daily build?
>> Thanks
>>
>> Conar
>>
>
> HTH
> --
>
>                  Herbie
>
>         ------------------------
>         <http://www.gluender.de>
>