dicom中读取slice order的信息

 

转自这篇文章

1.关于slice order的基本知识普及,以西门子的数据为例 fromhttps://mri.radiology.uiowa.edu/fmri_images.html
The Siemens scanner has three types of image order that the user can select at the scanner console. 

This selection affects the order in which slices will be acquired.  In Siemens conventions the negative direction is (Right, Anterior, Foot) and the positive direction is (Left, Posterior, Head). For axial slices, the inferior slices are collected first.  For sagittal slices, the right side of the brain is collected first. For coronal slices, the anterior part of the brain is collected first. The modes are:
slice <wbr>order <wbr>for <wbr>MR

图 来自《Handbook of Functional MRI Data Analysis》by Poldrack et al.第二章

  • Ascending - In this mode, slices are acquired from the negative direction to the positive direction (bottom to top, in order: 1, 2, 3, etc.)
  • Descending - In this mode, slices are acquired from the positive direction to the negative direction(top to bottom, in order, 36, 35, 34 etc.)
  • Interleave - In this mode, the order of acquisition depends on the number of slices acquired. in an ascending (1, 3 5… 2, 4 6… etc.) or descending (35, 33, 31… 36, 34, 32… etc.) interleaved order.
  • If there is an odd number of slices, say 27, the slices will be collected as:

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 2 4 6 8 10 12 14 16 18 20 22 24 26.

  • If there is an even number of slices (say 28) the slices will be collected as:

    2 4 6 8 10 12 14 16 18 20 22 24 26 28 1 3 5 7 9 11 13 15 17 19 21 23 25 27.

2. http://akiraoconnor.org/2010/09/01/the-physical-reality-of-fmri-slice-acquisition-order/ 作者介绍了如下内容:

可以问技师来了解扫描序列,如果找不到技师,那可以:spm list 提供的一篇文献

The procedure, devised by Descamps and colleagues, simply involves getting an fMRI participant to turn their head from looking straight up, to looking to one side during a very short scan.  The turn should be caught in its various stages of completion by the various slices that comprise one 3D image, allowing the curious researcher to figure out the slice acquisition order crudely, but effectively.

就是说让被试在一次非常短暂的扫描时间内去转动她的头,可以让技师来有效推测出扫描的序列。

 

3. SPM提供了一种方法让我们看扫描序列:Slice timing order inference

http://en.wikibooks.org/wiki/Neuroimaging_Data_Processing/Slice_Timing#Slice_timing_order_inference

Slice order is a very important parameter in the procedure of slice timing, and an accurate description to the order ensure the correction performance. If you are not sure about the order, the best way is to ask the experimenter directly and get the first-hand information. However, sometimes it's hard to get connected to the persons, and SPM provides a "Display" option to infer the slice orderFirstly, it should be clarified that there are three possible slice orders for EPIː

  1. Ascendingː can be expressed as [1ː1ːnslices] in SPM
  2. Descendingː can be expressed as [nslicesː-1ː1] in SPM
  3. Interleavedː slices are obtained alternatively from odd and even slices. Odd slides can be expressed as [1ː2ːnslices], even slides can be expressed as [2ː2ːnslices]. Normally in this mode the aquisition is in ascending order. And descending (35, 33, 31… 36, 34, 32… etc.) interleaved order.

If you want to check the slice ordering in one image, you could load the image under "Display" option in SPM. On the left-side there is a panel showing the coordinates of the cursor both in voxel coordinates and millimetresChange the crosshairs to a voxel with coordinate of z=1, and this would be the first slice of current volume. Then, fix the x and y values in the crosshairs, and try to increase the z value gradually from 2 to the number of slices, concomitantly the millinetres in z axis will changeFrom the increase on the step, we could know the direction either ascending or descending, and the interval equals to one voxel or two voxels. In this way, we could infer the slice order correspondingly.

slice <wbr>order <wbr>for <wbr>MR

