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

标签 java imagej

我想重新打开已使用 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/

相关文章:

python-3.x - 在 python 中使用 imagej 时导入模块 jnius 出错

java - 如何将对象数组列表转换为 HashMap ,其中键和值是对象属性

java - 使用 CharAt() 检查多个字符

java - Checkstyle:如何解决 "Hidden Field"错误

java - 视频图像处理,我该怎么做?

delphi - DELPHI 和 Opencv 中的不兼容类型

java - 调用 .jar 文件在 php shell_exec linux 中不起作用,但在 cmd 和 windows 中有效

java - LinkedList addLast 函数替换列表中的其他值

java - Camel 使用 Simple DSL 将所有 CRLF 替换为 LF

javascript - 斐济无法识别内置宏功能