[vtkusers] Updating and destroying the pipeline

Lic. José M. Rodriguez Bacallao jmrbcu at gmail.com
Wed Jul 7 09:15:30 EDT 2010


I am interested in those question too, but with python. I am using vtk
with python and PyQt4

On Wed, Jul 7, 2010 at 5:26 AM, Cyrille Faucheux
<cyrille.faucheux at etu.univ-tours.fr> wrote:
> Hi,
>
> I've just started working with ITK and VTK a few days ago, so right now I'm
> just playing with it.
>
> My "toy" application is a Qt window (containing a QVTKWidget) in which I
> want to be able to display one slice of a 3D image (dynamically selected by
> a slider).
>
> So I have:
> - The QVTKWidget for the display;
> - an itk::ImageReader to load my image;
> - an itk::ImageToVTKImageFilter to connect the ITK image to the VTK part of
> the pipeline;
> - and a vtkImageViewer for the rendering.
>
> Right now, when I open an image, I create a new reader, a new connector and
> a new viewer, connect them, then set the render window of the QVTKWidget to
> the one obtained from the viewer. And again when I open a new image
> (everything works fine).
>
> Creating and connecting all these objects seems to be the proper way to
> build the pipeline in order to display an image, but recreating and
> reconnecting everything seems wrong to me when I want to open another image.
>
> Can somebody confirm if it's the proper way or if there is better/more
> efficient way to achieve this ?
>
>
> I've a second question concerning the proper way to destroy the pipeline.
> Right now, everything is automatically deleted since I use smart pointers.
> But again, it seems wrong to me to let the application decide about the
> order of deletion of these objects since they are all connected.
>
> Do I have to worry about this ?If the answer is yes, what is the clean way ?
> Is it necessary to first "dismantle" the pipeline ?
>
> Thanks in advance.
> Cyrille
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Lic. José M. Rodriguez Bacallao
Centro de Biofisica Medica
-----------------------------------------------------------------
Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo.

Recuerda: El arca de Noe fue construida por aficionados, el titanic
por profesionales
-----------------------------------------------------------------



More information about the vtkusers mailing list