<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"><<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>></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"><<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>></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 <<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>> wrote:<br>
> Thanks!<br>
><br>
> Do I need to add the below typdef declaration in .h and .cxx<br>
><br>
><br>
> typedef itk::DefaultStaticMeshTraits<<br>
> vtkFloatingPointType, PointDimension, MaxCellDimension,<br>
> vtkFloatingPointType,vtkFloatingPointType >MeshTraits;<br>
><br>
> typedef itk::Mesh< vtkFloatingPointType,PointDimension,MeshTraits >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'll get "type undefined" errors if it can't<br>
find the typedef.<br>
<div><br>
> 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't work, that'd be great. You'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>