从C ++中的SVS格式文件中提取完整比例的图像 [英] Extract a whole scale image from a SVS format file in C++

查看:365
本文介绍了从C ++中的SVS格式文件中提取完整比例的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从C ++中的SVS文件中提取完整比例的图像.

I am trying to extract a whole scale image from a SVS file in C++.

我从 OpenSlide主页中看到了一个解释. 它说SVS格式是单文件金字塔平铺的TIFF".

I saw an explanation from the OpenSlide homepage. It says the SVS format is "single-file pyramidal tiled TIFF".

因此,我尝试像提取TIFF图像一样提取整个比例的图像:我从SVS文件读取了所有IFD,但是没有273标记包含指向整个比例的图像的地址.

So I tried to extract a whole-scale image like I did for TIFF image: I read all IFDs from the SVS file, but there is no 273 tag which contains an address pointing to a whole scale image.

这就是为什么我现在有点困惑,SVS格式在文件中没有完整比例的图像吗?

That's why I am little confused now, the SVS format doesn't have a whole scale image inside the file?

我从SVS文件中找到了一个未定义的私有标签,编号为34675.该标签用于完整比例的图像吗? 还是有提取它的正确方法?

I found an undefined private tag from a SVS file which number is 34675. Is this tag is for a whole scale image? Or is there a proper way to extract it?

推荐答案

Aperio SVS是平铺格式.金字塔的所有级别均为平铺图像.基础层是第一个TIFF目录. LibTiff文档的本页显示了如何读取平铺图像.

Aperio SVS is a tiled format. All levels of the pyramid are tiled images. The base layer is the first TIFF directory. This page of the LibTiff documentation shows how to read tiled images.

简而言之,您需要查找标签324(TIFFTAG_TILEOFFSETS)以及标签322和323(TIFFTAG_TILEWIDTHTIFFTAG_TILELENGTH).我强烈建议您为此使用LibTiff,不要尝试自己动手制作.

In short, you need to look for tag 324 (TIFFTAG_TILEOFFSETS), as well as tags 322 and 323 (TIFFTAG_TILEWIDTH, TIFFTAG_TILELENGTH). I highly recommend you use LibTiff for this, and don’t try to roll your own.

SVS文件中的自定义标签包含元数据,包括以微米为单位的像素的物理尺寸(SVS不会设置分辨率TIFF标签).

The custom tag in the SVS file contains metadata, including the physical size of a pixel in micron (SVS doesn’t set the resolution TIFF tags).

这篇关于从C ++中的SVS格式文件中提取完整比例的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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