[Insight-developers] itk::Image updates && SmartPointers == NULL

Damion Shelton dmshelto@andrew.cmu.edu
Tue, 06 Nov 2001 13:35:39 -0500


Luis,

Thanks for all the help. Latest dashboards look good. Seems like the advice 
you've been giving me should land in documentation somewhere.

-Damion-

--On Tuesday, November 06, 2001 8:40 AM -0500 Luis Ibanez 
<ibanez@choroid.cs.unc.edu> wrote:

>
> Damion,
>
> Smart Pointers are constructed by default using internal 0x0000
> values, so you are not required to initialize them with NULL.
> This is one of the many nice features of SmartPointers.
>
> the itk::SmartPointer implementation also allows to test for
> initialization by using a C-like style:
>
>   SmartPointer<myType>  pointer;
>   if(  pointer ) { // the pointer is initialized }
>   if( !pointer ) { // the pointer is not initialized }
>
>
> The tests for NULL in itkImage.txx were replaced by short
> if( !pointer ) tests. If you have a chance, please check
> that this produce the results that you want with your
> code.
>
>
> Thanks
>
>
> Luis