[Insight-users] function arguments
Mario Ceresa
mrceresa at gmail.com
Tue Dec 15 08:11:05 EST 2009
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
>> >
>> >
>
>
More information about the Insight-users
mailing list