예제 #1
0
def green2():
    """
      Displays a duplicate of the active image.
    """
    green2 = IJ.getImage()
    green2 = green2.duplicate()
    ImageWindow.setNextLocation(int(IJ.getScreenSize().width * 1 / 3),
                                int(IJ.getScreenSize().height * 1 / 14))
    green2.show()
예제 #2
0
def subpixels(pixel):
    """ Math: subtraction
         duplicates and displayes current image.
        Performs puxel subtraction using Math.
     """
    green = IJ.getImage()
    green = green.duplicate()
    IJ.run(green, "Subtract...", "value=" + pixel)
    ImageWindow.setNextLocation(int(IJ.getScreenSize().width * 1 / 3),
                                int(IJ.getScreenSize().height * 1 / 14))
    green.show()
    bgTitle()
def showTup(temp_output):
    if not isinstance(temp_output, tuple):
        print "Output is not a tuple and therefore can not be displayed correctly"
        return False
    size = 300
    x = 50
    y = 300
    d = 50
    for el in temp_output:
        if isinstance(el, ImagePlus):
            print el.title
            iw = ImageWindow("")
            iw.setNextLocation(x, y)  # todo: how to also fix the size?
            el.show()
            # iw = ImageWindow(el)
            # iw.setLocationAndSize(x,y,size,size)
            x = x + size + d