Skip to content

Instantly share code, notes, and snippets.

@ackman678
Created April 25, 2014 20:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ackman678/11302405 to your computer and use it in GitHub Desktop.
A macro to rename roi labels (remove filename prefix) in an ImageJ results table. Script from [stackoverflow hint](http://stackoverflow.com/questions/20800207/imagej-how-to-put-label-names-into-results-table-generated-by-roi-manager)
macro "Rename Labels in Results Table" {
for (i=0; i<nResults; i++) {
oldLabel = getResultLabel(i);
delimiter = indexOf(oldLabel, ":");
newLabel = substring(oldLabel, delimiter+1);
setResult("Label", i, newLabel);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment