[Insight-users] Smart pointer destruction

Diego Parada icebishop at gmail.com
Mon Oct 24 20:25:35 EDT 2005


Hi,

I used the UpdateLargestPossibleRegion() :

connector->SetInput(this->GetDocument()->m_Imagen);
try
{
connector->GetExporter()->UpdateLargestPossibleRegion();
connector->GetExporter()->Update();
connector->Update();
}
catch( itk::ExceptionObject & err )
{
MessageBox(err.what(),"Alerta",MB_ICONERROR);
return;
};
m_imagen=connector->GetOutput();

but dont appera anything y the renderwindow.

Can You help me?

2005/10/24, Miller, James V (Research) <millerjv at crd.ge.com>:
>
> You can destroy a smart pointer by setting it to zero.
>  ptr = 0; // releases the previous object.
>  The exception you are getting is probably related to the size of the
> second image being marketedly different from the size of the first image.
> The pipeline caches information about the sizes of the data it is operating
> on.
>  When loading new data into an existing pipeline (one that has already
> executed on other data), it is best to call UpdateLargestPossibleRegion()
> instead of calling Update() on the pipeline. This forces the pipeline to
> renogiate the cached image sizes.
>  Jim
>
> -----Original Message-----
> *From:* insight-users-bounces+millerjv=crd.ge.com at itk.org [mailto:
> insight-users-bounces+millerjv=crd.ge.com at itk.org]*On Behalf Of *Diego
> Parada
> *Sent:* Friday, October 21, 2005 9:10 PM
> *To:* Luis Ibanez; ITKHelp
> *Subject:* [Insight-users] Smart pointer destruction
>
> Hi,
>
> I have a problem with a itkImageToVTKimageFilter:
> My application is an vc SDI and when i open an set image run fine, but i
> open another set image after apears an excetion about the dimmesion of the
> image
> The exporter of connector is a smart pointer How Ican Destroy this
> pointer?
>
>
> --
> Diego Armando Parada Cuervo
> Estudiante de Ingeniería de Sistemas y Computación
> Universidad Pedagógica y Tecnológica de Colombia
>
>


--
Diego Armando Parada Cuervo
Estudiante de Ingeniería de Sistemas y Computación
Universidad Pedagógica y Tecnológica de Colombia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20051024/2e539255/attachment.html


More information about the Insight-users mailing list