MantisBT - VTK
View Issue Details
0009223VTK(No Category)public2009-06-30 19:092012-12-12 12:16
ivan daschinsky 
David Gobbi 
normalminoralways
closedfixed 
 
5.8.0 
0009223: vtkTkPhotoImage.py - wrong call tcl command
I suggest to patch this file for proper calling tcl command vtkImageDataToTkPhoto

This is my variant of method in class vtkTkPhotoImage from vtkTkPhotoImage module (tk-python widgets)

def PutImageSlice ( self, image, z, orientation='transverse', window=256, level=128 ):
        t = image.__this__
        s = 'vtkImageDataToTkPhoto %s %s %d %s %d %d' % ( t, self.name, z, orientation, window, level )
        self.tk.eval ( s )

Previous version:

def PutImageSlice ( self, image, z, orientation='transverse', window=256, level=128 ):
        t = image.__this__
        s = 'vtkImageDataToTkPhoto %s %s %d %s %d %d' % ( t[:-2], self.name, z, orientation, window, level )
        self.tk.eval ( s )

No tags attached.
? vtkTkPhotoImage.py (826) 2009-06-30 19:09
https://www.vtk.org/Bug/file/7348/vtkTkPhotoImage.py
Issue History
2009-06-30 19:09ivan daschinskyNew Issue
2009-06-30 19:09ivan daschinskyFile Added: vtkTkPhotoImage.py
2009-06-30 19:14ivan daschinskyNote Added: 0016792
2011-02-26 10:22David GobbiAssigned To => David Gobbi
2011-02-26 10:22David GobbiStatusbacklog => tabled
2011-04-17 01:37David GobbiNote Added: 0026202
2011-04-17 01:37David GobbiStatustabled => @80@
2011-04-17 01:37David GobbiResolutionopen => fixed
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2012-12-12 12:16David GobbiStatuscustomer review => closed
2012-12-12 12:16David GobbiFixed in Version => 5.8.0

Notes
(0016792)
ivan daschinsky   
2009-06-30 19:14   
Sorry, I've made mistake. There is right version of this method

def PutImageSlice ( self, image, z, orientation='transverse', window=256, level=128 ):
        import string
        t = string.replace(image.__this__,'_p','')
        s = 'vtkImageDataToTkPhoto %s %s %d %s %d %d' % ( t, self.name, z, orientation, window, level )
        self.tk.eval ( s )
(0026202)
David Gobbi   
2011-04-17 01:37   
Modified the vtkTkRenderWidget to be more flexible about
the formatting of the mangled pointers.

commit 97aef8bded8a1019b2ddfcb4e600051d8b303f9e
Author: David Gobbi <david.gobbi@gmail.com>
Date: Sat Apr 16 23:31:30 2011 -0600