Subject: Trying to rename Results table "Measurements" to new column.
I am trying to make a series of repeated square ROI measurements of the std deviation on a series of stack images of many slices. I have gotten this code to work, but the problem is each series of StdDev measurements is appended on top of each others in a single column in the Results table in ImageJ. By the end I have THOUSANDS of rows of a single column "StdDev". I have devised a copy column kluge around this that works but is computationally slow...it deletes the rows at the end...but there must be a better way. ==>I wonder if there is a better way to create stack column names...like directing the output of "Measure" to an array, rather than always to the "StdDev" column in the Results table. I cannot rename/redirect/cut "StdDev" in "Results"? getSelectionBounds(x, y, width, height);// get x, y of selected square and widths run("Clear Results"); Stack.getDimensions(dummy, dummy, dummy, Numslices, dummy); //Get # of slices run("Set Measurements...", " standard redirect=None decimal=3");// choose std dev output setOption("ShowRowNumbers", true);// Row numbers in results table for (j=1; j<=Numslices; j++){ //selects stack slice number Stack.setSlice(j); run("Measure");// place sd in column? updateResults(); //updates the Results window } |
Ethan,
You might want to try Microarray Profile. It gives different results for several ROIs and can now handle square ROIs. Bob Robert P. Dougherty President OptiNav, Inc. 1414 127th Pl NE #106 Bellevue, WA 98005 (425) 891-4883 FAX (425) 467-1119 [hidden email] www.optinav. com On Apr 22, 2012, at 11:35 AM, "Cohen, Ethan D" <[hidden email]> wrote: > Subject: Trying to rename Results table "Measurements" to new column. > > > I am trying to make a series of repeated square ROI measurements of the std deviation on a series of stack images of many slices. > > I have gotten this code to work, but the problem is each series of StdDev measurements is appended on top of each others in a single column in the Results table in ImageJ. By the end I have THOUSANDS of rows of a single column "StdDev". > > I have devised a copy column kluge around this that works but is computationally slow...it deletes the rows at the end...but there must be a better way. > > ==>I wonder if there is a better way to create stack column names...like directing the output of "Measure" to an array, rather than always to the "StdDev" column in the Results table. I cannot rename/redirect/cut "StdDev" in "Results"? > > > getSelectionBounds(x, y, width, height);// get x, y of selected square and widths > > run("Clear Results"); > Stack.getDimensions(dummy, dummy, dummy, Numslices, dummy); //Get # of slices > > run("Set Measurements...", " standard redirect=None decimal=3");// choose std dev output > setOption("ShowRowNumbers", true);// Row numbers in results table > > for (j=1; j<=Numslices; j++){ //selects stack slice number > Stack.setSlice(j); > run("Measure");// place sd in column? > updateResults(); //updates the Results window > } |
In reply to this post by Ethan Cohen
Wayne:
Nope. run("Set Measurements...", " standard stack redirect=None decimal=3");//choose std dev output 1. Adding stack to SetMeasurements just gives me another single column of the Stack number (in addition to StdDev), 2. I do not have the "StdDev" measurements separated into different columns labeled "Stack#" by stack slice #. I need someway to either rename this column,or cut and copy data. ...as I said I have a kluge solution using getResult, and setResult to transfer the variable in StdDev...but I cannot avoid the long rows. Ethan >Ethan Cohen, Ph.D. >FDA Center for Devices and Radiological Health >Office: Rm 1204 WO62 >White Oak Federal Res Ctr. >10903 New Hampshire Ave. >Silver Spring, MD 20993 > >Office: 301-796-2485 >Lab:301-796-2762 >Fax: 301-796-9927 "THIS MESSAGE FROM ETHAN COHEN IS INTENDED ONLY FOR THE USE OF THE PARTY TO WHOM IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL, AND PROTECTED FROM DISCLOSURE UNDER LAW. If you are not the addressee, or a person authorized to deliver the document to the addressee, you are hereby notified that any review, disclosure, dissemination, copying, or other action based on the content of this communication is not authorized. If you have received this document in error, please immediately notify the sender immediately by e-mail or phone." -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Cohen, Ethan D Sent: Sunday, April 22, 2012 2:36 PM To: [hidden email] Subject: FW: Trying to rename Results table "Measurements" to a new column. Subject: Trying to rename Results table "Measurements" to new column. I am trying to make a series of repeated square ROI measurements of the std deviation on a series of stack images of many slices. I have gotten this code to work, but the problem is each series of StdDev measurements is appended on top of each others in a single column in the Results table in ImageJ. By the end I have THOUSANDS of rows of a single column "StdDev". I have devised a copy column kluge around this that works but is computationally slow...it deletes the rows at the end...but there must be a better way. ==>I wonder if there is a better way to create stack column names...like directing the output of "Measure" to an array, rather than always to the "StdDev" column in the Results table. I cannot rename/redirect/cut "StdDev" in "Results"? getSelectionBounds(x, y, width, height);// get x, y of selected square and widths run("Clear Results"); Stack.getDimensions(dummy, dummy, dummy, Numslices, dummy); //Get # of slices run("Set Measurements...", " standard redirect=None decimal=3");// choose std dev output setOption("ShowRowNumbers", true);// Row numbers in results table for (j=1; j<=Numslices; j++){ //selects stack slice number Stack.setSlice(j); run("Measure");// place sd in column? updateResults(); //updates the Results window } |
In reply to this post by Ethan Cohen
Hi Ethan,
maybe the getStatistics macro call should do it? http://rsb.info.nih.gov/ij/developer/macro/functions.html#getStatistics Then you could store the results in an array and print it to the Results Table or a file in whatever form you like. Michael ________________________________________________________________ On Apr 22, 2012, at 20:35, Cohen, Ethan D wrote: > Subject: Trying to rename Results table "Measurements" to new column. > > > I am trying to make a series of repeated square ROI measurements of the std deviation on a series of stack images of many slices. > > I have gotten this code to work, but the problem is each series of StdDev measurements is appended on top of each others in a single column in the Results table in ImageJ. By the end I have THOUSANDS of rows of a single column "StdDev". > > I have devised a copy column kluge around this that works but is computationally slow...it deletes the rows at the end...but there must be a better way. > > ==>I wonder if there is a better way to create stack column names...like directing the output of "Measure" to an array, rather than always to the "StdDev" column in the Results table. I cannot rename/redirect/cut "StdDev" in "Results"? > > > getSelectionBounds(x, y, width, height);// get x, y of selected square and widths > > run("Clear Results"); > Stack.getDimensions(dummy, dummy, dummy, Numslices, dummy); //Get # of slices > > run("Set Measurements...", " standard redirect=None decimal=3");// choose std dev output > setOption("ShowRowNumbers", true);// Row numbers in results table > > for (j=1; j<=Numslices; j++){ //selects stack slice number > Stack.setSlice(j); > run("Measure");// place sd in column? > updateResults(); //updates the Results window > } |
Free forum by Nabble | Edit this page |