Matlab仅打开多页tiff堆栈的第一帧 [英] Matlab only opens first frame of multi-page tiff stack

查看:145
本文介绍了Matlab仅打开多页tiff堆栈的第一帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在ImageJ中创建了一个带有宏的多页tiff文件,现在我正尝试使用matlab打开它,但我只能访问第一帧.

I've created multi-page tiff files with a macro in ImageJ, and I'm now trying to open it using matlab, but I can only access the first frame.

这是imfinfo(filename)的结果.因此,我得到

Here is the result of imfinfo(filename). Accordingly, I get

length(imfinfo(filename)) = 1

Filename: [1x129 char]
              FileModDate: '28-nov-2013 12:27:51'
                 FileSize: 6.7905e+09
                   Format: 'tif'
            FormatVersion: []
                    Width: 512
                   Height: 512
                 BitDepth: 8
                ColorType: 'grayscale'
          FormatSignature: [77 77 0 42]
                ByteOrder: 'big-endian'
           NewSubFileType: 0
            BitsPerSample: 8
              Compression: 'Uncompressed'
PhotometricInterpretation: 'BlackIsZero'
             StripOffsets: 932625
          SamplesPerPixel: 1
             RowsPerStrip: 512
          StripByteCounts: 262144
              XResolution: []
              YResolution: []
           ResolutionUnit: 'None'
                 Colormap: []
      PlanarConfiguration: 'Chunky'
                TileWidth: []
               TileLength: []
              TileOffsets: []
           TileByteCounts: []
              Orientation: 1
                FillOrder: 1
         GrayResponseUnit: 0.0100
           MaxSampleValue: 255
           MinSampleValue: 0
             Thresholding: 1
                   Offset: 8
         ImageDescription: 'ImageJ=1.47q
 images=25900
 slices=25900
 loop=false

但是,如果我在ImageJ中打开相同的tif文件,则可以读取和滚动25900帧...奇怪的是,matlab可以读取我在imageJ中创建的先前的多页tiff,而无需我的批处理宏...

However if I open the same tif file in ImageJ, then I can read and scroll through the 25900 frames...The weird thing is that matlab can read previous multipage tiff I had created in imageJ without my batch macro...

我不知道发生了什么...任何帮助将不胜感激! 谢谢, 史蒂文

I don't understand what's happening...any help would be greatly appreciated ! Thanks, Steven

推荐答案

这实际上是ImageJ的错误.对于大型TIFF,ImageJ而不是使用BigTiff标准保存堆栈,而是使用带有包含第一帧的假TIFF头保存原始文件,并愉快地将其命名为.tif.您可以与ImageJ开发人员讨论为什么他们认为这是个好主意.

This is actually ImageJ's fault. For large TIFFs, instead of using the BigTiff standard to save the stack, ImageJ instead saves a raw file with a fake TIFF header containing the first frame, and happily names it .tif. You can discuss with the ImageJ developers why they think this is a good idea.

要将这些堆栈读入Matlab,可以使用memmapfile MappedTensor

To read these stacks into Matlab, you can use memmapfile or MappedTensor.

这篇关于Matlab仅打开多页tiff堆栈的第一帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