找回密码
 欢迎注册
搜索
热搜: 活动 交友 discuz
查看: 5634|回复: 26

[讨论]打开DICOM图像的问题

[复制链接]
发表于 2003-4-29 16:55:04 | 显示全部楼层 |阅读模式
大家都是学DICOM的,有个问题想请教一下,DICOM格式的图像如此特殊,那么自己编一个打开它的程序究竟有多大程度的困难。
  要想编程打开它,最主要的是知道它的编码格式,这一点没有错吧。这方面的资料有人能提供吗?
发表于 2003-4-29 20:42:13 | 显示全部楼层

[讨论]打开DICOM图像的问题

如果是比较标准的图像倒也不是太困难,只要读出各个TAG值,估后根据这些TAG计算出调色板即可,但要是不太标准的,比如有的DSA或胃肠的,那可能就要麻烦一些,不过一般最麻烦的主要是没有窗宽窗位
 楼主| 发表于 2003-4-30 14:44:24 | 显示全部楼层

[讨论]打开DICOM图像的问题

那究竟怎样才能知道是不是标准的呢?一般医院的CT机照出来的是否标准?
发表于 2003-4-30 19:54:00 | 显示全部楼层

[讨论]打开DICOM图像的问题

ct的图像应该是最标准的,哪家的工具都能读
发表于 2003-5-6 08:51:52 | 显示全部楼层

[讨论]打开DICOM图像的问题

如果你比较熟悉DICOM文件结构的话,应该是件很容易的事情,不过是带tag的流文件而已。当然你得区分是Implicit还是Explicit,是LE还是BE的
 楼主| 发表于 2003-5-6 16:41:56 | 显示全部楼层

[讨论]打开DICOM图像的问题

楼上的仁兄是不是对DICOM文件结构比较熟悉,能不能发个帖子给大家讲讲呀,再者,能不能发些资料给在下呀。liyunkang_2002@163.com
先谢谢了。
发表于 2003-5-7 15:26:21 | 显示全部楼层

[讨论]打开DICOM图像的问题

楼上兄弟,不知道是否看过DICOM标准,在DICOM标准里说的很清楚啦,还有图例什么的,简单地说不过就是按照(group,element)[VR](length)(value)的格式顺序排列,当然遇到SQ就麻烦多了,最好是找个DICOM文件用ultraEdit等工具按二进制形式打开看一看,就都明白了。其实有很多现成的软件,也都提供了格式列出,比如PiView等,比如给你个例子:
group,element,  vr,    (加的说明)            value
(0008,0008)   IM(CS)   T_0008_0008_imageType   ORIGINAL|  PRIMARY|LOCALIZER
(0008,0012)   IM(DA)   T_0008_0012_instanceCreationDate
  2001/11/23
(0008,0013)   IM(TM)   T_0008_0013_instanceCreationTime
  15:19:23.000000
(0008,0016)   IM(UI)   T_0008_0016_sopClassUid
  1.2.840.10008.5.1.4.1.1.2 (CT Image Storage)
(0008,0018)   IM(UI)   T_0008_0018_sopInstanceUid
  1.2.840.113704.1.1762572438.1679.1006557563.183
(0008,0020)   IM(DA)   T_0008_0020_studyDate
  2001/11/23
(0008,0022)   IM(DA)   T_0008_0022_acquisitionDate
  2001/11/23
(0008,0023)   IM(DA)   T_0008_0023_imageDate
  2001/11/23
(0008,0030)   IM(TM)   T_0008_0030_studyTime
  15:17:29.000000
(0008,0032)   IM(TM)   T_0008_0032_acquisitionTime
  15:19:19.000000
(0008,0033)   IM(TM)   T_0008_0033_imageTime
  15:19:33.250999
(0008,0050)   IM(SH)   T_0008_0050_accessionNumber
(0008,0060)   IM(CS)   T_0008_0060_modality
  CT
(0008,0070)   IM(LO)   T_0008_0070_manufacturer
  Marconi
(0008,0080)   IM(LO)   T_0008_0080_institutionName
  Qujing No.1 Hospital
(0008,0081)   IM(ST)   T_0008_0081_institutionAddress
  Haifa, MATAM
(0008,0090)   IM(PN)   T_0008_0090_referringPhysicianName
(0008,1010)   IM(SH)   T_0008_1010_stationName
  Mx8000
(0008,1030)   IM(LO)   T_0008_1030_studyDescription
(0008,1040)   IM(LO)   T_0008_1040_institutionalDepartmentName
  Radiology
(0008,1070)   IM(PN)   T_0008_1070_operatorName
  Twin-7180
(0008,1090)   IM(LO)   T_0008_1090_manufacturerModelName
  Mx8000
(0010,0010)   IM(PN)   T_0010_0010_patientName
  yu jianxiu^m
(0010,0020)   IM(LO)   T_0010_0020_patientId
  41229
(0010,0030)   IM(DA)   T_0010_0030_patientBirthDate
(0010,0040)   IM(CS)   T_0010_0040_patientSex
  M
(0010,1010)   IM(AS)   T_0010_1010_patientAge
  17Y
(0018,0022)   IM(CS)   T_0018_0022_scanOption
  SURVIEW
(0018,0050)   IM(DS)   T_0018_0050_sliceThickness
  1
(0018,0060)   IM(DS)   T_0018_0060_kvp
  120
(0018,0090)   IM(DS)   T_0018_0090_dataCollectionDiameter
  450
(0018,1020)   IM(LO)   T_0018_1020_softwareVersion
  2.21
(0018,1030)   IM(LO)   T_0018_1030_protocolName
  Surview Lat./Spine/Sv
(0018,1100)   IM(DS)   T_0018_1100_reconstructionDiameter
  450
