Login  Register

Re: correction for constant drift of the center of mass within a stack

Posted by Cammer, Michael on Jun 24, 2011; 12:50pm
URL: http://imagej.273.s1.nabble.com/correction-for-constant-drift-of-the-center-of-mass-within-a-stack-tp3684139p3684142.html

This is a no frills method we've used.  But it only works if the drift is truly a constant speed and direction.  And it cuts off the edge of the images.

//=====================================================================================
//  This macro is not ready for general use because it requires entering numbers manually.
//  In its current state it moves the field a fixed amount per step and this amount is 1/22.
macro "Drift Compensation" {
  setPasteMode("Copy");
  for (i=0; i<nSlices; i++) {
    setSlice(i+1);
    makeRectangle(30, 24, 463, 466);
    run("Copy");
    makeRectangle(30+(i/22), 24, 463, 466); // put dx and dy in this step
    run("Paste");
  }  // for i
}  //  Drift Compensation

________________________________________________________
Michael Cammer, Assistant Research Scientist
Skirball Institute of Biomolecular Medicine
Lab: (212) 263-3208  Cell: (914) 309-3270



-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Denis Rouede
Sent: Thursday, June 23, 2011 8:31 AM
To: [hidden email]
Subject: correction for constant drift of the center of mass within a stack

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.
=================================