Hi everyone,
I am writing a macro using turboReg to regsiter every frame of a time series to the average image of that series. Can I call turboReg on the whole batch of images from the time series, or do I have to run turboReg on every single frame? When I use the turboReg plugin from the GUI, there is a "batch" button which performs the operation I'm looking for, but I don't know how to code it into the macro. Thanks!! Claire This is my code so far: run("TurboReg ", "-align " // Register the two images that we have just prepared. + "-window " + sourceName + " "// Source (window reference). + "0 0 " + (width - 1) + " " + (height - 1) + " " // No cropping. + "-window " + targetName + " "// Target (file reference). + "0 0 " + (width - 1) + " " + (height - 1) + " " // No cropping. + "-affine " + (width / 2) + " " + (height / 2) + " " // Source translation landmark. + (width / 2) + " " + (height / 2) + " " // Target translation landmark. + "0 " + (height / 2) + " " // Source first rotation landmark. + "0 " + (height / 2) + " " // Target first rotation landmark. + (width - 1) + " " + (height / 2) + " " // Source second rotation landmark. + (width - 1) + " " + (height / 2) + " " // Target second rotation landmark. + "-showOutput"); |
There is a "StackReg" version of the plugin that should do what you want.
Joel Joel B. Sheffield, Ph.D Department of Biology Temple University Philadelphia, PA 19122 Voice: 215 204 8839 e-mail: [hidden email] URL: *http://tinyurl.com/khbouft <http://tinyurl.com/khbouft>* On Fri, Jun 20, 2014 at 2:25 PM, C.Oldfield <[hidden email]> wrote: > Hi everyone, > > I am writing a macro using turboReg to regsiter every frame of a time > series > to the average image of that series. Can I call turboReg on the whole batch > of images from the time series, or do I have to run turboReg on every > single > frame? > > When I use the turboReg plugin from the GUI, there is a "batch" button > which > performs the operation I'm looking for, but I don't know how to code it > into > the macro. > > Thanks!! > > Claire > > This is my code so far: > run("TurboReg ", > "-align " // Register the two images that we have just prepared. > + "-window " + sourceName + " "// Source (window reference). > + "0 0 " + (width - 1) + " " + (height - 1) + " " // No cropping. > + "-window " + targetName + " "// Target (file reference). > + "0 0 " + (width - 1) + " " + (height - 1) + " " // No cropping. > + "-affine " > + (width / 2) + " " + (height / 2) + " " // Source translation > landmark. > + (width / 2) + " " + (height / 2) + " " // Target translation > landmark. > + "0 " + (height / 2) + " " // Source first rotation landmark. > + "0 " + (height / 2) + " " // Target first rotation landmark. > + (width - 1) + " " + (height / 2) + " " // Source second rotation > landmark. > + (width - 1) + " " + (height / 2) + " " // Target second rotation > landmark. > + "-showOutput"); > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/turboReg-in-batch-mode-tp5008351.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Joel, I think stackReg uses the previous frame to align, whereas I need to align to a template using an affine transformation. My template is an average of the baseline image. I am trying to implement the same process as the imageJ > turboReg menu, when you click the "batch" button to run the registration on the whole time series. Any ideas?
Thanks!! On Sat, Jun 21, 2014 at 11:57 AM, JOEL B. SHEFFIELD [via ImageJ] <[hidden email]> wrote: There is a "StackReg" version of the plugin that should do what you want. |
Free forum by Nabble | Edit this page |