<div dir="ltr">Last one question<br><br>How would you pass the itkObject to a function.<br><br>it would be great if you can add the same into the example (for future use and other novices)<br><br>Thanks very much<br><br>Jothy<br>
<br><div class="gmail_quote">On Thu, Jun 7, 2012 at 2:58 PM, Jothybasu Selvaraj <span dir="ltr">&lt;<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Excellent David!<br><br>That greatly helped to understand how to instantiate itk objects.<br><br>Thanks very much<br><br>Jothy<div><div class="h5"><br><br><div class="gmail_quote">On Thu, Jun 7, 2012 at 2:31 PM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Thu, Jun 7, 2012 at 9:05 AM, Jothybasu Selvaraj &lt;<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>&gt; wrote:<br>


&gt; Thanks!<br>
&gt;<br>
&gt; Do I need to add the below typdef declaration in .h and .cxx<br>
&gt;<br>
&gt;<br>
&gt; typedef itk::DefaultStaticMeshTraits&lt;<br>
&gt; vtkFloatingPointType, PointDimension, MaxCellDimension,<br>
&gt; vtkFloatingPointType,vtkFloatingPointType &gt;MeshTraits;<br>
&gt;<br>
&gt; typedef itk::Mesh&lt; vtkFloatingPointType,PointDimension,MeshTraits &gt;MeshType;<br>
<br>
</div>You just need the typedef to be in scope. So if you declare it in the<br>
header, and you include the header in the implementation file, you<br>
should be good to go. You&#39;ll get &quot;type undefined&quot; errors if it can&#39;t<br>
find the typedef.<br>
<div><br>
&gt; Is there any example on how to declare  and return itk objects in classes?<br>
<br>
</div>I just added this:<br>
<br>
<a href="http://www.itk.org/Wiki/ITK/Examples/Utilities/ReturnObjectFromFunction" target="_blank">http://www.itk.org/Wiki/ITK/Examples/Utilities/ReturnObjectFromFunction</a><br>
<br>
If someone else familiar with this could look at case 4 of returning a<br>
normal pointer and storing it in a smart pointer and give a better<br>
explanation of why it doesn&#39;t work, that&#39;d be great. You&#39;ll see that<br>
case 1 is the only one that works.<br>
<span><font color="#888888"><br>
David<br>
</font></span></blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr">Jothy<br></div><br>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Jothy<br></div><br>
</div>