Hello,
I'm trying to use TrakEM2 as a library for my application. The main goal is to develop a simple application which can be run from command line to stitch images. Right now I can run the stitching "almost" automatically with the code in Albert's tutorial: http://www.ini.uzh.ch/~acardona/howto.html#minitutorial (My code is slightly modified, as there is a problem with the default layer which seems to be missing) It works as I need, but it displays the parameters window and I can't manage to hide it. I just need to modify the "maximum image size" parameter, so I tried to use the mechanism that Albert shows at http://albert.rierol.net/imagej_programming_tutorials.html#How%20to%20automate%20an%20ImageJ%20dialog . It is: Thread task = AlignTask.alignPatchesTask(patches, fixedPatches); // Automatic aligning: Hide parameters window. task.setName("Run$alignPatchesTask"); Macro.setOptions(task, "max_size=2048"); It doesn't work either, and after diving into the code, the thing is that the thread showing that window is not the one returned by the main task (AlignTask.alignPatchesTask(...)), but the "run" method at SIFT_Align_LayerSet.java I there any way to parametrize this? or to get the "real" task to be hacked? Sincerely, Juanjo. ------------------------------------------------------------ Juanjo Vega ([hidden email]) Unidad de Biocomputación. Laboratorio B-13. Centro Nacional de Biotecnología. CNB-CSIC. C\ Darwin, 3. Campus de Cantoblanco. Universidad Autónoma de Madrid. 28049, Madrid, Spain. http://www.cnb.csic.es http://www.biocomp.cnb.csic.es +34 91 585 4510 "Las mejores almas son capaces de los mayores vicios como de las mayores virtudes, y aquellos que caminan despacio por el camino recto pueden llegar más lejos que los que corren pero se apartan de él." - Discurso del Método, René Descartes. |
2011/7/21 Juanjo Vega <[hidden email]>:
> Hello, > > I'm trying to use TrakEM2 as a library for my application. The main goal is to develop a simple application which can be run from command line to stitch images. > > Right now I can run the stitching "almost" automatically with the code in Albert's tutorial: http://www.ini.uzh.ch/~acardona/howto.html#minitutorial (My code is slightly modified, as there is a problem with the default layer which seems to be missing) > > It works as I need, but it displays the parameters window and I can't manage to hide it. I just need to modify the "maximum image size" parameter, so I tried to use the mechanism that Albert shows at http://albert.rierol.net/imagej_programming_tutorials.html#How%20to%20automate%20an%20ImageJ%20dialog . It is: > > Thread task = AlignTask.alignPatchesTask(patches, fixedPatches); > // Automatic aligning: Hide parameters window. > task.setName("Run$alignPatchesTask"); > Macro.setOptions(task, "max_size=2048"); > > It doesn't work either, and after diving into the code, the thing is that the thread showing that window is not the one returned by the main task (AlignTask.alignPatchesTask(...)), but the "run" method at SIFT_Align_LayerSet.java > > I there any way to parametrize this? or to get the "real" task to be hacked? Yes: see the mpicbg.trakem2.align package, which has all the high-level methods: http://pacific.mpi-cbg.de/javadoc/mpicbg/trakem2/align/ Albert -- http://albert.rierol.net http://www.ini.uzh.ch/~acardona/ |
Thanks Albert,
I copied the "alignPatches" method from AlingTask class into my code, so now I can remove the dialog and set params directly through arguments. I'm still dealing with Align.ParamOptimize, but the main issue is solved now. Thanks :) Sincerely, Juanjo Vega On Jul 21, 2011, at 12:00 PM, Albert Cardona wrote: > 2011/7/21 Juanjo Vega <[hidden email]>: >> Hello, >> >> I'm trying to use TrakEM2 as a library for my application. The main goal is to develop a simple application which can be run from command line to stitch images. >> >> Right now I can run the stitching "almost" automatically with the code in Albert's tutorial: http://www.ini.uzh.ch/~acardona/howto.html#minitutorial (My code is slightly modified, as there is a problem with the default layer which seems to be missing) >> >> It works as I need, but it displays the parameters window and I can't manage to hide it. I just need to modify the "maximum image size" parameter, so I tried to use the mechanism that Albert shows at http://albert.rierol.net/imagej_programming_tutorials.html#How%20to%20automate%20an%20ImageJ%20dialog . It is: >> >> Thread task = AlignTask.alignPatchesTask(patches, fixedPatches); >> // Automatic aligning: Hide parameters window. >> task.setName("Run$alignPatchesTask"); >> Macro.setOptions(task, "max_size=2048"); >> >> It doesn't work either, and after diving into the code, the thing is that the thread showing that window is not the one returned by the main task (AlignTask.alignPatchesTask(...)), but the "run" method at SIFT_Align_LayerSet.java >> >> I there any way to parametrize this? or to get the "real" task to be hacked? > > > > Yes: see the mpicbg.trakem2.align package, which has all the high-level methods: > > http://pacific.mpi-cbg.de/javadoc/mpicbg/trakem2/align/ > > Albert > > -- > http://albert.rierol.net > http://www.ini.uzh.ch/~acardona/ ------------------------------------------------------------ Juanjo Vega ([hidden email]) Unidad de Biocomputación. Laboratorio B-13. Centro Nacional de Biotecnología. CNB-CSIC. C\ Darwin, 3. Campus de Cantoblanco. Universidad Autónoma de Madrid. 28049, Madrid, Spain. http://www.cnb.csic.es http://www.biocomp.cnb.csic.es +34 91 585 4510 "Las mejores almas son capaces de los mayores vicios como de las mayores virtudes, y aquellos que caminan despacio por el camino recto pueden llegar más lejos que los que corren pero se apartan de él." - Discurso del Método, René Descartes. |
Free forum by Nabble | Edit this page |