[Dcmlib] Question regarding reading data entries other then strings

Jean-Pierre Roux jpr at creatis.insa-lyon.fr
Wed Jan 23 09:49:45 CET 2008


Neerav Patel wrote:
> Hi,
>  
> I have a dicom image with a (x,y,z) parameter sitting at 0x0018, 
> 0x5212 and it looks like the following when I open it up with a dicom 
> viewer
> How does one grab that,  I tried using
>   float * temp = new float[3];
> temp = (float * ) f->GetEntryBinArea( 0x0018, 0x5212 ); 
>   but the data is all garbage in there.  what am I doing wrong?
>   Thanks for the help in advance.
>  
> Neerav Patel
>  
=============================================================================
Hi, Neerav.

When I look (with gdcm PrintFIle) at the header of the image you sent 
me, I can see the following :
(It matches perfectly with what you see with your tool)

When I display the image with gdcm 'vtkgdcmViewer2', the image looks 
good (white is dispayes as white, not as black)

What I don't understand is whant you do with your image :
What Dicom viewer do you use to display it?
After loading the pixels in memory (with gdcm, and your code is OK) , 
what do you with them?

Note :  Data Element 0x0018, 0x5212 has not any interest for displaying 
the pixels...

Jean-Pierre Roux


[jpr at ei-jpr-176 ~]$ PrintFile filein=Neerav_Patel_US001.dcm level=0
0002|0000 [UL] [Group Length] [156] =0x(009c)
0002|0001 [OB] [File Meta Information Version] [GDCM::Binary data;length 
= 2] =0x(00\01)
0002|0002 [UI] [Media Storage SOP Class UID] 
[1.2.840.10008.5.1.4.1.1.6.1 ]  ==>        [Ultrasound Image Storage]
0002|0003 [UI] [Media Storage SOP Instance UID] 
[1.2.246.352.91.0004141.20061121092559304644 ]
0002|0010 [UI] [Transfer Syntax UID] [1.2.840.10008.1.2 ]  ==>  
[Implicit VR - Little Endian]
0002|0012 [UI] [Implementation Class UID] [1.2.246.352.70.2.1.7]
0008|0008 [CS] [Image Type] [DERIVED\SECONDARY\ENDORECTAL]
0008|0016 [UI] [SOP Class UID] [1.2.840.10008.5.1.4.1.1.6.1 ]  ==>      
[Ultrasound Image Storage]
0008|0018 [UI] [SOP Instance UID] 
[1.2.246.352.91.0004141.20061121092559304644 ]
0008|0020 [DA] [Study Date] [20060918]
0008|0030 [TM] [Study Time] []
0008|0050 [SH] [Accession Number] []
0008|0060 [CS] [Modality] [US]
0008|0070 [LO] [Manufacturer] [Varian Medical Systems, Inc.]
0008|0090 [PN] [Referring Physician's Name] []
0008|1048 [PN] [Physician(s) of Record] [Mackenzie^Michael ]
0008|1090 [LO] [Manufacturer's Model Name] [VariSeed]
0010|0010 [PN] [Patient's Name] [^^0523749^t ]
0010|0020 [LO] [Patient ID] [^^0523749^t ]
0010|0030 [DA] [Patient's Birth Date] []
0010|0040 [CS] [Patient's Sex] []
0018|1020 [LO] [Software Version(s)] [7.1 ]
0018|5210 [DS] [Image Transformation Matrix (RET)] 
[1.00000000\.000000000\.000000000\.000000000\-1.00000000\.000000000]
0018|5212 [DS] [Image Translation Vector (RET)] 
[.000000000\.000000000\.000000000]
0018|6018 [UL] [Region Location Min X0] [0] =0x(0000)
0018|601a [UL] [Region Location Min Y0] [0] =0x(0000)
0018|601c [UL] [Region Location Max X1] [800] =0x(0320)
0018|601e [UL] [Region Location Max Y1] [600] =0x(0258)
0018|6020 [SL] [Reference Pixel X0] [0] =0x(0000)
0018|6022 [SL] [Reference Pixel Y0] [0] =0x(0000)
0018|6024 [US] [Physical Units X Direction] [3] =0x(03)
0018|6026 [US] [Physical Units Y Direction] [3] =0x(03)
0018|602c [FD] [Physical Delta X] [0.014735] =0x(0.014735)
0018|602e [FD] [Physical Delta Y] [0.0145483] =0x(0.0145483)
0020|000d [UI] [Study Instance UID] [1.2.246.352.91.0004141.20061121092559 ]
0020|000e [UI] [Series Instance UID] 
[1.2.246.352.91.0004141.20061121092559.1 ]
0020|0010 [SH] [Study ID] [4141]
0020|0011 [IS] [Series Number] []
0020|0013 [IS] [Instance Number] [1 ]
0020|0020 [CS] [Patient Orientation] []
0020|0052 [UI] [Frame of Reference UID] 
[1.2.246.352.91.0004141.20061121092559.1.1 ]
0020|1040 [LO] [Position Reference Indicator] []
0028|0002 [US] [Samples per Pixel] [1] =0x(01)
0028|0004 [CS] [Photometric Interpretation] [MONOCHROME2 ]
0028|0010 [US] [Rows] [600] =0x(258)
0028|0011 [US] [Columns] [800] =0x(320)
0028|0034 [IS] [Pixel Aspect Ratio] [145\147 ]
0028|0100 [US] [Bits Allocated] [8] =0x(08)
0028|0101 [US] [Bits Stored] [8] =0x(08)
0028|0102 [US] [High Bit] [7] =0x(07)
0028|0103 [US] [Pixel Representation] [0] =0x(00)
0028|1050 [DS] [Window Center] [128.000000]
0028|1051 [DS] [Window Width] [370.000000]
7fe0|0010 [OB] [Pixel Data] [GDCM::NotLoaded] (GDCM::Pixel Data to be 
loaded)

=====================================================================================

> 0002,0000,File Meta Elements Group Len=156
> 0002,0001,File Meta Info Version=256
> 0002,0002,Media Storage SOP Class UID=1.2.840.10008.5.1.4.1.1.6.1.
> 0002,0003,Media Storage SOP Inst 
> UID=1.2.246.352.91.0004141.20061121092559304644.
> 0002,0010,Transfer Syntax UID=1.2.840.10008.1.2.
> 0002,0012,Implementation Class UID=1.2.246.352.70.2.1.7
> 0008,0008,Image Type=ENDORECTAL
> 0008,0016,SOP Class UID=1.2.840.10008.5.1.4.1.1.6.1.
> 0008,0018,SOP Instance UID=1.2.246.352.91.0004141.20061121092559304644.
> 0008,0020,Study Date=20060918
> 0008,0030,Study Time=
> 0008,0050,Accession Number=
> 0008,0060,Modality=US
> 0008,0070,Manufacturer=Varian Medical Systems. Inc.
> 0008,0090,Referring Physician's Name=
> 0008,1048,?=Mackenzie.Michael
> 0008,1090,Manufacturer's Model Name=VariSeed
> 0010,0010,Patient's Name=..0523749.t
> 0010,0020,Patient ID=..0523749.t
> 0010,0030,Patient Date of Birth=
> 0010,0040,Patient Sex=
> 0018,1020,Software Version=7.1
> 0018,5210,?=1.00000000\.000000000\.000000000\.000000000\-1.00000000\.000000000
> 0018,5212,?=.000000000\.000000000\.000000000
> 0018,6018,?=0
> 0018,601A,?=0
> 0018,601C,?=800
> 0018,601E,?=600
> 0018,6020,?=0
> 0018,6022,?=0
> 0018,6024,?=3
> 0018,6026,?=3
> 0018,602C,?=4333.-..
> 0018,602E,?=........
> 0020,000D,Study Instance UID=1.2.246.352.91.0004141.20061121092559.
> 0020,000E,Series Instance UID=1.2.246.352.91.0004141.20061121092559.1.
> 0020,0010,Study ID=4141
> 0020,0011,Series Number=
> 0020,0013,Image Number=1
> 0020,0020,Patient Orientation=
> 0020,0052,Frame of Reference 
> UID=1.2.246.352.91.0004141.20061121092559.1.1.
> 0020,1040,Position Reference=
> 0028,0002,Samples Per Pixel=1
> 0028,0004,Photometric Interpretation=MONOCHROME2
> 0028,0010,Rows=600
> 0028,0011,Columns=800
> 0028,0034,Pixel Aspect Ratio=145\147
> 0028,0100,Bits Allocated=8
> 0028,0101,Bits Stored=8
> 0028,0102,High Bit=7
> 0028,0103,Pixel Representation=0
> 0028,1050,Window Center=128.000000
> 0028,1051,Window Width=370.000000
> 7FE0,0010,Pixel Data=480000
>
>
> ------------------------------------------------------------------------
> ------------------------------------------------------------------------
>
> _______________________________________________
> Dcmlib mailing list
> Dcmlib at creatis.insa-lyon.fr
> http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib



More information about the Dcmlib mailing list