SplineInterpType *subclassRawPointer = dynamic_cast&lt;SplineInterpType *&gt;(interpolator.GetPointer());<br>subclass-&gt;SetSplineOrder(3);<br><br>SplineInterpType::Pointer subclassSmartPointer = subclass;<br><br><br><div class="gmail_quote">
On Wed, Nov 11, 2009 at 6:12 AM, Lodron, Gerald <span dir="ltr">&lt;<a href="mailto:Gerald.Lodron@joanneum.at">Gerald.Lodron@joanneum.at</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
Can anybody tell me what the conventional way is to cast a smartpointer?<br>
<br>
typedef typename itk::InterpolateImageFunction&lt;ImageType,double&gt; InterpType;<br>
typedef typename itk::BSplineInterpolateImageFunction&lt;ImageType, double, double&gt; SplineInterpType;<br>
<br>
<br>
InterpType::Pointer interpolator;<br>
<br>
interpolator = SplineInterpType::New();<br>
dynamic_cast&lt;SplineInterpType::Pointer&gt;(interpolator)-&gt;SetSplineOrder(3);      //does not work<br>
<br>
<br>
Best regards<br>
<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><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>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.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>
</blockquote></div><br><br clear="all"><br>