82.8就是相应的z value,会相应的变化。我们的结构像是从左自右扫描(技师说的),故当z value由72.8变成82.8时,看到图像中的十字的竖线,由左边移到了右边。----看功能像EPI时,当z value由7变成8时,看到图像中的十字的横线,由左边移到了右边,这是向上扫描趋势(我们的隔层,先奇数向上扫,再偶数向上扫的那种,故单纯从上述的方法还是不能完全判断对,还是得问技师)。

Slice timing parameters

ParameterValueComments
SessionBatch of images/
Num.of.sliceNumber of sliceInteger
TRRepetition timeFloat
TATA = TR-(TR/nslices)Float
Slice orderSee above part/
File prefixwith ä.nii/



3.http://lsr-wiki-01.mrc-cbu.cam.ac.uk/imaging/TipsForDataAcquisition

 

 

 

 

 

 

4.

水滴里也有讨论,关于从原始数据中确认扫描顺序的问题

http://home.52brain.com/thread-15103-1-1.html  如何看数据的slice order 

总结如下:

1.试试MRIcro中的read header功能打开,里边会列出非常详细的信息来。。。。(Import->open foreign...

Import->Display/hide foreign header
如果有BrainVoyger的话,可以更直观的直接读出来

 

2.应该是使用matlab的dicominfo查的instance Number和Slice Location

一个volume中每个slice得到的instanceNumber具体数值,有一个对应的SliceLocation数值,(注意:instanceNumber扫描的EPI时间序列顺序,从1开始递增,slice order和Slice Location不是一个概念;Slice Location是周期性循环的,是各个slice的扫描位置

 

还有如果使用每个dicom文件(对应一个slice)这两项在不同软件(matlab dicominfo&micro )中是不完全一样的,请注意

matlab dicominfo 显示的是
InstanceNumber: ***
SliceLocation: ***
micro 显示的是
0020,0013,Image Number= ***
0020,1041,Slice Location= ***

例如 matlab dicominfo
Im1: InstanceNumber1  SliceLocation: 59.7071
Im2: InstanceNumber2  SliceLocation: 54.7071
Im3  InstanceNumber3  SliceLocation: 49.7071
Im4  InstanceNumber4  SliceLocation: 44.7071
Im23  InstanceNumber23  SliceLocation: -50.2929
那么,一个volume中,第一个slice从59.7071的位置,到第23个-50.2929的位置。这样就知道sclie order了。这个例子是desending。

 

再比如:

我们一个TR 扫20层,层厚是5mm,下面是40个dicom文件的instanceNumber和SliceLocation
61  -7.4830 
62  -2.4830 
…… 
79  82.517 
80  87.517 
81 -7.4830 
82 -2.4830 
…… 
99  82.517 
100 87.517

知道了按时间顺序而变化的扫描位置 就知道了是我们感兴趣的slice order,即一个volume中各slice的生成顺序。
不知我说清楚没有,
上面二个volume, 第一个slice都是从-7.4830的位置,到第20个87.517的位置。sclie order是ascending

 

但是,

有朋友使用上述方法遇到问题:

问题:你的每个dicom文件只对应一个slice?我的一个dicom文件里就有好多slice呢!我想这就是我不明白的地方。是因为你的机子是GE的么?我的是西门子的!!!关于slice location,我用MRICRO查看了几个dicom文件,发现他们居然都是同样的slice location,郁闷。请问有谁知道这个原因么?

回答:有这种可能,Dicom允许在一个文件中有多个图像信息,所谓的图像序列,我确定我的是一个文件dcm对应一个silce,如果你从机器上导出DCM文件时,是一个volume一个dcm,情况就复杂了,我们上面的讨论就多余了

问题:你用aiv查看一下你的dicom文件(输入命令如下:aiv yourfile);或者用vi查看一下你的原始文件(输入命令如下:
vi yourfile);或者使用dicom2转换成图查看:(输入命令:dicom2 -w yourfile);MRICRO和BV viewer也行。如果看到一层,
说明你之前的理解是正确的;如果可以看到很多层,就说明你之前的理解可能不全面。
回答:
也对,我的dcm文件中InstanceNumber是1、 21、 31,slice location是一样的,就是1、 2、 3volume的第
一层,扫描位置当然是一样的。另外 你一个volume一个dcm(或者说一个volume一个file即一个volume很多slice)
时,slice location指向同一个位置也是有可能的,可能有些slice的信息就没了。
也有人说这样的情况解决了:有同学研究出来了,siemens的可以在matlab里c=dicominfo('x.ima‘),然后到去找
跟扫描层数对应的那个cell array,能看到生成时间。c=dicominfo('x')。单引号都是英文的。
过程不顺利,首先我用的是SPM的DICOM IMPORT后的.img格式,结果不支持。
然后使用原始数据“X”,X就是一大串数字,没有后缀的那种文件。就可以了。
---------
另,对于多个SLICE对应一个DCM的情况,无论MATLAB还是MRIcro,至今不能通过其看到每个slice的生成时间。
后来又来一个高手,这么回复:碰到同样的问题 Siemens的图像 一个dicom里多个slices 
试验了一下 找到解决方案如下 :
(可是就是楼上同学说的,但我没有看明白。 我把例子放在这里,希望有帮助。 
另,楼上说"对于多个SLICE对应一个DCM的情况,无论MATLAB还是MRIcro,至今不能通过其看到每个slice
的生成时间。“是什么意思。。图像产生的绝对时间?    是不是可以用InstanceCreationDate和 
 InstanceCreationTime加上某个slice的相对时间来解决?见下面的数据)
过程如下:
在matlab下用dicominfo('图像名字' ) - Dicom!!
在列表中可以找到这个图像里有一项显示slice数
我数据里这一项显示为Private_0019_100a: 33
然后找到与之对应的一个double型的array 
我数据里找到的这项名字显示为:
Private_0019_1029: [33x1 double]
打开这项,序列显示为
0
1.2825
0.075
1.3575
0.15
1.4325
0.225
1.5075
0.3025
1.585
0.3775
1.66
0.4525
1.735
0.5275
1.81
0.6025
1.885
0.68
1.9625
0.755
2.0375
0.83
2.1125
0.905
2.1875
0.98
2.2625
1.055
2.3375
1.1325
2.415
1.2075
所以就是[1:2:33,2:2:32]
完毕。
希望对用Siemens家的同学有帮助。
后来又又来一个高手,这么回复:用matlab的dicominfo命令读取文件,在得到的结果中查找Private_00**就可以看到
不同层的采集时间
另外一个帖子回复:飞利浦的机器是一层图像为一个dicom文件,头文件里面有成像时间。但是西门子是masaic文件,拆开之后也看
不到头文件里面是是否有成像时间信息。
我用的西门子Trio,在dicom头文件里有private*******变量,里面存储的是每一层的扫描
时刻。供参考。


在matlab下用dicominfo函数可以读取dicom文件的头文件信息。但是不是所有的dicom头文件都保存了slice order的信息。我在几
批dicom数据中看到过这个信息,另外几批dicom数据中没有这个slice order信息。请高人指点,是不是在扫描参数设置的时候有什
么讲究,可以将slice order的信息保存下来?


用dicominfo读入dicom文件,里面会有一个private_00**_***的变量,找到大小为
扫描的层数by1的那个变量,打开就是你文件扫描的时间顺序,这样就可以确定你的slice order了。


SPM生成的hdr文件中有,按照NIFTI文件格式读取hdr文件,其中有slice_order这一项。
 

自问自答:

问了一下MESSAGE BOARD的人,他们说除非软件专门为某种牌子机器而写,否则读取出来的slice
pattern信息不可靠。只有一条路,听操作员的话。原帖:http://afni.nimh.nih.gov/afni/co ... 956&t=27956

所以,上述办法推出了扫描序列,也要找原来扫描技术人员再确认,或者用下面的第“4”个办法。

 

3.有滴友:我用了ezdicom~philips转换出来的dicom也可以查到image number 和 silice location~我的图像是升序的

 

4.也有滴友认为:于层序,好像并不是所有的dicom中都记录了slice order,很多是查不出来。 你可以去spm邮件列表搜一下 slice order 能得到不少有用的信息

 

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值