(0018,1120)   IM(DS)   T_0018_1120_gantryDetectorTilt
  0
(0018,1130)   IM(DS)   T_0018_1130_tableHeight
  131
(0018,1140)   IM(CS)   T_0018_1140_rotationDirection
  CW
(0018,1141)   IM(DS)   T_0018_1141_angularPosition
  90
(0018,1143)   IM(DS)   T_0018_1143_scanArc
  90
(0018,1150)   IM(IS)   T_0018_1150_exposureTime
  3619
(0018,1151)   IM(IS)   T_0018_1151_xrayTubeCurrent
  30
(0018,1160)   IM(SH)   T_0018_1160_filterType
  D
(0018,5100)   IM(CS)   T_0018_5100_patientPosition
  HFS
(0020,000d)   IM(UI)   T_0020_000d_studyInstanceUid
  1.2.840.113704.1.1762572438.1741.1006557428.10
(0020,000e)   IM(UI)   T_0020_000e_seriesInstanceUid
  1.2.840.113704.1.1762572438.8077.1006557528.2
(0020,0010)   IM(SH)   T_0020_0010_studyId
  8420
(0020,0011)   IM(IS)   T_0020_0011_seriesNumber
  7501
(0020,0012)   IM(IS)   T_0020_0012_acquisitionNumber
(0020,0013)   IM(IS)   T_0020_0013_instanceNumber
  1
(0020,0032)   IM(DS)   T_0020_0032_imagePosition
  0
  -101
  -944.195312
(0020,0037)   IM(DS)   T_0020_0037_imageOrientation
  0
  1
  0
  0
  0
  -1
(0020,0052)   IM(UI)   T_0020_0052_frameOfReferenceUid
  1.2.840.113704.1.1762572438.8077.1006557528.3
(0020,0060)   IM(CS)   T_0020_0060_laterality
(0020,1040)   IM(LO)   T_0020_1040_positionReferenceIndicator
(0020,1041)   IM(DS)   T_0020_1041_sliceLocation
  -588.50
(0028,0002)   IM(US)   T_0028_0002_samplePerPixel
  0x0001 1
(0028,0004)   IM(CS)   T_0028_0004_photometricInterpretation
  MONOCHROME2
(0028,0010)   IM(US)   T_0028_0010_row
  0x018e 398
(0028,0011)   IM(US)   T_0028_0011_column
  0x0200 512
(0028,0030)   IM(DS)   T_0028_0030_pixelSpacing
  0.87890625
  0.87890625
(0028,0100)   IM(US)   T_0028_0100_bitAllocated
  0x0010 16
(0028,0101)   IM(US)   T_0028_0101_bitStored
  0x000c 12
(0028,0102)   IM(US)   T_0028_0102_highBit
  0x000b 11
(0028,0103)   IM(US)   T_0028_0103_pixelRepresentation
  0x0000 0
(0028,1050)   IM(DS)   T_0028_1050_windowCenter
  00800
  00800
(0028,1051)   IM(DS)   T_0028_1051_windowWidth
  02000
  02000
(0028,1052)   IM(DS)   T_0028_1052_rescaleIntercept
  -1000
(0028,1053)   IM(DS)   T_0028_1053_rescaleSlope
  1
(7fe0,0010)   IM(OX)   T_7fe0_0010_pixelData
  buf : 005873A8   len : 407552 (0x63800) bytes
发表于 2003-5-21 15:32:13 | 显示全部楼层

[讨论]打开DICOM图像的问题

哇,楼上的这位兄弟很厉害啊,能告诉我这个程序是干什么的吗?
发表于 2003-5-22 07:50:49 | 显示全部楼层

[讨论]打开DICOM图像的问题

不是程序啊,是图象格式
发表于 2003-7-21 11:45:51 | 显示全部楼层

[讨论]打开DICOM图像的问题

这些数值随便用一个共享软件就可以读出来。
推荐ezDICOM,操作
.
比较简单
不过,怎么样对图象数据的处理我就不清楚了。
谁给讲一下吧!
发表于 2003-7-21 18:09:11 | 显示全部楼层

[讨论]打开DICOM图像的问题

对于放射图象的主要处理就是调窗了,很多地方都有介绍,我在这里不多说了。
发表于 2003-7-30 22:12:33 | 显示全部楼层

[讨论]打开DICOM图像的问题

That is a problem for reading value of element to me. I am trying to read all elements from header of dicom file, but the thing is only a few lines I can read using c++.as follow:
2,0(0002,0000)
UL
4
4294967258
2,1
OB
0
2
1,2(I think that wrong it should be 2,2)
...
that the thing I can read,but in the header file which is transfered in the normal way shows a number that is 218 followed by UL.
I really don\'t know what the problem is, hope someone can tell me. sorry for English writting and next time I will change.
thank your .
发表于 2003-7-31 08:47:32 | 显示全部楼层

[讨论]打开DICOM图像的问题

Your way is right, 2,1 is the group and element tag, UL is VR(value representation), 4 is element length, and 4294967258 is the element value, you have got all you need, then what\'s the problem?
发表于 2003-7-31 13:03:37 | 显示全部楼层

[讨论]打开DICOM图像的问题

first thank you for your replying. i solved the problem.  in the header file, UL following by 218 which is the group length.in my case, the number is too big for being group length. i tried  use "unsigned char "to read the elements, i am happy it does work.
another thing is reading the UI(unique identifier),can you give me some ideas.
发表于 2003-7-31 16:20:22 | 显示全部楼层

[讨论]打开DICOM图像的问题

UI is a string less the 64 byte length, just read to a buffer like char buf[64]
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

快速回复 返回顶部 返回列表