N. Vischer, 11-oct-2017 22:40 Stabilize macro Mark approximate center of a moving object in each frame, the program will calculate the exact centers by heavy smoothing and store them as fiducial points in the roimanager. Then the movie can be stabilized. Run the Demo: ============= - Load macro file "Stabilize_3.txt" or later - Load "UnstableObject.tif" channel 1 shows object on light background channel 2 shows fluorescence. We use channel 1 for stabilizing: - First initialize by choosing Plugins>Prepare[1]: this resets the roiManager and sets stack to channel 1, slice 1 Mark Points: ============ - make sure the "FP" macro tool is selected (Fiducial Point) - click on the center of the object without releasing the mouse a rectangle (100 x 100) becomes temproraily visible, which will be heavily smoothed. The found maximum location is regarded as fiducial point and sent to the roiManager - before releasing the mouse, you could move the cursor a bit to see the marked point, - release the mouse: stack advances to the next slice in channel 1, possibly you have to move the cursor a bit to see the new slice - repeat to click centers in remaining slices until the message "Last slice reached" appears - if you re-do marking in a frame, all markers in later frames will be deleted. Now all object centers are in the roi manager. You can click an entry in the roimanager to show the corresponding frame Perform Translation: ==================== - choose Plugins>Macros> Use RoiManager to Translate [2]: Stack will be stabilized (using slice#1 as reference). Finally, a rectangular roi is suggested for cropping - optionally, choose Image>Crop