Hi Luis,<br><br>IMHO direction should be a 3x3 matrix, since a slice has an orientation in 3D space that for example is specified in the DICOM (DICOM also specifies Image Position too). For example, we use a cache strategy that allows us to load slices of a volume for visualization on demand. At the time of reconstructing the volume, we use this 3D direction in order to generate the volume (3D ITK image).<br>
<br>There are times that a DICOM Series mixes images with different orientation where this information would be useful. For example, there are series that consist of a reformatted volume, let&#39;s say in axial orientation, whose first image is a coronal screenshot that represents the reconstructed area of the reformatted volume that follows. It seems reasonable to me  to keep this information without having to recur to the DICOM metadata. The same argument could be applied to the image position, which is also 3D.<br>
<br>But probably there are other considerations, such as the Analyze format you mention and other requirement or implementation issues that I am not aware of.<br><br>In any case, thanks in advance for looking into this.<br>
<br>Iván<br><br><br><div class="gmail_quote">2009/2/22 Luis Ibanez <span dir="ltr">&lt;<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi Ivan,<br>
<br>
Thanks for pointing this out,<br>
and thanks for sharing your images.<br>
<br>
<br>
As described in the bug report, the offending code is in the<br>
ImageFileReader.<br>
<br>
We are looking at options that would result in a reasonable<br>
behavior.<br>
<br>
The challenge is that:<br>
<br>
<br>
   a) When reading 3D Direction cosines into a 2D image,<br>
      we only keep a 2x2 matrix. This matrix doesn&#39;t really<br>
      map to 3D space<br>
<br>
   b) The current code manually modify the matrices to<br>
      satisfy the restrictions of the Analyze file format,<br>
      but it doesn&#39;t address all the cases<br>
<br>
   c) The naive solution of setting the directions to an<br>
      identiy will result in an orientation that is not<br>
      supported by Analyze.<br>
<br>
<br>
We are looking into this...<br>
<br>
<br>
   Thanks<br>
<br>
<br>
      Luis<br>
<br>
<br>
------------------<br>
Ivan Macia wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
Hi Luis, all,<br>
<br>
I dont know if this could be an outstanding issue or we are doing something wrong but for us it is. Since version ITK-3.10 and on, we are not able to load ANY coronal or sagittal slice with a simple itk::ImageFileReader for a 2D image. An exception is always thrown in itk::ImageBase::ComputeIndexToPhysicalPointMatrices() complaining about the direction matrix being singular. This prevents us to switch to ITK-3.10 or future ITK-3.12 since our ITK-based software stopped working correctly.<br>

<br>
This was posted in the developers list some time ago but unfortunately got no answer this time :(<br>
See detailed description here.<br>
<br>
<a href="http://public.kitware.com/Bug/view.php?id=8470" target="_blank">http://public.kitware.com/Bug/view.php?id=8470</a><br>
<br>
Can anyone please try to reproduce this error? You may used attached Dicom files to this email, one is coronal and one is sagittal. I tried with ImageReadWrite example in ITK-3.10.1. This works in ITK-3.8.0.<br>
I have set ITK_USE_ORIENTED_IMAGE_DIRECTION ON in CMake, but I think this should still work with this setting isn&#39;t it?<br>
<br>
Thanks in advance for your help<br>
<br>
Ivan<br>
<br>
<br>
<br></div>
2009/2/20 Luis Ibanez &lt;<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a> &lt;mailto:<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>&gt;&gt;<div class="im">
<br>
<br>
<br>
    Just to let you know that the release of ITK 3.12<br>
    is scheduled for Feb 28.<br>
<br>
    During the following week we will be cleaning up<br>
    the Dashboard.<br>
<br>
    If you see any outstanding issue,<br>
    please let us know,<br>
<br>
<br>
     Thanks<br>
<br>
<br>
      Luis<br>
<br>
<br>
    _____________________________________<br></div>
    Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> &lt;<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>&gt;<div class="im"><br>
<br>
    Visit other Kitware open-source projects at<br>
    <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
    Please keep messages on-topic and check the ITK FAQ at:<br>
    <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
    Follow this link to subscribe/unsubscribe:<br>
    <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
<br>
</div></blockquote>
</blockquote></div><br>