gpt4 book ai didi

java - 重新打开 ImagePlus 文件 (imageJ)

转载 作者:行者123 更新时间:2023-12-01 14:20:07 26 4
gpt4 key购买 nike

我想重新打开已使用 show() 调用的 ImagePlus 文件。

也就是说,我已经打电话了

imp.show() 

我关闭了包含图像的窗口,但现在我想在另一个窗口中重新打开 ImagePlus 文件(通过代码)。不幸的是,再次调用 imp.show() 不起作用。关于如何在新的 ImageJ 窗口中重新打开它有什么想法吗?

最佳答案

ImageJ mailing list 中进行搜索给你答案(迈克尔·施密德):

Closing an ImageWindow (ImageWindow.close) calls imp.flush(), which
deletes many class variables of the imp (essentially everything that
needs significant amounts of memory is set to null).

并提出了一个可能的解决方案:

If you don't have a stack, a solution would be keeping a reference to
the ImageProcessor in the imp and keep it instead of imp (also the
roi). If you have no stack, you could also try to clone the ImagePlus
to get a copy that can be displayed again - memory consumption for
cloning would be rather low ('shallow cloning').

关于java - 重新打开 ImagePlus 文件 (imageJ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17684453/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com