[vtkusers] [Insight-users] Problem using vtkImagePlaneWidget

Mathieu Stumpf mathieu.stumpf at etu.unistra.fr
Thu Mar 22 07:47:42 EDT 2012


I'm still locked with the X11 crashing problem. Logs files don't give me
much information :

        src_dir$ python placid_and_clean_sitk_to_vtk.py >&log
        # there X11 crashes…
        src_dir$ cat log 
        xMin=0 xMax=191 yMin=0 yMax=255 zMin=0 zMax=127
        
        (python:4053): Gtk-CRITICAL **: gtk_range_set_range: assertion `min < max' failed
        
        (python:4053): Gtk-CRITICAL **: gtk_range_set_range: assertion `min < max' failed
        
        (python:4053): Gtk-CRITICAL **: gtk_range_set_range: assertion `min < max' failed
        python: Fatal IO error 104 (Connexion ré-initialisée par le correspondant) on X server :0.0.
        python: Fatal IO error 104 (Connexion ré-initialisée par le correspondant) on X server :0.0.

Xorg doesn't help much more :
        /var/log$ grep "(EE)" * 2>/dev/null 
        Xorg.0.log:	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
        Xorg.0.log:(EE) NOUVEAU(0): Error creating GPU channel: -19
        Xorg.0.log:(EE) NOUVEAU(0): Error initialising acceleration.  Falling back to NoAccel
        Xorg.0.log:(EE) TypeMatrix.com USB Keyboard: failed to initialize for relative axes.
        Xorg.0.log.old:	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
        Xorg.0.log.old:(EE) NOUVEAU(0): Error creating GPU channel: -19
        Xorg.0.log.old:(EE) NOUVEAU(0): Error initialising acceleration.  Falling back to NoAccel
        Xorg.0.log.old:(EE) TypeMatrix.com USB Keyboard: failed to initialize for relative axes.
        
Anyone have suggestion to establish a diagnosis?

Kind regards,
Mathieu

Le mercredi 21 mars 2012 à 16:26 +0100, Mathieu Stumpf a écrit :
> Le mardi 20 mars 2012 à 14:07 +0000, Kevin Keraudren a écrit :
> > When working with ITK or VTK from Python, use "print" on the objects to 
> > know what they contain.
> > 
> > For instance:
> > print( vtk_image )
> > shows that already you have a problem.
> > 
> > You are trying to get information from object whose creation is not 
> > completed yet: "Update()" has not been called yet, either directly, or 
> > indirectly like by Render()
> 
> Indeed, with the help of Julien Pontabry, I realized that yesterday
> (before I saw your mail).
> 
> So I added a n2vtk.Update() in my code, and my vtk_image now contains
> needed information in memory.
> 
> 
> > If your problem is VTK specific, you will surely get more help from:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 
> Now I still doesn't display planes (and I have some code version which
> make X11 crashes), but it is indeed more a VTK specific problem.
> 
> Julien Pontabry explained me that I probably have a problem with my
> vtkWindowInteractor. He provided me a C++ code which go through the step
> I should follow, but using an independant vtkRenderWindowInteractor.
> 
> As my current objet inherit from wxVTKRenderWindowInteractor, I tried to
> adapt the given code.
> 
> Particularly I configure my planes with the vtkWindowInteractor I get
> trough self.GetRenderWindow().GetInteractor() and call
> self.planeWidget[XYZ].PlaceWidget() which should make them appear.
> 
> Julien Pontabry also reported me that vtkImagePlaneWidget's actors where
> implicitly created, so I didn't need have to create one for each of my
> plane and add them to my renderer. 
> 
> Now despite it doesn't display planes, the application will run when I
> call self.Render(), but if I call self.Initialize() or self.Start(), it
> will make X11 crashes.
> 
> Attached to the mail is the changed code, with lines which makes X11
> crashes commented. I would appreciate if someone could test them and
> tell me if it also make your X11 session crash once decommented (save
> all your works!).
> 
> I don't know if self.Initialize() and self.Start() are really required
> though. Maybe planes doesn't show for yet another reason.
> 
> Kind regards,
> Mathieu
> 
> > Le 19/03/2012 12:05, Mathieu Stumpf a écrit :
> > > Hello,
> > >
> > > I'm trying to write a simple software to visualize medical image with
> > > SITK, VTK, and WxWidget.
> > >
> > > As far as I can perceive, my problem is due to GetWholeExtent which
> > > doesn't provide slice number for each axis in my picture, as I would
> > > expect. Instead I get (0,-1) tuples.
> > >
> > > Maybe I do others things in a wrong way, I don't know. May be
> > > GetWholeExtent is not the method I should use.
> > >
> > > My code is in a substantial part an object oriented rewriting of [1]
> > > using Wx instead of Tkinter as widgets provider. As I'm a python
> > > beginner, I may have made errors in this transcriptions too.
> > >
> > > Other sources greatly inspired me on this work :
> > > - http://www.siafoo.net/snippet/314?code=on&nolinenos
> > > - Other codes which were privately sent to me by Antoine Grigis and
> > > Kevin Keraudren (lot of thank to them).
> > >
> > > I hope someone will be able to point me where I'm wrong in my
> > > vtkImagePlaneWidget usage. I would also appreciate any feedback on the
> > > code in a whole.
> > >
> > > Thank for your attention,
> > > Mathieu
> > >
> > > [1]
> > > http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/GUI/Python/ImagePlaneWidget.py?root=VTK&content-type=text/plain
> > >
> > > _____________________________________
> > > Powered by www.kitware.com
> > >
> > > Visit other Kitware open-source projects at
> > > http://www.kitware.com/opensource/opensource.html
> > >
> > > Kitware offers ITK Training Courses, for more information visit:
> > > http://www.kitware.com/products/protraining.php
> > >
> > > Please keep messages on-topic and check the ITK FAQ at:
> > > http://www.itk.org/Wiki/ITK_FAQ
> > >
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.itk.org/mailman/listinfo/insight-users
> > 
> 
> 
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users






More information about the vtkusers mailing list