On 3/22/07, <b class="gmail_sendername">Ranjan, Sohan (GE, Research)</b> <<a href="mailto:sohan.ranjan@ge.com">sohan.ranjan@ge.com</a>> 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;">
<div>
<div dir="ltr" align="left"><font face="GE Inspira" size="2"><span>Sorry folks. I typed in some terms things wrong. Here
is the actually what I want to say:</span></font></div><span class="q">
<div dir="ltr" align="left"><font face="GE Inspira" size="2"><span></span></font> </div>
<div><font face="GE Inspira" size="2"><span>As I
understand, the ResampleImageFilter makes call to the TransformPoint
</span></font></div>
<div><font face="GE Inspira" size="2"><span>method at
every point. Is it really needed? Essentially, one needs to make call
</span></font></div>
<div><font face="GE Inspira" size="2"><span>only once
with input vector elements being the spacings. The result would
give</span></font></div></span>
<div><font face="GE Inspira" size="2"><span>deformation
at every point. </span></font></div></div></blockquote><div><br>This is true for a very specific set of transforms, such as the TranslationTransform, IdentityTransform, isn't it ? It isn't true for affine, rotation, kernel transforms etc..
<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;"><div><div><font face="GE Inspira" size="2"><span>Based on this, even the <span>
interpolation</span> may be speeded
</span></font></div>
<div><font face="GE Inspira" size="2"><span>up because,
say for example in linear <span>interpolation</span>, the co-efficients need to
be</span></font></div><span class="q">
<div><font face="GE Inspira" size="2"><span>computed only
once.</span></font></div></span></div></blockquote><div><br>This is true only for the Linear and NN interpolators, with the additional constraint that you're using them with the aforementioned set of transforms.<br><br>
Unfortunately "itk::Transform::TransformPoint" cannot be inlined, since its a virtual function. So the speedup you're looking for is probably a dynamic_cast to check for the right combination of transform/interpolator in the ResampleFilter and dump the code in there...
<br><br>There will always be a clash between generic programming allowing you to plug your own transform/interpolator and a specialized optimized versions :)<br><br>--<br>karthik<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;">
<div><span class="q"><div><font face="GE Inspira" size="2"><span> Am I right? If so, Is it already implmented and I am out
of</span></font></div>
<div><font face="GE Inspira" size="2"><span>luck?</span></font></div>
<div><font face="GE Inspira" size="2"><span></span></font> </div>
<div><font face="GE Inspira" size="2"><span></span></font> </div>
<div><font face="GE Inspira" size="2"><span><span>Sohan</span></span></font></div></span></div>
</blockquote></div><br><br>