【问题标题】:Copy just the selected Area from an image without the other contents in the bounding rectangle?仅从图像中复制所选区域,而边界矩形中没有其他内容?
【发布时间】:2018-01-15 13:47:28
【问题描述】:

我在 java 中使用 ImageJ API。我从 Particle Analyzer 工具中获得了一系列 ROI。我需要将检测到的区域放入另一个图像(只是一个白色或透明的背景)。我该怎么做?

【问题讨论】:

    标签: java api crop imagej roi


    【解决方案1】:

    复制图像(仅复制当前 ROI 的边界框),然后清除 ROI 之外的区域。

    ImagePlus region = imp.duplicate();
    region.show();
    region.restoreRoi();
    IJ.setBackgroundColor(255, 255, 255);
    IJ.run("Clear Outside", "");
    

    您可以使用设置为 Java 模式的Macro Recorder 来获取许多这些命令。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-31
      相关资源
      最近更新 更多