对彩色图像使用 dicomwrite

Using dicomwrite with color images

我正在尝试将一系列彩色图像写入 Matlab 中的 dicom 文件。每张图片都是 uint16 类型。该序列存储在名为 output 的 4D 矩阵中,大小为 200x360x3x360(行数 x 列数 x 通道数 x 图像数)。当我执行 dicomwrite(output,'outputfile.dcm') 时,出现以下错误:

它说数据位深度是 8,但我确保每个图像都是 16 位。不知道出了什么问题。

documentation for dicomwrite says it can write color images as well. In fact dicomread can read color dicom images such that the size of the matrix which stores the read data is 200x360x3x360. So I guess it should be possible to write color images as well using dicomwrite. Any help in this regard is appreciated. There is a related post但是没有讲彩色图像序列

JohnnyQ 的评论是正确的。 From this page 在 A.8.5.4 节下方,他们列出了多帧真彩色 SC 图像 IOD 内容约束(部分列表引用):

In the Image Pixel Module, the following constraints apply:

  • Samples per Pixel (0028,0002) shall be 3
  • Bits Allocated (0028,0100) shall be 8
  • Bits Stored (0028,0101) shall be 8
  • High Bit (0028,0102) shall be 7
  • Pixel Representation (0028,0103) shall be 0

似乎 matlab 不会为您进行转换,因此您应该将每个 16 位颜色通道向下转换为 8 位 DICOM