On 2/1/08, <b class="gmail_sendername">Simon Warfield</b> &lt;<a href="mailto:simon.warfield@childrens.harvard.edu">simon.warfield@childrens.harvard.edu</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>The problem is that itk::Image inherits an API from itk::ImageBase to<br>store and manipulate Directions, just like an OrientedImage,<br>but doesn&#39;t act on them.&nbsp;&nbsp;It is particularly confusing for new users -<br>what developer would expect us to design an image class that has<br>
directions but ignores them ?</blockquote><div><br>I agree. It would have been great if itk::Image was an OrientedImage to start from, but that isn&#39;t the case. The fact remains that itk::Image is the predominant way to represent images ion in ITK.&nbsp; <br>
<br>Direction in itk::ImageBase should simply be treated as MetaData.&nbsp; It is present in the superclass so as to preserve this meta-data, so that direction information can be propagated through the pipeline. A ImageWriter or filter that deems it fit to use the direction info uses it, while several others ignore it. Please see<br>
<br>&nbsp;&nbsp; itk::ImageBase::CopyInformation(...)<br><br>OrientedImage is one of the subclasses that uses the direction information correctly. Filters that operate on OrientedImage should take the direction cosines into consideration. <br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">ImageAdaptor now supports the correct storing and passing of direction<br>information,&nbsp;&nbsp;but inherits the transforming of physical indexes from the<br>
base image type.&nbsp;&nbsp;If the base image type is OrientedImage then direction<br>information is utilized, and physical coordinates can be used correctly.<br> However, a VectorImageToImageAdaptor&nbsp;</blockquote><div>&nbsp;</div>VectorImageToImageAdaptor, like ImageAdaptor simply needs to override the SetDirection and
GetDirection methods from itk::ImageBase and delegate the
responsibility to the image its provide facade to. Is that right ?&nbsp; I&#39;ll
commit the fix.<br><br>Thanks<br>--<br>karthik<br></div>