<div>Hi,</div><div>I have an application where I read a dicom series, export it to VTK and display it using vtkImageViewer2.</div><div>The problem is that when the DICOM has a gantry tilt, the exported VTK Image data doesn't have the same</div>
<div>co-ordinates at the ITK image. Specifically the image bounds are different.</div><div><br></div><div>I created a small test program which loads DICOM data and displays the ITK and VTK image info.</div><div>The output is shown below. Test_Data_A has gantry tilt while Test_Data_B doesn't.</div>
<div>As you can see from the output below, the image bounds for Test_Data_B match for ITK</div><div>and VTK while the don't for Test_Data_A. Do I have to manually apply the tilt transform</div><div>to VTK image after exporting ?</div>
<div>The test program and Data to reproduce can be download from <a href="http://somesh.be/files/testData/Test_Program_Data.tar.gz">http://somesh.be/files/testData/Test_Program_Data.tar.gz</a></div><div>I have also attached the dicom header for the first image ins the series for both data.</div>
<div>Each has 3 slices.</div><div><br></div><div>Usage: itkVtkTest DICOM_DIR</div><div><br></div><div>Output of program for Test_Data_A with gantry tilt</div><div> Opening Dicom DIR ../Test_Data_A</div><div> ITK: Image Origin <span class="Apple-tab-span" style="white-space:pre">        </span>(16.7662 , -86.2766 , -59.2801 )</div>
<div> ITK: Image Spacing <span class="Apple-tab-span" style="white-space:pre">        </span>(0.332031 , 0.332031 , 2 )</div><div> ITK: Image Dimensions <span class="Apple-tab-span" style="white-space:pre">        </span>(512 , 512 , 3 )</div>
<div> ITK: Image Bounds :</div><div> <span class="Apple-tab-span" style="white-space:pre">                </span> X :[ 16.7662 , 13.8201 ] </div><div> <span class="Apple-tab-span" style="white-space:pre">                </span> Y :[ -86.2766 , 83.4128 ] </div>
<div> <span class="Apple-tab-span" style="white-space:pre">                </span> Z :[ -59.2801 , -228.948 ] </div><div> VTK: Image Origin <span class="Apple-tab-span" style="white-space:pre">        </span>(16.7662 , -86.2766 , -59.2801 )</div>
<div> VTK: Image Spacing <span class="Apple-tab-span" style="white-space:pre">        </span>(0.332031 , 0.332031 , 2 )</div><div> VTK: Image Dimensions <span class="Apple-tab-span" style="white-space:pre">        </span>(512 , 512 , 3 )</div>
<div> VTK: Image Bounds :</div><div> <span class="Apple-tab-span" style="white-space:pre">                </span> X :[ 16.7662 , 186.434 ] </div><div> <span class="Apple-tab-span" style="white-space:pre">                </span> Y :[ -86.2766 , 83.3912 ] </div>
<div> <span class="Apple-tab-span" style="white-space:pre">                </span> Z :[ -59.2801 , -55.2801 ] </div><div><br></div><div><br></div><div>Output of program for Test_Data_B with NO gantry tilt</div><div> Opening Dicom DIR ../Test_Data_B</div>
<div> ITK: Image Origin <span class="Apple-tab-span" style="white-space:pre">        </span>(-227 , -137 , -1381.1 )</div><div> ITK: Image Spacing <span class="Apple-tab-span" style="white-space:pre">        </span>(0.855469 , 0.855469 , 1.29993 )</div>
<div> ITK: Image Dimensions <span class="Apple-tab-span" style="white-space:pre">        </span>(512 , 512 , 3 )</div><div> ITK: Image Bounds :</div><div> <span class="Apple-tab-span" style="white-space:pre">                </span> X :[ -227 , 210.145 ] </div>
<div> <span class="Apple-tab-span" style="white-space:pre">                </span> Y :[ -137 , 300.145 ] </div><div> <span class="Apple-tab-span" style="white-space:pre">                </span> Z :[ -1381.1 , -1378.5 ] </div><div> VTK: Image Origin <span class="Apple-tab-span" style="white-space:pre">        </span>(-227 , -137 , -1381.1 )</div>
<div> VTK: Image Spacing <span class="Apple-tab-span" style="white-space:pre">        </span>(0.855469 , 0.855469 , 1.29993 )</div><div> VTK: Image Dimensions <span class="Apple-tab-span" style="white-space:pre">        </span>(512 , 512 , 3 )</div>
<div> VTK: Image Bounds :</div><div> <span class="Apple-tab-span" style="white-space:pre">                </span> X :[ -227 , 210.145 ] </div><div> <span class="Apple-tab-span" style="white-space:pre">                </span> Y :[ -137 , 300.145 ] </div>
<div> <span class="Apple-tab-span" style="white-space:pre">                </span> Z :[ -1381.1 , -1378.5 ] </div><div><br></div><div>I have also posted this in VTK mailing list.</div><div><br></div><div><br></div><div>Thanks,</div><div>
Somi</div>