Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
VTK
VTK
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 562
    • Issues 562
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 144
    • Merge Requests 144
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • VTK
  • VTKVTK
  • Issues
  • #18073

Closed
Open
Opened Jan 05, 2021 by Philipp Weissenbacher@philipp.weissenbacher

vtkAngleRepresentation3D does not compute angle if x-coords of points are the same

Today I recognized a strange behaviour of the vtkAngleWidget. (version 9.0 commit 1762d09c) When initializing the widget programmatically with three points (all laying on the YZ-plane) the widget does not compute the angle.

The problematic section of code is in vtkAngleRepresentation3D line 293.

// Compute the angle (only if necessary since we don't want
// fluctuations in angle value as the camera moves, etc.)
if (p1[0] - c[0] == 0.0 || p2[0] - c[0] == 0.0)
{
    return;
}

Here, the BuildRepresentation() method returns if the x-coordinates of the points are the same (why is it that way?). Is that a bug, or an intended behaviour?

In my use case (CT Viewer) I cannot measure 3D angle if the picked world coordinates originate from the sagittal plane (x-coordinates of all three points are the same). For an example image of the imcomplete angle measurement of the vtkAngleWidget see attached image file.

IncompleteAngleMeasurement

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: vtk/vtk#18073