dicom学习笔记之二:数据元素编码
来源:互联网 发布:淘宝香港丰胸 编辑:程序博客网 时间:2024/05/01 11:11
VM:value multiply =如果数据类型是字符串,就会用反斜杠把相关的值区分开来;如果是字节流,就需要用长度和当前的类型进行除法运算来获取。
在显式语法中,如果VR值是OB, OW, OF, SQ, UT, UN类型
Tag
VR
Value Length
Value
Group
Number
(16-bit
unsigned
integer)
Element
Number
(16-bit
unsigned
integer)
VR(2 byte character string) of
"OB",
"OW",
“OF”,
“SQ”, “UT”
or "UN"
Reserved
(2 bytes)
set to a
value of
0000H
32-bit unsigned
integer
Even number of bytes containing the Data Element Value(s) encoded according to the VR and negotiated Transfer Syntax. Delimited with
Sequence Delimitation Item if of Undefined
Length.
2 bytes
2 bytes
2 bytes
2 bytes
4 bytes
'Value Length' bytes if of Explicit Length
否则的话,
Tag
VR
Value Length
Value
Group
Number
(16-bit
unsigned
integer)
Element
Number
(16-bit
unsigned
integer)
VR
(2 byte character
string)
(16-bit unsigned
integer)
Even number of bytes containing the Data Element Value(s) encoded according to the VR and negotiated Transfer Syntax.
2 bytes
2 bytes
2 bytes
2 bytes
'Value Length' bytes
在隐式的情况下:
Tag
Value Length
Value
Group
Number
(16-bit
unsigned
integer)
Element
Number
(16-bit
unsigned
integer)
32-bit unsigned integer
Even number of bytes
containing the Data
Elements Value
encoded according to
the VR specified in PS
3.6 and the negotiated
Transfer Syntax.
Delimited with
Sequence Delimitation
Item if of Undefined
Length.
2 bytes
2 bytes
4 bytes
'Value Length' bytes or
Undefined Length
在dcmtk代码如下:
/* read the value in the length field. In some cases, it is 4 bytes wide, in other */ /* cases only 2 bytes (see DICOM standard (year 2000) part 5, section 7.1.1) (or the */ /* corresponding section in a later version of the standard) */ if (xferSyn.isImplicitVR() || nxtobj == EVR_na) //note that delimitation items don't have a VR { inStream.read(&valueLength, 4); //length field is 4 bytes wide swapIfNecessary(gLocalByteOrder, byteOrder, &valueLength, 4, 4); bytesRead += 4; } else { //the transfer syntax is explicit VR DcmVR vr(newTag.getEVR()); if (vr.usesExtendedLengthEncoding()) { Uint16 reserved; inStream.read(&reserved, 2); // 2 reserved bytes inStream.read(&valueLength, 4); // length field is 4 bytes wide swapIfNecessary(gLocalByteOrder, byteOrder, &valueLength, 4, 4); bytesRead += 6; } else { Uint16 tmpValueLength; inStream.read(&tmpValueLength, 2); // length field is 2 bytes wide swapIfNecessary(gLocalByteOrder, byteOrder, &tmpValueLength, 2, 2); bytesRead += 2; valueLength = tmpValueLength; } }
- dicom学习笔记之二:数据元素编码
- 编码知识学习笔记之二
- 编码知识学习笔记之二
- dicom学习笔记
- dicom学习笔记
- 转DICOM学习笔记
- dicom学习笔记
- Oracle学习笔记之二 数据字典
- (二)机器学习笔记之数据预处理
- DICOM:DICOM三大开源库对比分析之“数据加载”
- DICOM:docker实现DICOM服务虚拟化之“数据卷”
- python学习(二)之编码
- DICOM标准之二_兼容性声明
- ajax 学习笔记之二 POST GET方式提交数据
- oracle学习笔记之二限制和排列数据
- 数据挖掘学习笔记之人工神经网络(二)
- 数据挖掘学习笔记之人工神经网络(二)
- 大数据学习笔记之二十七 Hadoop的HBase
- 设置android应用为设备管理器
- 云服务商的技术问题和商业道德问题
- 2013/8/20 开学第6周了
- nuc710使用注意点
- usb鼠标驱动
- dicom学习笔记之二:数据元素编码
- jquery的each函数中的break和continue功能
- 页面中div的一些问题
- ubuntu下安装tomcat
- 设置分录表格的标题,给分录添加按钮,当标题无法显示全部文字时,可修改参数改变标题控件的长度。
- js新手学习中:js创建div和img并把img插入div中
- 文件的存储
- DML触发器--记录某张表的dml操作
- tar命令详解