简体   繁体   English

如何在 ImageJ/Fiji 中获得透明背景

[英]How can I get a transparent background in ImageJ/Fiji

I have a hexagonal image, stitched together from several single images, which is saved as a rectangle 8bit TIFF with black corners.我有一张六边形图像,由几张单张图像拼接而成,保存为带黑角的矩形 8 位 TIFF。 I want to set the black corners to transparent.我想将黑角设置为透明。 Because I want to stitch several hexagons together.因为我想把几个六边形拼接在一起。 I tried already the threshold function and set the black areas to NaN but after reopening the image the corners were still black.我已经尝试了阈值 function 并将黑色区域设置为 NaN 但在重新打开图像后,角落仍然是黑色的。 I also tried making a selection and clear outside which resulted in a white background.我还尝试进行选择并清除外部,从而产生白色背景。 I need to save it as a TIFF file again for further processing.我需要再次将其另存为 TIFF 文件以供进一步处理。 Does somebody has an idea how to solve that issue?有人知道如何解决这个问题吗?

8-bit images do not support transparency, only integer values from 0 to 255. 8 位图像不支持透明度,仅支持 0 到 255 之间的整数值。

If you want to use NaN, you must first convert to 32-bit float ( Image ▶︎ Type ▶︎ 32-bit ).如果要使用NaN,必须先转换成32位浮点数( Image▶︎Type▶︎32-bit )。 It is possible to save a 32-bit float image as TIFF—but note that many TIFF viewers (eg Preview on macOS) will not display it nicely.可以将 32 位浮点图像保存为 TIFF,但请注意,许多 TIFF 查看器(例如 macOS 上的预览)无法很好地显示它。

One way to set values to NaN is to use the Process ▶︎ Math ▶︎ Set... command, after making a selection.将值设置为 NaN 的一种方法是在进行选择后使用Process ▶︎ Math ▶︎ Set...命令。 Everything in the selection will become NaN.选择中的所有内容都将变为 NaN。

I think it is not possible because NaN or 0 as suggested By ctrueden gives a black background (does not delete it).我认为这是不可能的,因为 ctrueden 建议的 NaN 或 0 给出了黑色背景(不删除它)。 This require alpha channel to do so as it is the case in other software as GIMP (add alpha channel, select the background, delete. Hope this is useful !这需要 alpha 通道才能这样做,就像其他软件如 GIMP 中的情况一样(添加 alpha 通道,select 背景,删除。希望这有用!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Java ImageJ - 如何使图像透明? - Java ImageJ - how to make an image transparent? 如何在Blogger中透明化我博客元素的背景? - How can I make the background of elements of my blog transparent in Blogger? 如何使用Mono在GTK#TextView中设置透明背景? - How can I set a transparent background in a GTK# TextView using Mono? 如何绘制透明背景? - How to Draw a Transparent Background? 如何使图标内的背景透明而不是它周围的框? - How do I make the background inside an icon transparent but not the box around it? 在div中,如何使背景透明而不是轮廓透明? - In div, how do I make the background transparent, but not the outline? 我的单选按钮背景是透明的,如何使其不透明? - My radio button background is transparent, how do I make it opaque? 如何使用JavaScript创建透明按钮? - How can I create a transparent button with JavaScript? 如何使UIBarButtonItem图像透明? - How can I make UIBarButtonItem image transparent? 透明的背景imageview使它上面通常不透明的文本也透明。 我该如何解决? - The transparent background imageview makes the normally opaque text that comes on it also transparent. How do I fix this?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM