【问题标题】:Creating a stacked tiff file causes image offset创建堆叠的 tiff 文件会导致图像偏移
【发布时间】:2015-10-29 03:01:31
【问题描述】:

我有一个图像处理程序,其结果需要保存到堆叠的 tiff 文件中。执行此操作的方法的代码包含在下面。当在 ImageJ 中打开生成的图像时,它会给出通知“意外的图像偏移”,并且只能显示堆栈中的第一个图像。 图=图; 图(图);

fileN = handles.fileName;
[m n] = size(fileN);
m = 0;
for i=1:n
    if(fileN(i) == '.')
        m = i;
        break
    end
end
fileN = fileN(:,1:m-1);
fileP = handles.filePath;
saveFilePath = strcat(fileP,fileN,'-snake-analysis.tif')

im = imread(handles.fileFull, 1);
imshow(im, []);
hold on
plot(handles.xsFinal(1,:), handles.ysFinal(1,:), 'r-');
hold off
saveas(fig, saveFilePath);

for i=2:handles.numFrames
    im = imread(handles.fileFull, i);
    imshow(im, []);
    hold on
    plot(handles.xsFinal(i,:), handles.ysFinal(i,:), 'r-');
    hold off

    saveas(fig, 'inter.tif');
    a = imread('inter.tif');
    imwrite(a, saveFilePath,'Compression', 'none','WriteMode','append');
    delete 'inter.tif';
end

有谁知道是什么导致了这个问题?

【问题讨论】:

    标签: matlab matlab-figure imagej


    【解决方案1】:

    内置的 ImageJ 1.x TIFF 打开器不能完全处理基线 TIFF 规范:它cannot handle out-of-sequence planes

    如果您使用ImageJ2,您可以使用SCIFIO 库通过文件 ▶ 导入 ▶ 图像... 命令打开您的 TIFF。 Bio-Formats Importer plugin 也可以打开此类 TIFF 文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-10
      • 1970-01-01
      相关资源
      最近更新 更多