从DICOM头提供以下信息,如何计算体素大小的第三个值?我假设前两个值是0.515625和0.515625。
BitsAllocated: "16"
BitsStored: "12"
Columns: 512
HighBit: "11"
ImageOrientation: "1\0\0\0\-1\0"
ImagePosition: "-144\-34.7242241\925.599976"
ImageType: "ORIGINAL\PRIMARY\AXIAL\HELIX"
InstanceNumber: "456"
Modality: "CT"
PhotometricInterpretation: "MONOCHROME2"
PixelRepresentation: "0"
PixelSpacing: "0.515625\0.515625"
RescaleIntercept: "1"
Rows: 512
SamplesPerPixel: "1"
SeriesDescription: "CERVEAU SANS IV"
SeriesNumber: "3"
SliceThickness: "1.50"
WindowCenter: "00040\00040"
WindowWidth: "00120\00120"
imagesFormat: "jpg"
modality: "CT"
name: "soft tissue"
nodeId: "557621"
pixelHeight: "0.515625"
pixelWidth: "0.515625"注意:我收到的是JPEG图像堆栈,而不是DICOM,它附带的文件具有我上面发布的值。如果需要的话,我可以回去索取更多的资料。
发布于 2020-12-21 09:38:08
只考虑到一个切片的标记,您必须使用SliceThickness作为第三维空间,不过我建议不要这样做,因为这并不一定会给出片间的距离。有提供此信息的标记SpacingBetweenSlices,尽管在您的示例中它似乎不存在。
最好的方法是利用相邻切片之间的ImagePositionPatient差异。为此,当然还需要下一个切片的标记。附带说明:在您的清单中,ImageOrientation和ImagePosition应该更好地阅读ImageOrientationPatient和ImagePositionPatient,因为ImageOrientation和ImagePosition是其他标记( CT图像中不存在)。
ImagePositionPatient给出切片的左上角在DICOM病人坐标中的位置,并计算出在该坐标系中必须考虑切片的方向的距离。这是由ImageOrientationPatient给出的,它包含在DICOM坐标中的片的归一化行和列方向余弦向量。你可以在DICOM标准上读到这一点。
取向矩阵的前两个分量由ImageOrientationPatient (例如第一和第二三个数字)提供,第三分量可以通过这两个分量的交叉乘积来计算。
因此,在伪代码中,这将是如下所示:
orient1 = vector(ImageOrientationPatient[0], ImageOrientationPatient[1], ImageOrientationPatient[2])
orient2 = vector(ImageOrientationPatient[3], ImageOrientationPatient[4], ImageOrientationPatient[5])
orient3 = orient1 x orient2 // cross product
orient_matrix = matrix(orient1, orient2, orient3)
pos1 = vector(ImagePositionPatient[0], ImagePositionPatient[1], ImagePositionPatient[2]) // from current slice
pos2 = vector(ImagePositionPatient[0], ImagePositionPatient[1], ImagePositionPatient[2]) // from adjacent slice
diff_pos = pos2 - pos1
image_pos = orient_matrix o diff_pos / length(orient3) // normalized dot product
voxel_z = image_pos.z更新:正如@gofal所指出的,第一个版本是不正确的。我还包括了规范化(例如,由length(orient3)删除),尽管严格地说,这些值应该已经规范化了。
发布于 2020-12-21 09:18:33
PixelSpacing (0028,0030)给出了图像中列和行的两个大小。您要求的第三个值是切片厚度(0018,0050)。
在某些重建(MIP或类似的)情况下,切片厚度可能比两个相邻图像的距离更高。因此,如果您使用这个单一的图像作为自己的,那么您将不得不使用切片厚度。但是如果你有一堆图像,并且想要做3D渲染或重建或类似的事情,那么我建议用两个相邻图像的距离来计算第三个体素大小。
参考资料:https://dicom.innolitics.com/ciods/ct-image/image-plane C.34.12.html
https://stackoverflow.com/questions/65389506
复制相似问题