<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:1673100313;
        mso-list-type:hybrid;
        mso-list-template-ids:-2013512316 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1
        {mso-list-id:1698694469;
        mso-list-type:hybrid;
        mso-list-template-ids:-130628238 441204532 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:54.0pt;
        text-indent:-18.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Hi,<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal> I’ve
tried to use the filter itk::OrientImageFilter. I’ve read a several documentation
about DICOM orientation standards, tried some source code examples and read
several emails in the mailing list without success… . My main goal
is to be able to transform the DICOM volume image that can be in any DICOM
orientation (LPS, RAS, RAI, LPI, …) to an itk Volume image always
oriented in the same way (for example LPS).<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal> I’ve
tried this code:<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal> typedef
itk::OrientedImage<dcmAPI::PixelType, 3> OrientedVolumeType;<o:p></o:p></p>
<p class=MsoNormal> typedef
itk::ImageSeriesReader< OrientedVolumeType > VolumeReader;<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal> VolumeReader::Pointer
volumeReader = VolumeReader::New();<o:p></o:p></p>
<p class=MsoNormal> itk::GDCMImageIO::Pointer
dicomIO = itk::GDCMImageIO::New();<o:p></o:p></p>
<p class=MsoNormal> volumeReader->SetImageIO(
dicomIO );<o:p></o:p></p>
<p class=MsoNormal> volumeReader->SetFileNames(
sliceFilePaths );<o:p></o:p></p>
<p class=MsoNormal> volumeReader->Update();<o:p></o:p></p>
<p class=MsoNormal> OrientedVolumeType::Pointer
volume = volumeReader->GetOutput();<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='text-indent:36.0pt'>itk::OrientImageFilter<VolumeType,VolumeType>::Pointer
orienter = itk::OrientImageFilter<VolumeType,VolumeType>::New();<o:p></o:p></p>
<p class=MsoNormal> orienter->UseImageDirectionOn();<o:p></o:p></p>
<p class=MsoNormal> orienter->SetDesiredCoordinateOrientation(
itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LPS);<o:p></o:p></p>
<p class=MsoNormal> orienter->SetInput(volume);<o:p></o:p></p>
<p class=MsoNormal> orienter->Update();<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal> It
works fine with RAI input image orientation. However, it doesn’t work for
RSA input image orientation because the output image is not in LPS orientation.
I’ve used VolView to check that the input images are correct and it works
fine: the VTK output image is always in the same orientation.<o:p></o:p></p>
<p class=MsoNormal style='text-indent:36.0pt'><o:p> </o:p></p>
<p class=MsoNormal style='text-indent:36.0pt'>I’ve also debugged a little
bit with DICOM RSA input orientation. The itk::OrientImageFilter does this
steps:<o:p></o:p></p>
<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span
lang=ES><span style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span lang=ES>RSA -> RAS. Permute Y And Z
axis<o:p></o:p></span></p>
<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span
lang=ES><span style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span lang=ES>RAS -> LAS. Flip X axis<o:p></o:p></span></p>
<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span
lang=ES><span style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span lang=ES>LAS -> LPS. Flip Y axis<o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:36.0pt'>However the output is not
correct. It seems that when input image is permuted (Y and Z axis), the orientation
of the third axis is also indirectly flipped (X). So after the permute filter,
the image orientation is not RAS, as it was expected by the filter.<o:p></o:p></p>
<p class=MsoNormal style='text-indent:36.0pt'><o:p> </o:p></p>
<p class=MsoNormal style='text-indent:36.0pt'>I was thinking to create a table
for permutation and flipping parameters depending on each orientation. However
I don’t have sample DICOM data for all the possible orientations.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='text-indent:36.0pt'>Has anybody tried this filter?
Has anybody tried RSA orientation input image? Do you know what input image
orientations have been tried?<o:p></o:p></p>
<p class=MsoNormal style='text-indent:36.0pt'><o:p> </o:p></p>
<p class=MsoNormal>Thanks!<o:p></o:p></p>
<p class=MsoNormal>Xavi<o:p></o:p></p>
</div>
</body>
</html>