<html>

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<meta name=Generator content="Microsoft Word 10 (filtered)">

<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {margin-right:0cm;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle21
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-GB link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi All </span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I am having a bit of difficulty displaying
an image from a DICOM RT Image file. I can probably work around it but I'm
not sure if I should have too. </span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>My issue is as follows:</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>DICOM RT Image pixel data is stored
starting at the top left hand corner of the image then rastered right and down
with the last pixel in the sequence being the bottom right hand pixel. The
origin of the image is the top left corner of the image. So far this is pretty
much the same as axial </span></font><font size=2 color=navy face=Arial><span
  style='font-size:10.0pt;font-family:Arial;color:navy'>DICOM CT</span></font><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> images. For DICOM RT Images however the co-ordinate system:
Positive X left to right, positive Y bottom to top - i.e. the image data
is sent with decreasing Y values. So if I use the ITK stuff and set the origin
of the image according to the origin which is specified in the original file
then the image comes out mirrored vertically about the horizontal line through
the specified origin. </span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Does all that make any sense. For example
an image of width, height of 512,512 and origin -256,256 and pixel size 1mm is
actually centred on the origin. </span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Any ideas how I can easily handle this mirroring.</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>thanks</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<div>

<p style='margin:0cm;margin-bottom:.0001pt'><b><font size=2 color=navy
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:navy;
font-weight:bold'>Andrew Hoole </span></font></b></p>

<p style='margin:0cm;margin-bottom:.0001pt'><font size=2 color=navy
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:navy'>-------------------------------------------------------------------------</span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt'><font size=2 color=navy
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:navy'>Medical
Physics, Box 152 </span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt'><font size=2 color=navy
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:navy'>Cambridge
University Hospitals NHS Trust<br>
Addenbrooke's Hospital</span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt'><font size=2 color=navy
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:navy'>Hills
Rd</span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt'><font size=2 color=navy
  face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:navy'>Cambridge</span></font><font
size=2 color=navy face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
color:navy'> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tel: (+44)
(0)1223-216544</span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt'><font size=2 color=navy
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:navy'>CB2
2QQ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fax: (+44)
(0)1223-257137</span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt'><font size=2 color=navy
  face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:navy'>UK</span></font><font
size=2 color=navy face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
color:navy'> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Email:
andrew.hoole@addenbrookes.nhs.uk</span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt'><font size=2 color=navy
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:navy'>--------------------------------------------------------------------------</span></font></p>

<p><font size=1 color=navy face=Tahoma><span style='font-size:8.0pt;font-family:
Tahoma;color:navy'>The information contained in this EMAIL and any attachments
is confidential and intended solely for the attention and use of the intended
recipient. If you are not the intended recipient and have received this email
in error you may not disclose, copy, distribute or retain this message or any
part of it.<br>
See </span></font><u><font size=1 color=blue face=Tahoma><span
style='font-size:8.0pt;font-family:Tahoma;color:blue'>Email disclaimer &lt;</span></font></u><font
size=1 color=navy face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;
color:navy'><a href="http://www.addenbrookes.org.uk/email_disclaimer.html">http://www.addenbrookes.org.uk/email_disclaimer.html</a></span></font><u><font
size=1 color=blue face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;
color:blue'>&gt;</span></font></u></p>

</div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Tahoma><span
lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>-----Original
Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> </span></font><font size=2
 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>Bill
 Lorensen</span></font><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma'> [mailto:bill.lorensen@gmail.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><font size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>01
 June 2006</span></font><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma'> </span></font><font
 size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>18:03</span></font><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'><br>
<b><span style='font-weight:bold'>To:</span></b> </span></font><font size=2
 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>Hoole,
 Andrew</span></font><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma'><br>
<b><span style='font-weight:bold'>Cc:</span></b> insight insight<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Insight-users]
Reading Dicom files</span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;</span></font></p>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Andrew,</span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>You can still get at this
information. We store all dicom tags in the meta data dictionary for the image.
Look at the dicom processing examples in Examples/IO to see how to get the meta
data dictionary. Once you have it, you can use the ExposeMetaData method to get
the values for a given tag. </span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;</span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Bill<br>
<br>
&nbsp;</span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><span class=gmailquote><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>On </span></font></span><span class=gmailquote>6/1/06</span><span class=gmailquote>, <b><span style='font-weight:
bold'>Hoole, Andrew</span></b> &lt;<a
href="mailto:andrew.hoole@addenbrookes.nhs.uk">andrew.hoole@addenbrookes.nhs.uk</a>&gt;
wrote:</span> </p>

<div>

<div vlink=blue link=blue>

