Posted by
Cammer, Michael on
Jun 24, 2011; 1:04pm
URL: http://imagej.273.s1.nabble.com/correction-for-constant-drift-of-the-center-of-mass-within-a-stack-tp3684139p3684141.html
Please disregard my last message about the no frills macro. Jerome Mutterer's is much better and uses a command I overlooked, "Translate".
-Michael
-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of Jerome Mutterer
Sent: Thursday, June 23, 2011 4:00 PM
To:
[hidden email]
Subject: Re: correction for constant drift of the center of mass within a stack
Denis
If the drift is constant, measure the positions of centers of mass of a
reference object in the first and in the last image. This should give you
the total drift. Then, correct for i/(totaldrift) for each slice, using the
"Translate..." command in a loop.
Jerome.
////////
Dialog.create('stack drift');
Dialog.addNumber('xdrift',10);
Dialog.addNumber('ydrift',10);
Dialog.show();
dx=Dialog.getNumber();
dy=Dialog.getNumber();
for (i=0;i<nSlices;i++) {
setSlice(i+1);
x=dx*i/nSlices; y=dy*i/nSlices;
run("Translate...", "x=&x y=&y interpolation=Bilinear");
}
///////
On Thu, Jun 23, 2011 at 2:31 PM, Denis Rouede <
[hidden email]>
wrote:
>
> dear Sir , Mme
>
> I am working with a stack of images.
>
> Each image of the stack shows objects at different locations.
>
> Ideally, the center of mass of these objects is the same for each image of
the stack.
>
> I have noticed a constant drift of this center of mass and I would like to
correct all images from this drift.
>
>
> Turboreg reg does not work because the objects are different for each
image of the stack.
>
> thank you if someone can help
>
> denis
------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================