使用BioFormat读/写重组
我需要使用tiff
格式的大型图像,因此我需要使用bigtiff
格式。我尝试使用BioFormats
(BioFormats_package.jar
)最后一个版本读取图像,
ImagePlus[] images = images = BF.openImagePlus(io) ;
然后使用:我想访问处理器images [0] .getProcessor ()
要修改/访问像素值,但是结果似乎不是经典的ImageJ处理器:byteprocessor
,colorprocessor
和shortprocessor
。我使用实例
测试了所有这些。
知道哪种类型的处理器
可能是什么?
还是如何访问像素值?
[编辑]我仍然不知道结果是哪种类型的ImageProcessor,但是我发现保存的像素是使用浮子编码的,因此32位。
这不是理想的选择,因为我使用整数编码保存了图像,因此当值大于2000万时,精确度会损失。
I need to I/O large images in TIFF
format, so I need to use the BigTIFF
format. I tried to use BioFormats
(bioformats_package.jar
) last version to read an image, using:
ImagePlus[] images = images = BF.openImagePlus(io) ;
Then, I wanted to access the Processor images[0].getProcessor()
to modify/access the pixel values, but the result appears to not be any of the classical ImageJ processor: ByteProcessor
, ColorProcessor
, FloatProcessor
, and ShortProcessor
. I tested ALL of them using instanceof
.
Any idea what type of Processor
it could be?
Or how I would access the pixel values?
[EDIT] I still don't know what type of ImageProcessor the result is, but I found out that the saved pixels are encoded using Float, so 32 bits.
This is not ideal as I saved an image using Integer encoding, so there is a loss of precision when values are bigger than 20 millions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 imagePlus , getProcessor()返回您可以执行
converttobytobytobytobyteprocessor()
以获取byteprocessor
,您在image> Image Processor
其他子类别上都有其他转换器。According to the JavaDocs on ImagePlus,
getProcessor()
returns an ImageProcessor on which you can perform aconvertToByteProcessor()
to get aByteProcessor
, you have other converters onImageProcessor
for other subclasses.