Extended Depth of Field (EDF) plugin with batch mode

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

Extended Depth of Field (EDF) plugin with batch mode

Jan Eglinger-5
Dear all,

I'm using the Extended Depth of Field (EDF) plugin (see
http://bigwww.epfl.ch/demo/edf/index.html for details).

Can someone tell me how to use this plugin in batch mode, i.e. without
the parameter window showing up? I'd like to use it in a macro.

Or otherwise, is there any alternative to this nice plugin?

Thanks,
jan

--
Jan Eglinger
PhD Student, Eckhard Lammert group
Max Planck Institute of Molecular Cell Biology and Genetics
Pfotenhauerstrasse 108
01307 Dresden
Germany
+49 351 210 2722
Reply | Threaded
Open this post in threaded view
|

Antwort: Extended Depth of Field (EDF) plugin with batch mode

Joachim Wesner
Hi,

if this plugin uses ImageJ GenericDialog for the parameter window it should
even work in macro, the macro (recorder) knows how to handle this!
It will remember what input was used and not show the window. Use it once
to see how the parameter syntax is if you need this functionality in your
own (non-recorder)macros.

However, in some earlier ImageJ version there was an issue with nonunique
"parameter names" that is now fixed already some time ago, so you might
need to upgrade.

Cheers

JW



                                                                           
             Jan Eglinger                                                  
             <eglinger@MPI-CBG                                            
             .DE>                                                       An
             Gesendet von:              [hidden email]                
             ImageJ Interest                                         Kopie
             Group                                                        
             <[hidden email].                                       Thema
             GOV>                       Extended Depth of Field (EDF)      
                                        plugin with batch mode            
                                                                           
             04.01.2007 14:41                                              
                                                                           
                                                                           
              Bitte antworten                                              
                    an                                                    
              ImageJ Interest                                              
                   Group                                                  
             <[hidden email].                                            
                   GOV>                                                    
                                                                           
                                                                           




Dear all,

I'm using the Extended Depth of Field (EDF) plugin (see
http://bigwww.epfl.ch/demo/edf/index.html for details).

Can someone tell me how to use this plugin in batch mode, i.e. without
the parameter window showing up? I'd like to use it in a macro.

Or otherwise, is there any alternative to this nice plugin?

Thanks,
jan

--
Jan Eglinger
PhD Student, Eckhard Lammert group
Max Planck Institute of Molecular Cell Biology and Genetics
Pfotenhauerstrasse 108
01307 Dresden
Germany
+49 351 210 2722



______________________________________________________________________
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: Antwort: Extended Depth of Field (EDF) plugin with batch mode

Pulceblue
I'm interested in doing the same, however, the macro recorder only outputs the string "Run("Easy mode...")" which does not let you to tune the parameters of the plugin for the projection.
Any idea as how to do that?
Reply | Threaded
Open this post in threaded view
|

Re: Antwort: Extended Depth of Field (EDF) plugin with batch mode

Aryeh Weiss
On 10/2/14, 10:16 PM, Pulceblue wrote:
> I'm interested in doing the same, however, the macro recorder only outputs
> the string "Run("Easy mode...")" which does not let you to tune the
> parameters of the plugin for the projection.
> Any idea as how to do that?
>
>
>
>

This is an  example of something that worked for me:

       run("Extended Depth of Field (Easy mode)...", "quality='0'
topology='0' show-topology='off' show-view='off'");

I think that I found it documented in the EDF documentation.

I needed a way to force the macro to wait for EDF to finish and return an image.

Here is the entire code segment that does this:

// the following block is executed if the Extended Depth of Focus plugin
is selected
if (matches(processingMethod, "EDF")) {
     run("Extended Depth of Field (Easy mode)...", "quality='0'
topology='0' show-topology='off' show-view='off'");
// The following code is required in order to wait for the the EDF
plugin to finish, and open the expected image.
// We must wait for a window called "Output" . Batch mode cannot be
true, because if so the window will not open.
     initTime = getTime();
     oldTime = initTime;
     while (!isOpen("Output")) {
         elapsedTime = getTime() - initTime;
         newTime = getTime() - oldTime;
// print something every 10 seconds so that we will know it is still alive
         if (newTime > 10000) {
             oldTime = getTime();
             newTime = 0;
             print(elapsedTime/1000, " seconds elapsed");
         }
     }
wait(1000); // let's really make sure that window is open -- give it
another second
selectImage("Output");
rename("edfImage");
edfTitle = getTitle();
}

--aryeh

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel
Ph: 972-3-5317638
FAX: 972-3-7384051

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

Re: Antwort: Extended Depth of Field (EDF) plugin with batch mode

Pulceblue
Thanks Aryeh! You put me on the right track.
The solution was very easy. I somehow overlooked the documentation.
Thanks a lot!
Claudio
Reply | Threaded
Open this post in threaded view
|

Re: Antwort: Extended Depth of Field (EDF) plugin with batch mode

Ulrike
Hi Claudio,

I am trying to do the same thing right now but using the code given above
just gives me the error "Unrecognized command: "Extended Depth of Field
(Easy mode)..." "

Any idea what I have to change?

Alternatively: For some reason I cannot find the documenation of the EDF
plugin. Can someone please let me know where to find it?

Thanks,
Ulrike



--
Sent from: http://imagej.1557.x6.nabble.com/

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

Re: Antwort: Extended Depth of Field (EDF) plugin with batch mode

CARL Philippe (LBP)
Servus Claudio,
I'm not sure whether I completely understand your question.
Nevertheless if it is how to use the Extended Depth of Field (EDF) within a macro or plugin, you can (for example) do it this way:
        IJ.run("Easy mode...", "quality='4' topology='0' show-topology='off' show-view='off'");
And the plugin website is the following:
        http://bigwww.epfl.ch/demo/edf/
My best regards,
Philippe

Philippe CARL
Laboratoire de Bioimagerie et Pathologies
UMR 7021 CNRS - Université de Strasbourg
Faculté de Pharmacie
74 route du Rhin
67401 ILLKIRCH
Tel : +33(0)3 68 85 42 89

----- Mail original -----
De: "Ulrike" <[hidden email]>
À: "imagej" <[hidden email]>
Envoyé: Jeudi 23 Juillet 2020 22:03:16
Objet: Re: Antwort: Extended Depth of Field (EDF) plugin with batch mode

Hi Claudio,

I am trying to do the same thing right now but using the code given above
just gives me the error "Unrecognized command: "Extended Depth of Field
(Easy mode)..." "

Any idea what I have to change?

Alternatively: For some reason I cannot find the documenation of the EDF
plugin. Can someone please let me know where to find it?

Thanks,
Ulrike



--
Sent from: http://imagej.1557.x6.nabble.com/

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

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