将 DICOM 文件堆叠成一个多切片系列
Stacking DICOM files into one multi-slice series
我正在尝试将不同的 DICOM 文件堆叠成一个多切片系列,以便在 ITK-Snap 上可视化它们。但是,我似乎无法获得功能正常的 DICOM 系列。
我已经根据切片定位对所有文件进行了排序,并且我有许多有序的单个 .dcm 文件及其原始信息。我用一个单一的 uid 替换了他们所有的原始系列实例 UID,并将他们的系列号替换为一个我设置为“999”的自定义系列号(以便使它们属于一个系列)。所有文件的图像方向设置为 [1;0;0;0;1;0]
,所有文件的切片厚度均设置为 8 mm。
然后我创建了一个信息结构数组,原始切片 positionings [info(num)]
.
我试过类似的方法:
for i=1:num %where num is the number of dicom files
k = num2str(i);
dicomwrite(imm,k,info(i),'CreateMode','Copy'); %where imm is the matrix I obtained with dicomread
end
我获得了一组新的 dicom 文件,命名为从 1 到 num 的数字,但是当我尝试在 ITK-snap 上打开该系列时,它 运行 进入异常状态,说明向量是太长。我可以在 ITK-snap 上打开单个 dicom 文件,但是当多个图像属于该系列时,并且该系列可视化为 256x212xnum,其中 num 是文件数,我 运行 进入异常。
我做错了什么?
您正在尝试做的事情叫做 Multi-frame in the DICOM standard。简而言之,除了确保所有图像元数据仍然正确之外,您还需要指定 Number of Frames (0028,0008)
和 Frame Increment Pointer (0028,0009)
。不幸的是,关于 Frame Increment Pointer
标签究竟如何工作的措辞有点含糊:
The frames within a Multi-frame Image shall be conveyed as a logical sequence. The information that determines the sequential order of the frames shall be identified by the Data Element Tag or Tags conveyed by the Frame Increment Pointer (0028,0009). Each specific Image IOD that supports the Multi-frame Module specializes the Frame Increment Pointer (0028,0009) to identify the Attributes that may be used as sequences.
Even if only a single frame is present, Frame Increment Pointer (0028,0009) is still required to be present and have at least one value, each of which shall point to an Attribute that is also present in the Data Set and has a value. 1
希望对您有所帮助。
我正在尝试将不同的 DICOM 文件堆叠成一个多切片系列,以便在 ITK-Snap 上可视化它们。但是,我似乎无法获得功能正常的 DICOM 系列。
我已经根据切片定位对所有文件进行了排序,并且我有许多有序的单个 .dcm 文件及其原始信息。我用一个单一的 uid 替换了他们所有的原始系列实例 UID,并将他们的系列号替换为一个我设置为“999”的自定义系列号(以便使它们属于一个系列)。所有文件的图像方向设置为 [1;0;0;0;1;0]
,所有文件的切片厚度均设置为 8 mm。
然后我创建了一个信息结构数组,原始切片 positionings [info(num)]
.
我试过类似的方法:
for i=1:num %where num is the number of dicom files
k = num2str(i);
dicomwrite(imm,k,info(i),'CreateMode','Copy'); %where imm is the matrix I obtained with dicomread
end
我获得了一组新的 dicom 文件,命名为从 1 到 num 的数字,但是当我尝试在 ITK-snap 上打开该系列时,它 运行 进入异常状态,说明向量是太长。我可以在 ITK-snap 上打开单个 dicom 文件,但是当多个图像属于该系列时,并且该系列可视化为 256x212xnum,其中 num 是文件数,我 运行 进入异常。
我做错了什么?
您正在尝试做的事情叫做 Multi-frame in the DICOM standard。简而言之,除了确保所有图像元数据仍然正确之外,您还需要指定 Number of Frames (0028,0008)
和 Frame Increment Pointer (0028,0009)
。不幸的是,关于 Frame Increment Pointer
标签究竟如何工作的措辞有点含糊:
The frames within a Multi-frame Image shall be conveyed as a logical sequence. The information that determines the sequential order of the frames shall be identified by the Data Element Tag or Tags conveyed by the Frame Increment Pointer (0028,0009). Each specific Image IOD that supports the Multi-frame Module specializes the Frame Increment Pointer (0028,0009) to identify the Attributes that may be used as sequences.
Even if only a single frame is present, Frame Increment Pointer (0028,0009) is still required to be present and have at least one value, each of which shall point to an Attribute that is also present in the Data Set and has a value. 1
希望对您有所帮助。