[Insight-developers] SmartPointer->RawPointer in GetInput() GetOutput() changed

Bill Lorensen wlorens1@nycap.rr.com
Mon, 13 May 2002 18:29:01 -0400


Luis,
I'm still seeing some errors in the continuous. If they are related to the pointer change, please fix them and hold off on other changes.

Thanks,

Bill

At 04:52 PM 5/13/02 -0400, Luis Ibanez wrote:


>Hi,
>
>The changes in GetInput() and GetOutput()
>have been made all over the toolkit.
>
>These methods now return raw pointers
>instead of SmartPointers.
>
>The output of the methods can still be
>received by a SmartPointer but you may
>want to change that to raw pointers too.
>
>Like:
>
>    ImageType::Pointer image = filter->GetOutput();
>
>should now be:
>
>    ImageType * image = filter->GetOutput();
>
>unless you are planning to destroy the filter
>after the GetOutput() call, in which case the
>smart pointer is still needed to prevent the
>output image from dying along with its filter.
>
>A lot of Get*() methods returning SmartPointers
>were untouched in this first pass because it
>wasn't clear if they will support the change.
>They may be updated in a second pass.
>
>A const-correcteness visit is also on the list
>of things to do.
>
>Note that for GetInput() the result must be
>received in a const raw pointer, like:
>
>const ImageType * image = filter->GetInput();
>
>GetOutput() will also be made const soon and
>it will return a const raw pointer as well.
>A variant non-const (protected) version will
>be added to be used inside filters only.
>
>
>
>      Luis
>
>
>
>
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers@public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-developers