Hello ImageJ users,
I am using the bUnwarpJ plug in, and trying to incorporate into a macro the "Convert Transformation to Raw" option available in the plugin's "I/O menu". When selecting this button, the user is required to select a starting file containing the information of a previously accomplished transformation, and a destination location for the raw transformation data to be saved. The Recorder gives this output when doing this by hand, but it then doesn't work when run in a macro: run("bUnwarpJ", "load=Datapath_of_recorded_transformation.txt saving=location_of_saved_raw_transformation source_image=dummy2 target_image=dummy1 registration=Mono image_subsample_factor=0 initial_deformation=[Very Coarse] final_deformation=Fine divergence_weight=0 curl_weight=0 landmark_weight=0 image_weight=1 consistency_weight=10 stop_threshold=0.01"); Where the "loading" and "saving" fields in the first line indicate what I'm interested in, and all the rest is just the details of the plugin acting on some dummy images I had to create in order to be able to open the Plugin in the first place. So just to recap and finish: I am interested in recovering the raw information (it's a matrix) of an image transformation that I have already saved from a previous run of bUnwarpJ. I want to incorporate this procedure in a macro, but the suggestion of the recorder does not work (i.e. the part regarding the raw transformation is IGNORED and the plugin just runs as usual on my dummy images). Anybody has any suggestions about this? Thanks a bunch, Leo -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Leo,
I don't know why the recorder registers that command. What you need to use is the macro call method: call("bunwarpj.bUnwarpJ_.convertToRawTransformationMacro", "targe-image.png", "source-image.png", "input-elastic-transf.txt", "output-raw-transf.txtf"); I hope it helps! ignacio On Tue, Apr 16, 2013 at 11:01 AM, Rossetti, Leone <[hidden email]>wrote: > Hello ImageJ users, > > I am using the bUnwarpJ plug in, and trying to incorporate into a macro > the "Convert Transformation to Raw" option available in the plugin's "I/O > menu". When selecting this button, the user is required to select a > starting file containing the information of a previously accomplished > transformation, and a destination location for the raw transformation data > to be saved. > The Recorder gives this output when doing this by hand, but it then > doesn't work when run in a macro: > > run("bUnwarpJ", "load=Datapath_of_recorded_transformation.txt > saving=location_of_saved_raw_transformation source_image=dummy2 > target_image=dummy1 registration=Mono image_subsample_factor=0 > initial_deformation=[Very Coarse] final_deformation=Fine > divergence_weight=0 curl_weight=0 landmark_weight=0 image_weight=1 > consistency_weight=10 stop_threshold=0.01"); > > Where the "loading" and "saving" fields in the first line indicate what > I'm interested in, and all the rest is just the details of the plugin > acting on some dummy images I had to create in order to be able to open the > Plugin in the first place. > So just to recap and finish: I am interested in recovering the raw > information (it's a matrix) of an image transformation that I have already > saved from a previous run of bUnwarpJ. I want to incorporate this procedure > in a macro, but the suggestion of the recorder does not work (i.e. the part > regarding the raw transformation is IGNORED and the plugin just runs as > usual on my dummy images). > Anybody has any suggestions about this? > > Thanks a bunch, > Leo > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- Ignacio Arganda-Carreras, Ph.D. Seung's lab, 46-5065 Department of Brain and Cognitive Sciences Massachusetts Institute of Technology 43 Vassar St. Cambridge, MA 02139 USA Phone: (001) 617-324-3747 Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Ignacio,
thanks for the solution; it works perfectly. I just have a further (perhaps boring) question: why do I have to specify the names of the source and target images when extracting the raw transformation via the macro call method? If I do it "manually" from the I/O menu I can just select the saved transformation file without specifying the images, right? Cheers, and thanks again Leo -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Ignacio Arganda-Carreras Sent: 17 April 2013 06:45 To: [hidden email] Subject: Re: bUnwarpJ in a macro Dear Leo, I don't know why the recorder registers that command. What you need to use is the macro call method: call("bunwarpj.bUnwarpJ_.convertToRawTransformationMacro", "targe-image.png", "source-image.png", "input-elastic-transf.txt", "output-raw-transf.txtf"); I hope it helps! ignacio On Tue, Apr 16, 2013 at 11:01 AM, Rossetti, Leone <[hidden email]>wrote: > Hello ImageJ users, > > I am using the bUnwarpJ plug in, and trying to incorporate into a > macro the "Convert Transformation to Raw" option available in the > plugin's "I/O menu". When selecting this button, the user is required > to select a starting file containing the information of a previously > accomplished transformation, and a destination location for the raw > transformation data to be saved. > The Recorder gives this output when doing this by hand, but it then > doesn't work when run in a macro: > > run("bUnwarpJ", "load=Datapath_of_recorded_transformation.txt > saving=location_of_saved_raw_transformation source_image=dummy2 > target_image=dummy1 registration=Mono image_subsample_factor=0 > initial_deformation=[Very Coarse] final_deformation=Fine > divergence_weight=0 curl_weight=0 landmark_weight=0 image_weight=1 > consistency_weight=10 stop_threshold=0.01"); > > Where the "loading" and "saving" fields in the first line indicate > what I'm interested in, and all the rest is just the details of the > plugin acting on some dummy images I had to create in order to be able > to open the Plugin in the first place. > So just to recap and finish: I am interested in recovering the raw > information (it's a matrix) of an image transformation that I have > already saved from a previous run of bUnwarpJ. I want to incorporate > this procedure in a macro, but the suggestion of the recorder does not > work (i.e. the part regarding the raw transformation is IGNORED and > the plugin just runs as usual on my dummy images). > Anybody has any suggestions about this? > > Thanks a bunch, > Leo > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- Ignacio Arganda-Carreras, Ph.D. Seung's lab, 46-5065 Department of Brain and Cognitive Sciences Massachusetts Institute of Technology 43 Vassar St. Cambridge, MA 02139 USA Phone: (001) 617-324-3747 Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Leo,
I see your point, but the way it is implemented, the method call wouldn't know about the source and target images unless you pass them as parameters. I should totally re-write that part of the code... ignacio On Wed, Apr 17, 2013 at 12:40 PM, Rossetti, Leone <[hidden email]>wrote: > Dear Ignacio, > thanks for the solution; it works perfectly. > I just have a further (perhaps boring) question: why do I have to specify > the names of the source and target images when extracting the raw > transformation via the macro call method? If I do it "manually" from the > I/O menu I can just select the saved transformation file without specifying > the images, right? > > Cheers, and thanks again > Leo > > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of > Ignacio Arganda-Carreras > Sent: 17 April 2013 06:45 > To: [hidden email] > Subject: Re: bUnwarpJ in a macro > > Dear Leo, > > I don't know why the recorder registers that command. What you need to use > is the macro call method: > > call("bunwarpj.bUnwarpJ_.convertToRawTransformationMacro", > "targe-image.png", "source-image.png", "input-elastic-transf.txt", > "output-raw-transf.txtf"); > > I hope it helps! > > ignacio > > On Tue, Apr 16, 2013 at 11:01 AM, Rossetti, Leone <[hidden email] > >wrote: > > > Hello ImageJ users, > > > > I am using the bUnwarpJ plug in, and trying to incorporate into a > > macro the "Convert Transformation to Raw" option available in the > > plugin's "I/O menu". When selecting this button, the user is required > > to select a starting file containing the information of a previously > > accomplished transformation, and a destination location for the raw > > transformation data to be saved. > > The Recorder gives this output when doing this by hand, but it then > > doesn't work when run in a macro: > > > > run("bUnwarpJ", "load=Datapath_of_recorded_transformation.txt > > saving=location_of_saved_raw_transformation source_image=dummy2 > > target_image=dummy1 registration=Mono image_subsample_factor=0 > > initial_deformation=[Very Coarse] final_deformation=Fine > > divergence_weight=0 curl_weight=0 landmark_weight=0 image_weight=1 > > consistency_weight=10 stop_threshold=0.01"); > > > > Where the "loading" and "saving" fields in the first line indicate > > what I'm interested in, and all the rest is just the details of the > > plugin acting on some dummy images I had to create in order to be able > > to open the Plugin in the first place. > > So just to recap and finish: I am interested in recovering the raw > > information (it's a matrix) of an image transformation that I have > > already saved from a previous run of bUnwarpJ. I want to incorporate > > this procedure in a macro, but the suggestion of the recorder does not > > work (i.e. the part regarding the raw transformation is IGNORED and > > the plugin just runs as usual on my dummy images). > > Anybody has any suggestions about this? > > > > Thanks a bunch, > > Leo > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > -- > Ignacio Arganda-Carreras, Ph.D. > Seung's lab, 46-5065 > Department of Brain and Cognitive Sciences Massachusetts Institute of > Technology > 43 Vassar St. > Cambridge, MA 02139 > USA > > Phone: (001) 617-324-3747 > Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- Ignacio Arganda-Carreras, Ph.D. Seung's lab, 46-5065 Department of Brain and Cognitive Sciences Massachusetts Institute of Technology 43 Vassar St. Cambridge, MA 02139 USA Phone: (001) 617-324-3747 Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |