[Insight-users] Smart pointer destruction
Luis Ibanez
luis.ibanez at kitware.com
Mon Oct 24 23:01:47 EDT 2005
Hi Diego,
Please look at the examples of code in the directory:
InsightApplications/
Auxiliary/vtk/
itkReadITKImage3DSegmentShowVTK.cxx
itkReadITKImageSegmentShowVTK.cxx
itkReadITKImageShowSplineVTK.cxx
itkReadITKImageShowVTK.cxx
Regards,
Luis
--------------------
Diego Parada wrote:
> 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
> <mailto: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:crd.ge.com at itk.org>
> [mailto: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
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list