[vtkusers] vtkBoxWidget handle size bug?
Berti Krüger
berti_krueger at hotmail.com
Wed Feb 7 01:21:55 EST 2018
It seems i am not the only one who doesn't understand the logic behind the
sizing of the vtkBoxWidget handles:
http://massmail.spl.harvard.edu/public-archives/slicer-devel/2011/006000.html
"Hello,
I am using a vtkBoxWidget, and it seems the size of the handles depends on
the ValidPick (to know if handle has been picked or not) (and on the
renderer to. We have to set a current renderer before calling PlaceWidget.)
So, when I am creating the box, ValidPick is 0 because handles have not been
picked yet.
The size of the handles is calculate with:
return (this->HandleSize * factor * this->InitialLength);
But, when we resize the box, ValidPick change to 1 (on
OnLeftButtonDown() (same for middle and right button) ), and the size
is now calculated like this:
return (this->HandleSize * factor * sqrt(radius) );
InitialLength has been replaced by sqrt(radius) (defined on
vtk3DWidget::SizeHandles)
But sqrt(radius) is different from InitalLength.
So, when we create a vtkBoxWidget, handles are small, and when we resize it,
handles are bigger.
Is this normal, or it's a bug ?
Thank you.
Laurent."
Am Mon, 5 Feb 2018 10:00:16 +0000
schrieb Berti Krüger <berti_krueger at hotmail.com>:
> Hello Everyone!
>
> I am currently using a vtkBoxWidget in my project (VTK 8.1). After i
> created the vtkBoxWidget, the size handles (= vtkSphereActors) have not been
> picked yet and are small and nice.
>
> But, when I resize the vtkBoxWidget (smaller or larger, it doesn't matter) or
> simply click on it, the handles get bigger (radius increases) and stay this
> way.
>
> They sometimes tend to get so large that they are piercing the mesh and
> visually adding themselves to it, which is annoying. And they never get
> smaller again, sometimes they get even larger.
>
> When i zoom out by large amount and then zoom in again, the handles get normal
> ( = small) again.
>
> Is this the intented behaviour, and if so, what is the purpose of it or is it
> a bug ?
>
>
> Thank you very much in advance.
>
>
> Berti Krüger
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list