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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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