Login  Register

Re: Rename ROIs lose Z position

Posted by Rasband, Wayne (NIH/NIMH) [E] on Mar 24, 2011; 9:05pm
URL: http://imagej.273.s1.nabble.com/Rename-ROIs-lose-Z-position-tp3685300p3685302.html

> Recently I attempted to use the Update command of the roiManager in a macro to add a z position to 2D circular ROI and was unsuccessful.  I then tried a work around by using "Specify" with the third dimension and it worked fine, though not ideal as it creates a new ROI.  The problem comes that I have a strict naming system of ROIs (using cell numbers or subcellular localization numbers to replace the z-y-x nomenclature).  When I rename an ROI, the XY values are saved, but Z is lost.
>
> Any suggestions how I can keep my naming system and still have the ROIs be slice specific?

These problems are fixed ImageJ in 1.45d. The ROI Manager "Update" command updates the Z position and a renamed ROI does not lose its Z position. The Roi class now has setPosition() and getPosition() methods for setting and retrieving the Z position. There is a JavaScript example at

   http://imagej.nih.gov/ij/macros/js/StackOverlay.js

and a macro example at

   http://imagej.nih.gov/ij/macros/examples/StackOverlay.txt

-wayne