View Issue Details

IDProjectCategoryView StatusLast Update
0003165Slicer4Core: MRMLpublic2016-06-16 19:12
ReporterkotwiczAssigned Tohastings.greer 
PrioritynormalSeveritytweakReproducibilityalways
Status assignedResolutionopen 
Product VersionSlicer 4.2.0 
Target VersionFixed in Version 
Summary0003165: change the SetPosition method to always call resetclippingrange after the position was changed
Description
  • change the SetPosition method to always call resetclippingrange after the position was changed
    -- calls to SetPosition sometime make the image disappear from the 3d view if resetclippingrange is not called right after
TagsNo tags attached.

Relationships

related to 0004209 closedjcfr center view button does not update clipping distance 

Activities

alexy

alexy

2013-06-25 06:17

developer   ~0008807

what class are you talking when you say "SetPosition method"?

kotwicz

kotwicz

2013-06-25 06:22

reporter   ~0008808

sorry, vtkMRMLCameraNode

hastings.greer

hastings.greer

2016-06-16 17:27

developer   ~0013974

Last edited: 2016-06-16 17:46

View 2 revisions

The fundamental issue here is that a vtkCamera does not know what vtkRenderer is drawing it, and so it cannot know the bounding box of the props in the scene. Therefore, any classes which can adjust the camera, such as vtkMRMLCameraNode but which do not have access to a renderer cannot predict whether they will cause clipping issues when they move the camera, and cannot preemptively fix those clipping issues.

hastings.greer

hastings.greer

2016-06-16 17:34

developer   ~0013975

So, either vtkCamera must gain a reference to vtkRenderer (untenable) or everyone who moves a vtkCamera must also have a reference to the associated vtkRenderer and remember to call vtkRenderer::ResetClippingRange (untenable)

Or, we could just set the far clipping distance to be the max(10000, 2*vtkCamera->GetDistance) which is a hack but would make the problems go away as long as our patients are less that 10 meters tall

jcfr

jcfr

2016-06-16 19:12

administrator   ~0013982

Nice investigative work.

Other possible alternative:

  1. Update vtkMRMLCameraNode::ResetClippingRange to invoke event like "vtkMRMLCameraNode::ResetClippingRangeFlag"

  2. Update vtkSlicerCamerasModuleLogic::ProcessMRMLSceneEvents so that it observe camera node

  3. The camera logic would retrieve the render associated with the view where the camera is and call the method on the renderer

Assumption: A camera node can be associated with only one view.

Issue History

Date Modified Username Field Change
2013-06-13 10:18 kotwicz New Issue
2013-06-13 10:18 kotwicz Status new => assigned
2013-06-13 10:18 kotwicz Assigned To => alexy
2013-06-25 06:17 alexy Note Added: 0008807
2013-06-25 06:22 kotwicz Note Added: 0008808
2016-06-14 15:29 jcfr Assigned To alexy => hastings.greer
2016-06-16 17:27 hastings.greer Note Added: 0013974
2016-06-16 17:34 hastings.greer Note Added: 0013975
2016-06-16 17:46 hastings.greer Note Edited: 0013974 View Revisions
2016-06-16 19:03 hastings.greer Relationship added related to 0004209
2016-06-16 19:12 jcfr Note Added: 0013982