Copy area measurement to clipboard

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Copy area measurement to clipboard

ben.s.carlson
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