[vtkusers] One question about the implementation of function vtkAngleRepresentation3D::BuildRepresentation()

Liu_tj tjlp at netease.com
Tue Jul 25 11:47:32 EDT 2017


Hi, VTK guys,

I check the implementation of vtkAngleRepresentation3D::BuildRepresentation() of the master branch. Line 301 (https://github.com/Kitware/VTK/blob/master/Interaction/Widgets/vtkAngleRepresentation3D.cxx#L301) compares x coordinate of point1 and centerpoint or point2 and centerpoint, if either of them is 0.0, the function will return and the angle value won't be updated.

Now I get an issue raised by this check. If I draw an angle on the sagittal view on the vtkImageViewer2, the x coordinate of the 3 points should be the same. That will cause I can't get the right value.

Why is the comparation added? Although there is some comment "Compute the angle (only if necessary since we don't want fluctuations in angle value as the camera moves, etc.)". I don't understand it.

Would any guys give explainments?
Add @Ken martin as Martin is one of the authors.

Thanks
Liu Peng

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170725/358c067c/attachment.html>


More information about the vtkusers mailing list