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