Login  Register

Copy area measurement to clipboard

Posted by ben.s.carlson on Jul 30, 2014; 2:17pm
URL: http://imagej.273.s1.nabble.com/Copy-area-measurement-to-clipboard-tp5008971.html

Hello,

I'm running an area measurement from a macro. I can see the measurement in the results section, but the value does not seem to be copying correctly to the clipboard. Can anybody tell me what I'm doing wrong?

Here is a code snippet:

roiManager("Measure");

//copy measurement to the clipboard
//based on: http://imagej.1557.x6.nabble.com/Writing-to-clipboard-td3699632.html

String.resetBuffer //Resets (clears) the buffer.
String.copy(String.append(getResult("Area", 0))); //gets Area measurement for first row of results table and puts into the buffer and then onto the clipboard

Thank you!

Ben