<div>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Hi Bill </span></font></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>The image which I have
been using is a DRR from our planning system - RTImage modality. I have looked
in the DICOM and the spacing is in (0x3002,0x0011) and the position is in&nbsp;
(0x3002,0x0012). This is probably the issue - it handles normal images not DICOM
RT images. </span></font></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<div>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:
.0001pt'><b><font size=2 color=navy face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;color:navy;font-weight:bold'>Andrew Hoole </span></font></b></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:
.0001pt'><font size=2 color=navy face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;color:navy'>-------------------------------------------------------------------------</span></font>
</p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:
.0001pt'><font size=2 color=navy face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;color:navy'>Medical Physics, Box 152 </span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:
.0001pt'><font size=2 color=navy face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;color:navy'>Cambridge University Hospitals NHS Trust<br>
Addenbrooke's Hospital</span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:
.0001pt'><font size=2 color=navy face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;color:navy'>Hills Rd</span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:
.0001pt'><font size=2 color=navy face=Tahoma><span style='font-size:10.0pt;
  font-family:Tahoma;color:navy'>Cambridge</span></font><font size=2
color=navy face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
color:navy'> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tel: (+44)
(0)1223-216544</span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:
.0001pt'><font size=2 color=navy face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;color:navy'>CB2 2QQ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Fax: (+44) (0)1223-257137</span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:
.0001pt'><font size=2 color=navy face=Tahoma><span style='font-size:10.0pt;
  font-family:Tahoma;color:navy'>UK</span></font><font size=2 color=navy
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:navy'>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Email: <a href="mailto:andrew.hoole@addenbrookes.nhs.uk" target="_blank"
onclick="return top.js.OpenExtLink(window,event,this)">andrew.hoole@addenbrookes.nhs.uk</a></span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:
.0001pt'><font size=2 color=navy face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;color:navy'>--------------------------------------------------------------------------</span></font>
</p>

<p style='margin-left:36.0pt'><font size=1 color=navy face=Tahoma><span
style='font-size:8.0pt;font-family:Tahoma;color:navy'>The information contained
in this EMAIL and any attachments is confidential and intended solely for the
attention and use of the intended recipient. If you are not the intended
recipient and have received this email in error you may not disclose, copy,
distribute or retain this message or any part of it. <br>
See </span></font><u><font size=1 color=blue face=Tahoma><span
style='font-size:8.0pt;font-family:Tahoma;color:blue'>Email disclaimer &lt;</span></font></u><font
size=1 color=navy face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;
color:navy'> <a href="http://www.addenbrookes.org.uk/email_disclaimer.html"
target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.addenbrookes.org.uk/email_disclaimer.html</a></span></font><u><font
size=1 color=blue face=Tahoma><span style='font-size:7.5pt;font-family:Tahoma;
color:blue'> </span></font></u><u><font size=1 color=blue face=Tahoma><span
style='font-size:8.0pt;font-family:Tahoma;color:blue'>&gt;</span></font></u></p>

</div>

</div>

<div><span id="q_10b908103836b4f2_3">

<p style='margin-left:72.0pt'><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> Bill Lorensen [mailto: <a
href="mailto:bill.lorensen@gmail.com" target="_blank"
onclick="return top.js.OpenExtLink(window,event,this)">bill.lorensen@gmail.com</a>]
<br>
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><font size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>01
 June 2006</span></font><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma'> </span></font><font
 size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>17:35</span></font><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'><br>
<b><span style='font-weight:bold'>To:</span></b> Hoole, Andrew <br>
<b><span style='font-weight:bold'>Cc:</span></b> <a
href="mailto:insight-users@itk.org" target="_blank"
onclick="return top.js.OpenExtLink(window,event,this)">insight-users@itk.org</a><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Insight-users]
Reading Dicom files</span></font></p>

<p style='margin-left:72.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>&nbsp;</span></font></p>

<div>

<p style='margin-left:72.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Andrew,</span></font></p>

</div>

<div>

<p style='margin-left:72.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>&nbsp;</span></font></p>

</div>

<div>

<p style='margin-left:72.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>The reader does read the pixel spacing and origin.
What is the source of your dicom images?</span></font></p>

</div>

<div>

<p style='margin-left:72.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>&nbsp;</span></font></p>

</div>

<div>

<p style='margin-left:72.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Bill<br>
<br>
&nbsp;</span></font></p>

</div>

<div>

<p style='margin-left:72.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On </span></font>6/1/06, <b><span style='font-weight:bold'>Hoole, Andrew</span></b> &lt;<a
href="mailto:andrew.hoole@addenbrookes.nhs.uk" target="_blank"
onclick="return top.js.OpenExtLink(window,event,this)">
andrew.hoole@addenbrookes.nhs.uk</a>&gt; wrote: </p>

<div>

<div vlink=purple link=blue>

