Following advices from Luis Ibañez in a previous mail of the list, we now use the following rules:<div><br></div><div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">const ITKImgType *ImgIn</font>  when images are input to a method and</div>
<div><br></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">ITKImgType::Pointer &amp;ImgOut </font> when the image will be created inside the function</div><div><br></div><div>regards</div><br>
<div class="gmail_quote">2010/8/6 Dženan Zukić <span dir="ltr">&lt;<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Use ImageType::Pointer. Here is an example:<div><br></div><div><div>void calc2DJointHistogram(VisualizingImageType::Pointer x, VisualizingImageType::Pointer y, std::string savefilename)</div><div>{</div><div>...</div><div>


}</div><div><br></div><div>//calling it</div><div>VisualizingImageType::Pointer lVis, hVis;</div><div>...</div><div>hVis=hReader-&gt;GetOutput();</div><div>calc2DJointHistogram(lVis, hVis, fnNoExt+&quot;_LH.png&quot;);</div>


<div><br></div><font color="#888888"><div>Dženan</div></font><div><div></div><div class="h5"><br><div class="gmail_quote">On Fri, Aug 6, 2010 at 15:32, habibbaluwala2010 <span dir="ltr">&lt;<a href="mailto:habibbaluwala@gmail.com" target="_blank">habibbaluwala@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">

<br>
Hi Everyone,<br>
                 I am a biot confused on how can i pass an image with smart<br>
pointers to an outside function . I basically need this to avoid reproducing<br>
the code again and again and also to avoid composite filters. It would be<br>
very helpful if you can provide an example which does the job!!! Anyways<br>
looking forward to your replies.<br>
--<br>
View this message in context: <a href="http://old.nabble.com/Problem-with-passing-images-to-functions-tp29356451p29356451.html" target="_blank">http://old.nabble.com/Problem-with-passing-images-to-functions-tp29356451p29356451.html</a><br>



Sent from the ITK - Users mailing list archive at Nabble.com.<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></div></div></div>
<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>
<br></blockquote></div><br><br clear="all"><br>-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a href="http://www.alma3d.com">www.alma3d.com</a><br>
</div>