[Insight-users] Problem with passing images to functions

Dženan Zukić dzenanz at gmail.com
Fri Aug 6 09:47:42 EDT 2010


Use ImageType::Pointer. Here is an example:

void calc2DJointHistogram(VisualizingImageType::Pointer x,
VisualizingImageType::Pointer y, std::string savefilename)
{
...
}

//calling it
VisualizingImageType::Pointer lVis, hVis;
...
hVis=hReader->GetOutput();
calc2DJointHistogram(lVis, hVis, fnNoExt+"_LH.png");

Dženan

On Fri, Aug 6, 2010 at 15:32, habibbaluwala2010 <habibbaluwala at gmail.com>wrote:

>
> Hi Everyone,
>                 I am a biot confused on how can i pass an image with smart
> pointers to an outside function . I basically need this to avoid
> reproducing
> the code again and again and also to avoid composite filters. It would be
> very helpful if you can provide an example which does the job!!! Anyways
> looking forward to your replies.
> --
> View this message in context:
> http://old.nabble.com/Problem-with-passing-images-to-functions-tp29356451p29356451.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100806/ff592f11/attachment.htm>


More information about the Insight-users mailing list