使用Bioformats打开分块TIFF图像的RGB24格式显示异常求助
使用Bio-Formats打开分块RGB24图像时部分显示异常的问题
我正在使用Bio-Formats打开分块图像,部分RGB24格式的图像可正常显示,但其余图像显示异常。目前通过以下代码能正常显示8位或16位平面:
bytes = b.imRead.openBytes(b.Coords[coord.Z, coord.C, coord.Z], tilex, tiley, sx, sy); if (b.file.EndsWith("tif") || b.file.EndsWith("ndpi")) { byte[] rb = new byte[strplane * sy]; Bitmap[] bfs = new Bitmap[3]; for (int y = 0; y < sy; y++) { for (int x = 0; x < strplane; x++) { rb[((strplane) * y) + x] = bytes[((strplane) * y) + x]; } } Bitmap binf = null; if (b.bitsPerPixel == 8) { return new Bitmap(b.file, sx, sy, PixelFormat.Format8bppIndexed, rb, new ZCT(0, 0, 0), p, littleEndian); } else { return new Bitmap(b.file, sx, sy, PixelFormat.Format16bppGrayScale, rb, new ZCT(0, 0, 0), p, littleEndian); } return binf; } Bitmap bm = new Bitmap(b.file, sx, sy, PixelFormat, bytes, coord, p, littleEndian); bm.Stats = Statistics.FromBytes(bm); return bm;
已附上展示该图像3个RGB通道的截图,恳请各位提供技术帮助!
内容的提问来源于stack exchange,提问作者Microscopy
相关产品推荐
相关产品推荐

