斐济和Jython:关闭或抑制插件对话框
我正在通过图像对进行循环,并在斐济的TurboReg插件中注册它们。我有一些Python的背景,所以我使用Jython 问题是当TurboReg完成时,会出现一个对话框,询问您是否要保存结果-我不想-我想继续循环。如何在不必手动关闭或抑制对话框的情况下关闭或抑制对话框 我试图简洁地重现这个问题,但我对Jython和Fiji还不熟悉,所以下面是我脚本中的一个片段,减去一些调用图像等的函数斐济和Jython:关闭或抑制插件对话框,jython,imagej,Jython,Imagej,我正在通过图像对进行循环,并在斐济的TurboReg插件中注册它们。我有一些Python的背景,所以我使用Jython 问题是当TurboReg完成时,会出现一个对话框,询问您是否要保存结果-我不想-我想继续循环。如何在不必手动关闭或抑制对话框的情况下关闭或抑制对话框 我试图简洁地重现这个问题,但我对Jython和Fiji还不熟悉,所以下面是我脚本中的一个片段,减去一些调用图像等的函数 from ij import IJ w = WindowManager # dictionary of
from ij import IJ
w = WindowManager
# dictionary of variables
d = {"t":target.path_to_image, "tCropRight":target.width-1, "tCropBottom":target.height-1, "s":source.path_to_image, "sCropRight":source.width-1, "sCropBottom":source.height-1}
# run TurboReg dialog
IJ.run("TurboReg ", "-align \
-file %(s)s 0 0 %(sCropRight)s %(sCropBottom)s \
-file %(t)s 0 0 %(tCropRight)s %(tCropBottom)s \
-bilinear \
1131 847 \
1595 1198 \
1131 4636 \
1595 6561 \
6188 847 \
8732 1198 \
6188 4636 \
8732 6561 \
-hideOutput" % d)
w.setCurrentWindow(w.getWindow("Output")) # select output window
IJ.run("Stack to Images") # stack to images
w.setCurrentWindow(w.getWindow("Data")) # select data window
IJ.run("16-bit") # convert to 16 bit
IJ.saveAs("Tiff", temp_nir) # save image
### CLOSE DIALOG BOXES! ###
我已经解决了我自己的问题!该对话框称为“结果”,因此: 这将关闭对话框,而不询问是否需要保存
from ij import IJ
w = WindowManager
win = w.getWindow("Results")
win.removeNotify()