Dear Ben, 
 thank you for spotting this issue. We will release an updated version that 
solves this problem 
(and another glitch with vmtkcenterlines -seedselector openprofiles) shortly, 
probably Monday, 
Thursday at the latest.

In the meantime, you can patch this issue quite simply. Open the file 
lib/vmtk/vmtk/vmtkrenderer.py
in your vmtk install folder, and edit line 146 by adding the following two 
lines of code:

            elif key == 'minus':
                key = '-'

The code has to go from this


    def CharCallback(self, obj, event):
        key = self.RenderWindowInteractor.GetKeySym()
        if self.TextInputMode:
            if key == 'Return':
                self.ExitTextInputMode()
                return
            if key == 'space':
                key = ' '
            elif len(key) > 1 and key not in ['Backspace','BackSpace']:
                key = None
            if key in ['Backspace','BackSpace']:
                textInput = self.CurrentTextInput
                if len(textInput) > 0:
                    self.CurrentTextInput = textInput[:-1]
            elif key:
                self.CurrentTextInput += key
            self.UpdateTextInput()
            return

to this (see the change at line 9 - be careful to respect the indentation, 
python is peaky)

    def CharCallback(self, obj, event):
        key = self.RenderWindowInteractor.GetKeySym()
        if self.TextInputMode:
            if key == 'Return':
                self.ExitTextInputMode()
                return
            if key == 'space':
                key = ' '
            elif key == 'minus':
                key = '-'
            elif len(key) > 1 and key not in ['Backspace','BackSpace']:
                key = None
            if key in ['Backspace','BackSpace']:
                textInput = self.CurrentTextInput
                if len(textInput) > 0:
                    self.CurrentTextInput = textInput[:-1]
            elif key:
                self.CurrentTextInput += key
            self.UpdateTextInput()
            return

Save the file and start vmtk, the issue should be solved.

I just committed the change to the main repository.

Best regards


Luca



On May 17, 2012, at 10:05 PM, Dickerhoff, Benjamin R wrote:

> Hey VMTK users,
> 
>     I just started using the VMTK 1.0 version for Windows 7, 64 bit. I'm 
> trying to segment some vasculature from 3DRA data, however, I am unable to 
> enter negative threshold values for the level set segmentation or decimals 
> for the evolution parameters for vmtkmarchingcubes. Does anyone have any work 
> arounds to fix this bug?
> 
> Thanks,
> Ben
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. 
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
> vmtk-users mailing list
> vmtk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/vmtk-users

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
vmtk-users mailing list
vmtk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vmtk-users

Reply via email to