user adjustment of thresholding parameters in a macro?

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

user adjustment of thresholding parameters in a macro?

Bill Christens-Barry
Is it possible in a macro to allow the user to adjust the thresholding parameters before thresholding
takes place (say, by using the "Apply" button) and subsequent macro commands occur?

In my attempts, the macro acts on parameter values that have been previously set, with no pause to
allow user interaction with the thresholding panel. My look at the archives and online macro
language manual didn't make it clear to me whether this could be done.

Thanks.

Bill
Reply | Threaded
Open this post in threaded view
|

Re: user adjustment of thresholding parameters in a macro?

Gluender-3
Bill,

did you consider the macro routine:

waitForUser(string)
Halts the macro and displays string in a dialog box. The macro
proceeds when the user clicks "OK". Unlike showMessage, the dialog
box is not modal, so the user can, for example, create a selection or
adjust the threshold while the dialog is open. To display a
multi-line message, add newline characters ("\n") to string. This
function is based on Michael Schmid's Wait_For_User plugin. Example:
WaitForUserDemo.

Concerning questions related to macro coding, a look at the manual
"Built-in Macro Functions" at

<http://rsb.info.nih.gov/ij/developer/macro/functions.html>

is generally helpful.


>Is it possible in a macro to allow the user to adjust the
>thresholding parameters before thresholding
>takes place (say, by using the "Apply" button) and subsequent macro
>commands occur?
>
>In my attempts, the macro acts on parameter values that have been
>previously set, with no pause to
>allow user interaction with the thresholding panel. My look at the
>archives and online macro
>language manual didn't make it clear to me whether this could be done.
>
>Thanks.
>
>Bill

HTH
--

                   Herbie

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

Antwort: user adjustment of thresholding parameters in a macro?

Joachim Wesner
In reply to this post by Bill Christens-Barry
This is very easy, if I understand your problem correctly: When you first
recorded your sequence, it will also record all the settings you used and
record something like:

      run("<command>", "<args>")

Because of the <args>, the dialog will not show up and it will always use
the recorded parameters.

If however, you remove the <args>, i.e.

      run("<command>")

the dialog will show up again!

If you only want to update some special parameters, I think you would need
to set up your own dialog to ask for those and build a custon <args> string
to use for run(...


Mit freundlichen Grüßen / Best regards

Joachim Wesner




                                                                           
             Bill                                                          
             Christens-Barry                                              
             <equipoise1@VERIZ                                          An
             ON.NET>                    [hidden email]                
             Gesendet von:                                           Kopie
             ImageJ Interest                                              
             Group                                                   Thema
             <[hidden email].          user adjustment of thresholding    
             GOV>                       parameters in a macro?            
                                                                           
                                                                           
             08.09.2009 18:04                                              
                                                                           
                                                                           
              Bitte antworten                                              
                    an                                                    
              ImageJ Interest                                              
                   Group                                                  
             <[hidden email].                                            
                   GOV>                                                    
                                                                           
                                                                           




Is it possible in a macro to allow the user to adjust the thresholding
parameters before thresholding
takes place (say, by using the "Apply" button) and subsequent macro
commands occur?

In my attempts, the macro acts on parameter values that have been
previously set, with no pause to
allow user interaction with the thresholding panel. My look at the archives
and online macro
language manual didn't make it clear to me whether this could be done.

Thanks.

Bill



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: user adjustment of thresholding parameters in a macro?

Bill Christens-Barry
In reply to this post by Bill Christens-Barry
Herbie,

Thanks for cluing me to the waitForUser(string) macro command that does just what I need. I
hadn't known of its existence and had missed it in the manual.

Bill

On Tue, 8 Sep 2009 18:45:28 +0200, Gluender <[hidden email]> wrote:

>Bill,
>
>did you consider the macro routine:
>
>waitForUser(string)
>Halts the macro and displays string in a dialog box. The macro
>proceeds when the user clicks "OK". Unlike showMessage, the dialog
>box is not modal, so the user can, for example, create a selection or
>adjust the threshold while the dialog is open. To display a
>multi-line message, add newline characters ("\n") to string. This
>function is based on Michael Schmid's Wait_For_User plugin. Example:
>WaitForUserDemo.
>
>Concerning questions related to macro coding, a look at the manual
>"Built-in Macro Functions" at
>
><http://rsb.info.nih.gov/ij/developer/macro/functions.html>
>
>is generally helpful.
>
>
>>Is it possible in a macro to allow the user to adjust the
>>thresholding parameters before thresholding
>>takes place (say, by using the "Apply" button) and subsequent macro
>>commands occur?
>>
>>In my attempts, the macro acts on parameter values that have been
>>previously set, with no pause to
>>allow user interaction with the thresholding panel. My look at the
>>archives and online macro
>>language manual didn't make it clear to me whether this could be done.
>>
>>Thanks.
>>
>>Bill
>
>HTH
>--
>
>                   Herbie
>
>          ------------------------
>          <http://www.gluender.de>
>===========================================================
==============