[ITK-users] Pointers and New()

Matt McCormick matt.mccormick at kitware.com
Fri Oct 24 10:56:17 EDT 2014


Hi Abdul,

Welcome to ITK!

Yes, we always want to use ::New(), which returns ITK SmartPointer's
[1] since this is used by the reference count kept in all ITK Object's
[2]. This is described in more detail in the ITK Software Guide [3].

Hope this helps,
Matt

[1] http://www.itk.org/Doxygen/html/classitk_1_1SmartPointer.html

[2] http://www.itk.org/Doxygen/html/classitk_1_1Object.html

[3] http://itk.org/ItkSoftwareGuide.pdf

On Fri, Oct 24, 2014 at 5:54 AM, Abdul Abdul <abdul.sw84 at gmail.com> wrote:
> Hello,
>
> I noticed that when we want to use "New()" in itk with some type, we use
> "Pointer" with that type. Like for instance:
>
> SomeType::Pointer st = SomeType::New();
>
> In "itk", is this always the case? Is it because in order to access the
> "functions" with a a type in itk, this can only be done through pointers?
>
> Thanks.
>
> _____________________________________
> 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.php
>
> 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://public.kitware.com/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list