Created
March 13, 2017 14:03
-
-
Save whatalnk/75dc1cb25c4e1dfd4bee51951f84e0a7 to your computer and use it in GitHub Desktop.
ImageJ API TextRoi
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
from __future__ import with_statement, print_function | |
from ij import IJ | |
from ij.gui import Overlay, Line, TextRoi | |
import java.lang.Boolean as JBool | |
from java.awt import Font | |
imp = IJ.getImage() | |
selection = Line(1200, 2500, 2500, 2500) | |
textroi = TextRoi(selection.x1, selection.y1, "text", Font("Consolas", Font.PLAIN, 300)) | |
overlay = Overlay() | |
overlay.add(selection) | |
overlay.add(textroi) | |
imp.setOverlay(overlay) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment