[chimera-dev] changing the radius value on volumeEraser

Tom Goddard goddard at sonic.net
Mon Mar 10 15:27:52 PDT 2014


Not sure why the volume eraser code calls the radius slider "radius scale".  I see that it adjust the range of the scale to be 0 up to the size of the current volume data box.  I guess it was called "radius scale" for historical reasons and that the value was not the actual radius in some previous version of the code, but was a scale factor of the current  sphere radius.

	Tom


On Mar 7, 2014, at 2:12 PM, "Dougherty, Matthew T"  wrote:

> not clear on the concept of radius and radius scale.  Why both?
> 
> now the next thing I want to try is to move the xyz coordinates.  I plan to move away from the mouse to get better control.
> 
> 
> Matthew Dougherty
> National Center for Macromolecular Imaging
> Baylor College of Medicine
> ________________________________________
> From: Tom Goddard [goddard at sonic.net]
> Sent: Friday, March 07, 2014 12:29 PM
> To: Dougherty, Matthew T
> Cc: chimera-dev at cgl.ucsf.edu
> Subject: Re: [chimera-dev] changing the radius value on volumeEraser
> 
> Hi Matt,
> 
>  If you call Volume_Eraser_Dialog() then you get a new dialog.  Here's the way to do it.
> 
>>>> from VolumeEraser import gui
>>>> d = gui.volume_eraser_dialog(create = True)
>>>> r = d.sphere_radius()
> 25.3500015259
>>>> s = d.sphere_radius_scale.value()
> 25.3500015259
>>>> rnew = 100
>>>> d.sphere_radius_scale.set_value((rnew/r)*s)
>>>> r = d.sphere_radius()
> 100.0
> 
>        Tom
> 
> 
> On Mar 6, 2014, at 7:21 PM, "Dougherty, Matthew T" <matthewd at bcm.edu> wrote:
> 
>> Using python I would like to determine the eraser radius, calculate a new radius and update the widget.
>> 
>> I can modify the radius value, but unable to update the parameter on the widget.
>> 
>> 
>> Using this
>>       from VolumeEraser.gui import Volume_Eraser_Dialog
>>       v=Volume_Eraser_Dialog()
>>       r=v.sphere_radius_scale.value()
>>       print r
>>       r=r*0.5
>>       v.sphere_radius_scale.set_value(r)
>> 
>> If I have a widget radius of 8000,it accesses a default value of 2 rather than the value in the dialog box, and changes the sphere radius to 1.
>> printing v I get the impression that I am access a different widget/gui.
>> 
>> 
>> Matthew Dougherty
>> National Center for Macromolecular Imaging
>> Baylor College of Medicine
>> _______________________________________________
>> Chimera-dev mailing list
>> Chimera-dev at cgl.ucsf.edu
>> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
>> 
> 
> 





More information about the Chimera-dev mailing list