DICOM中几个判断图像方向的tag

在DICOM标准里,有三个TAG与成像的方向相关。

参考来源:Kitware关于DICOM方向的说明

http://public.kitware.com/IGSTKWIKI/index.php/DICOM_data_orientation

 

 

包括

1、Image Position (0020,0032): specifies the x, y, and z coordinates of the upper left hand corner of the image. In other words, this tag specifies the coordinates of the the first voxel transmitted.

 

图像位置:指示了图像左上角的第一个像素的空间坐标(x,y,z)。 也就是DICOM文件传输的第一个像素的坐标

2、Image Orientation (0020,0037): specifies the direction cosines of the first row and the first column with respect to the patient. The direction of the axes are defined by the patients orientation to ensure LPS system ( x-axis increasing to the left hand side of the patient, y-axis increasing to the posterior side of the patient and z-axis increasing toward the head of the patient )

图像方向:指示了图像第一行和第一列相对于病人的方向cosine。 坐标轴的方向是根据病人的方向来确定的(X轴指向病人的左手边,y轴指向病人的后面,Z轴指向病人的头部。

 

3、Patient position( 0018,5100) : Patient position descriptor relative to the equipment. Required for CT and MR images. Possible values: HFP= head first-prone, HFS=head first-supine, HFDR= head first-decibitus right, HFDL = head first-decubiturs left, FFP = feet first-prone, FFS, FFDR, FFDL.

 

病人的位置:  是描述病人相对于CT或者MR等成像设备的位置。 HFP:头部在前,俯卧; HFS:头在前,仰卧

 

一个例子:

某个切片 m:

 

0020,0032  Image Position (Patient): -99.8046875/-282.8046875/94.25

0020,0037  Image Orientation (Patient): 1/0/0/0/1/0 

0018,5100  Patient Position: HFS 
另外一个切片n:

 

 

0020,0032  Image Position (Patient): -99.8046875/-282.8046875/157.5

0020,0037  Image Orientation (Patient): 1/0/0/0/1/0 

0018,5100  Patient Position: HFS 
我们发现
图像的位置坐标中,只有Z轴坐标有变化,而且从Z坐标的大小可以看出,m切片是在n切片的下方
知道了图像的方向,就很容易进行后面的图像分析了

 

1.      Image Orientation:

        如之前在博文《DICOM中几个判断图像方向的tag》中提到的ImageOrientation(0020,0037)表示的是图像第一行和第一列相对于病人的方向。而在DICOM坐标系是根据病人的方向来确定的,其中X轴正向指向病人的左侧,Y轴正向指向病人的背部,Z轴正向指向病人的头部。

        在医学影像处理软件中,最常见的是将导入系统的MRI/CT序列以三视图的形式进行呈现,分别为轴状位(Transverse/Axisplane)、冠状位(Coronal/Frontal plane)和矢状位(Sagittal plane)。以下图显示的是这三个方位对应的切面方位,以及在成像过程中对应的坐标系。

 

图1 成像坐标系

图2 三视图

2.     Software and Coding

 

图3 医学软件中标准三视图与MPR变换后的图像方位

 

       如图3所示为某一款医疗影像软件在载入一个患者头部MRI序列后,三个不同视图中所标注的图像方位图。可以判断出这三个视图依次为轴状位(AP-LR)、矢状位(HF-AP)、冠状位(HF-LR)。

 

       在网上找到的计算视图中方位的程序如下:

 

[cpp] view plain copy
 
  1. char *  
  2. ImageOrientationLayer::ComputeOrientation(Vector3D vector)  
  3. {  
  4.         char *orientation=new char[4];  
  5.         char *optr = orientation;  
  6.         *optr='\0';  
  7.   
  8.         char orientationX = vector.getX() < 0 ? 'R' : 'L';  
  9.         char orientationY = vector.getY() < 0 ? 'A' : 'P';  
  10.         char orientationZ = vector.getZ() < 0 ? 'F' : 'H';  
  11.   
  12.         double absX = fabs(vector.getX());  
  13.         double absY = fabs(vector.getY());  
  14.         double absZ = fabs(vector.getZ());  
  15.   
  16.         int i;  
  17.         for (i=0; i<3; ++i) {  
  18.                 if (absX>.0001 && absX>absY && absX>absZ) {  
  19.                         *optr++=orientationX;  
  20.                         absX=0;  
  21.                 }  
  22.   
  23.                 else if (absY>.0001 && absY>absX && absY>absZ) {  
  24.                         *optr++=orientationY;  
  25.                         absY=0;  
  26.                 }  
  27.   
  28.                 else if (absZ>.0001 && absZ>absX && absZ>absY) {  
  29.                         *optr++=orientationZ;  
  30.                         absZ=0;  
  31.                 }  
  32.   
  33.                 else break;  
  34.   
  35.                 *optr='\0';  
  36.         }  
  37.   
  38.         return orientation;  
  39. }  

 

结合到软件开发中,则首先需要在窗口的top,bottom,left,right中间找到四个单位向量,(0,1,0),(0,-1,0),(-1,0,0),(1,0,0),将其对应的窗口坐标点转化为世界坐标系的点,求出与(0,0,0)所对应的世界坐标原点的四个向量并且归一化,作为上述ComputeOrientaton函数的参数传进去,即可得到当前图像在世界坐标系下的方位。

posted @ 2018-05-22 17:03  h2z  阅读(9028)  评论(0编辑  收藏  举报