<div>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>Hi All</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>I'm new to the ITK stuff and having
been working through the User guide. I have used the code in the guide to read
a DICOM file and display it in a window. When I read the file it doesn't appear
to read the information related to the pixel size or the origin of the image.
This information is embedded in the DICOM is there a way to make the reader get
this data or is the problem with the image which I hook onto the output of the
reader. The code I am using is as follows: </span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
typedef signed short InputPixelType;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
const unsigned int&nbsp;&nbsp; InputDimension = 2;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
typedef itk::Image&lt; InputPixelType, InputDimension &gt; InputImageType;</span></font><span
lang=EN-US> </span></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
typedef itk::ImageFileReader&lt; InputImageType &gt; ReaderType;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ReaderType::Pointer reader = ReaderType::New();</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
reader-&gt;SetFileName(&quot;c:\\temp\\test.dcm&quot;);</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
typedef itk::GDCMImageIO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;ImageIOType;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ImageIOType::Pointer gdcmImageIO = ImageIOType::New();</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp; </span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
reader-&gt;SetImageIO( gdcmImageIO );</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
try {</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
reader-&gt;Update();</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } </span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
catch (itk::ExceptionObject &amp; e){</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
AfxMessageBox(&quot;Exception in file reader &quot;,MB_OK,NULL);</span></font><span
lang=EN-US> </span></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
typedef itk::Point&lt; double, InputImageType::ImageDimension &gt; PointType;</span></font><span
lang=EN-US> </span></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
PointType point;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
InputImageType::IndexType pixelIndex;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
InputImageType::PixelType pixelValue;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
InputImageType::Pointer image = reader-&gt;GetOutput();</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
InputImageType::SpacingType spacing;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
spacing[0] = 0.5; // spacing along X</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
spacing[1] = 0.5; // spacing along Y</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
image-&gt;SetSpacing( spacing );</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
InputImageType::PointType origin;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
origin[0] = -128.0; // coordinates of the</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
origin[1] = -128.0; // first pixel in N-D</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
image-&gt;SetOrigin( origin
);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>As you can see I am manually setting
the pixel size and origin which is not ideal. </span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>Regards</span></font></p>

<p style='margin-left:72.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:72.0pt;margin-bottom:
.0001pt'><b><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:
Tahoma;font-weight:bold'>Andrew Hoole </span></font></b></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:72.0pt;margin-bottom:
.0001pt'><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:
Tahoma'>-------------------------------------------------------------------------
</span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:72.0pt;margin-bottom:
.0001pt'><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:
Tahoma'>Medical Physics, Box 152 </span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:72.0pt;margin-bottom:
.0001pt'><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:
Tahoma'>Cambridge University Hospitals NHS Trust<br>
Addenbrooke's Hospital </span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:72.0pt;margin-bottom:
.0001pt'><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:
Tahoma'>Hills Rd</span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:72.0pt;margin-bottom:
.0001pt'><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:
  Tahoma'>Cambridge</span></font><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tel: (+44) (0)1223-216544 </span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:72.0pt;margin-bottom:
.0001pt'><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:
Tahoma'>CB2 2QQ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Fax: (+44) (0)1223-257137</span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:72.0pt;margin-bottom:
.0001pt'><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:
  Tahoma'>UK</span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Email: <a href="mailto:andrew.hoole@addenbrookes.nhs.uk" target="_blank"
onclick="return top.js.OpenExtLink(window,event,this)">andrew.hoole@addenbrookes.nhs.uk</a></span></font></p>

<p style='margin-right:0cm;margin-bottom:0cm;margin-left:72.0pt;margin-bottom:
.0001pt'><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:
Tahoma'>--------------------------------------------------------------------------
</span></font></p>

<p style='margin-left:72.0pt'><font size=1 face=Tahoma><span style='font-size:
8.0pt;font-family:Tahoma'>The information contained in this EMAIL and any
attachments is confidential and intended solely for the attention and use of
the intended recipient. If you are not the intended recipient and have received
this email in error you may not disclose, copy, distribute or retain this
message or any part of it. <br>
See <u><font color=blue><span style='color:blue'>Email disclaimer &lt;</span></font></u><a
href="http://www.addenbrookes.org.uk/email_disclaimer.html" target="_blank"
onclick="return top.js.OpenExtLink(window,event,this)">
http://www.addenbrookes.org.uk/email_disclaimer.html</a><u><font color=blue><span
style='color:blue'>&gt;</span></font></u></span></font></p>

<p style='margin-left:72.0pt'><font size=3 face="Times New Roman"><span
lang=EN-US style='font-size:12.0pt'>&nbsp;</span></font></p>

</div>

</div>

</div>

<p style='margin-right:0cm;margin-bottom:12.0pt;margin-left:72.0pt'><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'><br>
_______________________________________________<br>
Insight-users mailing list<br>
<a href="mailto:Insight-users@itk.org" target="_blank"
onclick="return top.js.OpenExtLink(window,event,this)">Insight-users@itk.org</a><br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank"
onclick="return top.js.OpenExtLink(window,event,this)">http://www.itk.org/mailman/listinfo/insight-users</a></span></font></p>

</div>

<p style='margin-left:72.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>&nbsp;</span></font></p>

</div>

</div>

</div>

</div>

</span>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;</span></font></p>

</div>

</body>

</html>