[Insight-users] function arguments
Luis Ibanez
luis.ibanez at kitware.com
Mon Dec 21 19:22:30 EST 2009
Hi Jesus,
You may want to take a look at the following Tutorial:
"Integrating ITK with your Application"
http://www.itk.org/CourseWare/Training/GettingStarted-V.pdf
It shows you how to create functions
that receive ITK images.
Other Tutorials are available at:
http://www.itk.org/ITK/help/tutorials.html
Please let us know if you find any problems,
Thanks
Luis
-------------------------------------------------------------------------
On Tue, Dec 15, 2009 at 8:11 AM, Mario Ceresa <mrceresa at gmail.com> wrote:
> Hello Jesus,
> please don't send me private mail. Reply to the entire list instead so
> that other people with the same problem may follow the discussion.
>
> Probably your best bet is to rely on SmartPointers as they are used
> everywhere in ITK and provides automatic memory management.
>
> But I can be wrong! And maybe someone else in the list has a better idea :)
>
> Mario
>
> 2009/12/15 Jesus Piairo <jp.ineb.dsi at gmail.com>:
>> Hello Mario!!
>>
>> Thank you very much for your help!! I´m testing right now the code.
>>
>> I have another question: instead of pointers it´s possible to use
>> references???
>>
>> Regards!!
>>
>> JP
>>
>> On Tue, Dec 15, 2009 at 11:05 AM, Mario Ceresa <mrceresa at gmail.com> wrote:
>>>
>>> Hello Jesus,
>>> If you always want to use a given image type (such as itk::Image<
>>> float, 3 > ) then you can pass the image as a pointer. You'll find an
>>> example attached.
>>>
>>> On the other hand, if you want to encapsulate your code into something
>>> you can apply to various image types, then you want to create a filter
>>> and use template programming. You can look at the developer section of
>>>
>>> http://www.itk.org/ItkSoftwareGuide.pdf
>>>
>>> to learn how.
>>>
>>> Hope this helps,
>>>
>>> Mario
>>>
>>> 2009/12/14 Jesus Piairo <jp.ineb.dsi at gmail.com>:
>>> > Hello!!
>>> >
>>> > I´m trying to reorganize my code using functions but i´m having problems
>>> > with the arguments for the functions.
>>> >
>>> > I have 2 functions: main function and filtroGauss
>>> >
>>> > In main function a read an image from a file;
>>> >
>>> > In filtroGaus function i want to aply an gaussian filter, the argument
>>> > should be the image that was read in main function.
>>> >
>>> > How can I do this correctly??
>>> >
>>> > Thkns in advance!
>>> >
>>> > Regards.
>>> >
>>> > JP
>>> > _____________________________________
>>> > 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
>>> >
>>> >
>>
>>
> _____________________________________
> 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
>
More information about the Insight-users
mailing list