turboReg in batch mode

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

turboReg in batch mode

C.Oldfield
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");
Reply | Threaded
Open this post in threaded view
|

Re: turboReg in batch mode

Joel Sheffield
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
Reply | Threaded
Open this post in threaded view
|

Re: turboReg in batch mode

C.Oldfield
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.

Joel



Joel B. Sheffield, Ph.D
Department of Biology
Temple University
Philadelphia, PA 19122
Voice: <a href="tel:215%20204%208839" value="+12152048839" target="_blank">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



If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.x6.nabble.com/turboReg-in-batch-mode-tp5008351p5008361.html
To unsubscribe from turboReg in batch mode, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: turboReg in batch mode

rmd06
In macro , add the line :

setBatchMode(true);

when finished,

setBatchMode(false);


But I do not know how to made it in matlab Miji.