[Insight-users] Different Image bounds ITK-VTK Image Export
somi
seesomi at gmail.com
Tue Sep 18 14:43:31 EDT 2012
Hi,
I have an application where I read a dicom series, export it to VTK and
display it using vtkImageViewer2.
The problem is that when the DICOM has a gantry tilt, the exported VTK
Image data doesn't have the same
co-ordinates at the ITK image. Specifically the image bounds are different.
I created a small test program which loads DICOM data and displays the ITK
and VTK image info.
The output is shown below. Test_Data_A has gantry tilt while Test_Data_B
doesn't.
As you can see from the output below, the image bounds for Test_Data_B
match for ITK
and VTK while the don't for Test_Data_A. Do I have to manually apply the
tilt transform
to VTK image after exporting ?
The test program and Data to reproduce can be download from
http://somesh.be/files/testData/Test_Program_Data.tar.gz
I have also attached the dicom header for the first image ins the series
for both data.
Each has 3 slices.
Usage: itkVtkTest DICOM_DIR
Output of program for Test_Data_A with gantry tilt
Opening Dicom DIR ../Test_Data_A
ITK: Image Origin (16.7662 , -86.2766 , -59.2801 )
ITK: Image Spacing (0.332031 , 0.332031 , 2 )
ITK: Image Dimensions (512 , 512 , 3 )
ITK: Image Bounds :
X :[ 16.7662 , 13.8201 ]
Y :[ -86.2766 , 83.4128 ]
Z :[ -59.2801 , -228.948 ]
VTK: Image Origin (16.7662 , -86.2766 , -59.2801 )
VTK: Image Spacing (0.332031 , 0.332031 , 2 )
VTK: Image Dimensions (512 , 512 , 3 )
VTK: Image Bounds :
X :[ 16.7662 , 186.434 ]
Y :[ -86.2766 , 83.3912 ]
Z :[ -59.2801 , -55.2801 ]
Output of program for Test_Data_B with NO gantry tilt
Opening Dicom DIR ../Test_Data_B
ITK: Image Origin (-227 , -137 , -1381.1 )
ITK: Image Spacing (0.855469 , 0.855469 , 1.29993 )
ITK: Image Dimensions (512 , 512 , 3 )
ITK: Image Bounds :
X :[ -227 , 210.145 ]
Y :[ -137 , 300.145 ]
Z :[ -1381.1 , -1378.5 ]
VTK: Image Origin (-227 , -137 , -1381.1 )
VTK: Image Spacing (0.855469 , 0.855469 , 1.29993 )
VTK: Image Dimensions (512 , 512 , 3 )
VTK: Image Bounds :
X :[ -227 , 210.145 ]
Y :[ -137 , 300.145 ]
Z :[ -1381.1 , -1378.5 ]
I have also posted this in VTK mailing list.
Thanks,
Somi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120918/2c35751f/attachment.htm>
-------------- next part --------------
0008,0005 * Specific Character Set CS [ 10 bytes] ISO_IR 100
0008,0008 * Image Type CS [ 38 bytes] DERIVED\SECONDARY\REFORMATTED\AVERAGE
0008,0012 * Instance Creation Date DA [ 8 bytes] 20120911
0008,0013 * Instance Creation Time TM [ 6 bytes] 094316
0008,0016 * SOP Class UID UI [ 26 bytes] 1.2.840.10008.5.1.4.1.1.2
0008,0018 * SOP Instance UID UI [ 50 bytes] 1.2.840.113619.2.80.1943250916.23991.1347374596.10...
0008,0020 * Study Date DA [ 8 bytes] 20120911
0008,0021 * Series Date DA [ 8 bytes] 20120911
0008,0022 * Acquisition Date DA [ 8 bytes] 20120911
0008,0023 * Image Date DA [ 8 bytes] 20120911
0008,0030 * Study Time TM [ 6 bytes] 093259
0008,0031 * Series Time TM [ 6 bytes] 094314
0008,0032 * Acquisition Time TM [ 14 bytes] 093543.342370
0008,0033 * Image Time TM [ 6 bytes] 094316
0008,0050 * Accession Number SH [ 8 bytes] 6428434
0008,0060 * Modality CS [ 2 bytes] CT
0008,0070 * Manufacturer LO [ 18 bytes] GE MEDICAL SYSTEMS
0008,0080 * Institution Name LO [ 6 bytes] ANNOYN
0008,0090 * Referring Physician PN [ 6 bytes] ANNOYN
0008,1010 * Station Name SH [ 6 bytes] ANNOYN
0008,1030 * Study Description LO [ 6 bytes] ANNOYN
0008,103E * Series Description LO [ 6 bytes] ANNOYN
0008,1050 * Performing Physician's Name PN [ 4 bytes] ^^^^
0008,1070 * Operator's Name PN [ 6 bytes] ANNOYN
0008,1090 * Manufacturer's Model Name LO [ 12 bytes] BrightSpeed
0010,0010 * Patient's Name PN [ 6 bytes] ANNOYN
0010,0020 * Patient ID LO [ 6 bytes] ANNOYN
0010,0030 * Patient's Birthdate DA [ 6 bytes] ANNOYN
0010,0040 * Patient's Sex CS [ 6 bytes] ANNOYN
0010,1000 U General, but not defined. -- [ 0 bytes]
0010,1010 * Patient's Age AS [ 6 bytes] ANNOYN
0010,1020 * Patient's Size DS [ 6 bytes] ANNOYN
0018,0022 * Scan Options CS [ 12 bytes] HELICAL MODE
0018,0050 * Slice Thickness (mm) DS [ 2 bytes] 2
0018,0060 * Peak kilovolts DS [ 4 bytes] 120
0018,0090 * Data Collection Diameter DS [ 10 bytes] 500.000000
0018,1016 U General, but not defined. -- [ 18 bytes]
0018,1018 U General, but not defined. -- [ 14 bytes]
0018,1019 U General, but not defined. -- [ 6 bytes]
0018,1020 * Software Version(s) LO [ 6 bytes] mach.4
0018,1030 * Protocol Name LO [ 6 bytes] ANNOYN
0018,1110 * Distance Source to Detector DS [ 10 bytes] 949.075000
0018,1111 * Distance Source to Patient DS [ 10 bytes] 541.000000
0018,1130 * Table Height DS [ 10 bytes] 123.000000
0018,1140 * Rotation Detection CS [ 2 bytes] CW
0018,1150 * Exposure Time IS [ 4 bytes] 478
0018,1151 * X-ray Tube Current IS [ 4 bytes] 437
0018,1152 * Exposure IS [ 2 bytes] 9
0018,1160 * Filter Type SH [ 12 bytes] BODY FILTER
0018,1170 * Generator Power IS [ 6 bytes] 52800
0018,1190 * Focal Spot(s) DS [ 8 bytes] 1.200000
0018,1210 * Convolution Kernel SH [ 4 bytes] BONE
0018,5100 * Patient Postiton CS [ 4 bytes] FFS
0020,000D * Study Instance UID UI [ 36 bytes] 2.16.840.1.113669.16.1.1.706.6428434
0020,000E * Series Instance UID UI [ 54 bytes] 1.2.840.113619.2.80.1943250916.23991.1347374594.1.4.1...
0020,0010 * Study ID SH [ 4 bytes] 5852
0020,0011 * Series Number IS [ 4 bytes] 400
0020,0012 * Acquistion Number IS [ 2 bytes] 1
0020,0013 * Image Number IS [ 2 bytes] 9
0020,0032 * Image Position (Patient) DS [ 38 bytes] 12.76631355\-86.25180054\-59.28007507
0020,0037 * Image Orientation (Patient) DS [ 36 bytes] 0.006211060565\0.9999806881\0\0\0\-1
0020,0052 * Frame of Reference UID UI [ 58 bytes] 1.2.840.113619.2.278.3.17435652.946.1347312484.524.14515.5...
0020,1040 * Position Reference Indicator LO [ 2 bytes] IC
0020,1041 * Slice Location DS [ 12 bytes] 13.29425335
0028,0002 * Samples per Pixel US [ 2 bytes] 1 [0x0001]
0028,0004 * Photometric Interpretation CS [ 12 bytes] MONOCHROME2
0028,0010 * Rows XROWS [ 2 bytes] 512 [0x0200]
0028,0011 * Columns XCOLUMNS [ 2 bytes] 512 [0x0200]
0028,0030 * Pixel Spacing DS [ 26 bytes] 0.3320310116\0.3320310116
0028,0100 * Bits Allocated XBITSALLOC [ 2 bytes] 16 [0x0010]
0028,0101 * Bits Stored US [ 2 bytes] 16 [0x0010]
0028,0102 * High Bit US [ 2 bytes] 15 [0x000f]
0028,0103 * Pixel Representation US [ 2 bytes] 1 [0x0001]
0028,0120 * Pixel Padding Value US [ 2 bytes] 63536 [0xf830]
0028,1050 * Window Center DS [ 4 bytes] 500
0028,1051 * Window Width DS [ 4 bytes] 2000
0028,1052 * Rescale Intercept DS [ 6 bytes] -1024
0028,1053 * Rescale Slope DS [ 2 bytes] 1
0040,0244 U General, but not defined. -- [ 8 bytes]
0040,0245 U General, but not defined. -- [ 6 bytes]
0040,0253 * Performed Procedure Step ID SH [ 14 bytes] PPS ID 5852
0040,0254 U General, but not defined. -- [ 22 bytes]
7FE0,0010 * Pixel (Image) Data XPIXELDATA [524288 bytes] (data)
-------------- next part --------------
0008,0008 * Image Type CS [ 28 bytes] ORIGINAL\PRIMARY\AXIAL\HELIX
0008,0012 * Instance Creation Date DA [ 8 bytes] 20070111
0008,0013 * Instance Creation Time TM [ 6 bytes] 165435
0008,0016 * SOP Class UID UI [ 26 bytes] 1.2.840.10008.5.1.4.1.1.2
0008,0018 * SOP Instance UID UI [ 48 bytes] 1.2.840.113704.1.1762580556.1049.1168563275.1685...
0008,0020 * Study Date DA [ 8 bytes] 20070111
0008,0022 * Acquisition Date DA [ 8 bytes] 20070111
0008,0023 * Image Date DA [ 8 bytes] 20070111
0008,0030 * Study Time TM [ 6 bytes] 164517
0008,0032 * Acquisition Time TM [ 6 bytes] 165214
0008,0033 * Image Time TM [ 10 bytes] 165215.047
0008,0050 * Accession Number SH [ 0 bytes]
0008,0060 * Modality CS [ 2 bytes] CT
0008,0070 * Manufacturer LO [ 8 bytes] Philips
0008,0080 * Institution Name LO [ 6 bytes] ANNOYN
0008,0081 * Institution Address ST [ 6 bytes] ANNOYN
0008,0090 * Referring Physician PN [ 6 bytes] ANNOYN
0008,1010 * Station Name SH [ 6 bytes] ANNOYN
0008,1030 * Study Description LO [ 6 bytes] ANNOYN
0008,103E * Series Description LO [ 0 bytes]
0008,1040 * Institutional Department Name LO [ 16 bytes] Medical Imaging
0008,1070 * Operator's Name PN [ 0 bytes]
0008,1090 * Manufacturer's Model Name LO [ 6 bytes] Mx8000
0008,1140 * Ref. Image SEQUENCE SQ [ 98 bytes] <VR type 'SQ': no print format>
0010,0010 * Patient's Name PN [ 6 bytes] ANNOYN
0010,0020 * Patient ID LO [ 6 bytes] ANNOYN
0010,0030 * Patient's Birthdate DA [ 6 bytes] ANNOYN
0010,0040 * Patient's Sex CS [ 6 bytes] ANNOYN
0010,1010 * Patient's Age AS [ 6 bytes] ANNOYN
0018,0022 * Scan Options CS [ 6 bytes] HELIX
0018,0050 * Slice Thickness (mm) DS [ 4 bytes] 1.3
0018,0060 * Peak kilovolts DS [ 4 bytes] 140
0018,0088 * Spacing Between Slices DS [ 4 bytes] -1.3
0018,0090 * Data Collection Diameter DS [ 4 bytes] 438
0018,1020 * Software Version(s) LO [ 4 bytes] 2.64
0018,1030 * Protocol Name LO [ 6 bytes] ANNOYN
0018,1100 * Reconstruction Diameter DS [ 4 bytes] 438
0018,1120 * Gantry/Detector Tilt DS [ 2 bytes] 0
0018,1130 * Table Height DS [ 4 bytes] 125
0018,1140 * Rotation Detection CS [ 2 bytes] CW
0018,1151 * X-ray Tube Current IS [ 4 bytes] 232
0018,1152 * Exposure IS [ 4 bytes] 139
0018,1160 * Filter Type SH [ 2 bytes] B
0018,1210 * Convolution Kernel SH [ 2 bytes] B
0018,5100 * Patient Postiton CS [ 4 bytes] HFS
0020,000D * Study Instance UID UI [ 46 bytes] 1.2.840.113704.1.1762580556.1112.1168562613.11...
0020,000E * Series Instance UID UI [ 46 bytes] 1.2.840.113704.1.1762580556.9014.1168563102.13...
0020,0010 * Study ID SH [ 6 bytes] 19061
0020,0011 * Series Number IS [ 4 bytes] 5218
0020,0012 * Acquistion Number IS [ 0 bytes]
0020,0013 * Image Number IS [ 2 bytes] 1
0020,0032 * Image Position (Patient) DS [ 18 bytes] -227\-137\-1378.5
0020,0037 * Image Orientation (Patient) DS [ 12 bytes] 1\0\0\0\1\0
0020,0052 * Frame of Reference UID UI [ 46 bytes] 1.2.840.113704.1.1762580556.9014.1168562971.3...
0020,0060 * Laterality CS [ 0 bytes]
0020,1040 * Position Reference Indicator LO [ 0 bytes]
0020,1041 * Slice Location DS [ 8 bytes] -1297.5
0020,4000 * Image Comments LT [ 0 bytes] ~{u~
0028,0002 * Samples per Pixel US [ 2 bytes] 1 [0x0001]
0028,0004 * Photometric Interpretation CS [ 12 bytes] MONOCHROME2
0028,0010 * Rows XROWS [ 2 bytes] 512 [0x0200]
0028,0011 * Columns XCOLUMNS [ 2 bytes] 512 [0x0200]
0028,0030 * Pixel Spacing DS [ 22 bytes] 0.85546875\0.85546875
0028,0100 * Bits Allocated XBITSALLOC [ 2 bytes] 16 [0x0010]
0028,0101 * Bits Stored US [ 2 bytes] 12 [0x000c]
0028,0102 * High Bit US [ 2 bytes] 11 [0x000b]
0028,0103 * Pixel Representation US [ 2 bytes] 0 [0x0000]
0028,1050 * Window Center DS [ 8 bytes] 450\450
0028,1051 * Window Width DS [ 10 bytes] 2000\2000
0028,1052 * Rescale Intercept DS [ 6 bytes] -1000
0028,1053 * Rescale Slope DS [ 2 bytes] 1
7FE0,0010 * Pixel (Image) Data XPIXELDATA [524288 bytes] (data)
More information about the Insight-users
mailing list