110,532
社区成员
发帖
与我相关
我的任务
分享
DicomImage image = images.ReadFile(strNewFullFilePath);
if (image.Attributes[0x20, 0x32].Exists == true)
{
try
{
object a = image.Attributes[0x20, 0x32].Value[1];
ImagePosY = image.Attributes[0x20, 0x32].Value[2];
ImagePosZ = image.Attributes[0x20, 0x32].Value[3];
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
throw e;
}
}
Dim objDicomImage As DicomImage
100 Set objDicomImage = frmMain.DicomViewer1.Images.ReadFile(strFilePath)
Dim strXYZ() As String
102 ReDim strXYZ(1)
Dim strX As String, strY As String, strZ As String
104 If objDicomImage.Attributes(&H20, &H32).Exists = True Then
106 strXYZ = objDicomImage.Attributes(&H20, &H32).Value
End If
108 If UBound(strXYZ) = 3 Then
110 GetDCMXYZByDCMFilePath = strXYZ(1) & "," & strXYZ(2) & "," & strXYZ(3)
End If