View Issue Details

IDProjectCategoryView StatusLast Update
0001690Slicer4Module Markupspublic2018-05-30 00:35
ReporterpieperAssigned Tonicole 
PrioritynormalSeveritymajorReproducibilityalways
Status assignedResolutionopen 
Product Version 
Target VersionbacklogFixed in Version 
Summary0001690: fiducial shows in wrong lightbox cell
Description

When the annotation belongs in the upper left cell of a lightbox, it actually shows up in the lower left cell.

See attached image.

Steps To Reproduce

Load MRHead data
Place annotation at a visually distinct spot, say at the edge of the eye.

Switch to any lightbox mode, say 6x6 and see that the annotation should be in the upper left cell but is in the lower left instead.

TagsNo tags attached.

Relationships

related to 0002732 closedmillerjv Move LightBox proxy to abstract displayable manager for easier re-use 
parent of 0002821 closedpieper fiducials move on mouse over 
related to 0001914 closedjcfr fiducial points misplaced after switching layouts 
related to 0002823 acknowledgednicole Rulers not working in lightbox mode 
related to 0003690 assignednicole Markups: Implement hack/workaround for 0001690 and 0003531 
related to 0003761 closednicole Markups: test_MarkupsInCompareViewersSelfTest1 is failing 

Activities

2012-02-07 09:26

 

Selection_181.png (165,318 bytes)
Selection_181.png (165,318 bytes)
jcfr

jcfr

2012-08-20 11:46

administrator   ~0005625

From group discussion> Better not to show it than to show it in the wrong place...

nicole

nicole

2012-10-23 16:23

administrator   ~0006715

Fiducial and ruler do this (show up in the bottom left hand slice in the lightbox), but the ROI seems to behave properly.

jcfr

jcfr

2012-10-25 12:08

administrator   ~0006758

ENH: Easier re-use by adding static sliceView DisplayableManager "Convert" methods

See r21245 / http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21245

nicole

nicole

2012-10-25 12:40

administrator   ~0006767

JC: This seems to be a step in the right direction, I have to do the opposite (RAS -> Device) when placing the widgets to make sure it's fully working, doing that now....

jcfr

jcfr

2012-10-25 13:22

administrator   ~0006775

Nicole:

It means you should probably be adding the static method :ConvertXYZToDevice to vtkMRMLAbstractSliceViewDisplayableManager

Then, you will be able to do:

vtkMRMLAbstractSliceViewDisplayableManager::ConvertRAStoXYZ(...)
vtkMRMLAbstractSliceViewDisplayableManager::ConvertXYZToDevice(...)

Adding the static convenience method: ConvertRAStoDevice to vtkMRMLAbstractSliceViewDisplayableManager could also be helpful.

nicole

nicole

2012-10-25 13:43

administrator   ~0006780

I'm working in display coordinates rather than device/viewport coordinates with the annotation widgets (as much as possible anyway), since the display coordinates give me the index into lightbox slices as well.
I'll add those convenience methods if necessary.

jcfr

jcfr

2012-10-25 13:59

administrator   ~0006783

device is display coordinate. Isn't it ? This at least what I understood reading the comment in Jim code. I then reported it in the doxygen.

nicole

nicole

2012-10-25 14:33

administrator   ~0006797

device is viewport coordinates, from what I understood from the code.

jcfr

jcfr

2012-10-25 14:58

administrator   ~0006800

Based on q quick experiment where I added the following code:

std::cout << "Device(x:" << pos[0] << ", y:" << pos[1] << ") - XYZ(x:" << xyz[0] << ", y:" << xyz[1] << ", z:" << xyz[2] << ")" << std::endl;

at line 755 of vtkMRMLCrosshairDisplayableManager.cxx [1]

Setting the red slice to a 3*2 lightbox, we can clearly see that:

Device is display coordinate: Where in the RenderWindow the mouse pointer is

XYZ is view port coordindate: Coordindate within a given viewport

Associated log:

Entered in (1) (see enclosed screenshot)
Device(x:344, y:623) - XYZ(x:344, y:206, z:0)
Device(x:344, y:623) - XYZ(x:344, y:206, z:0)
Device(x:343, y:621) - XYZ(x:343, y:204, z:0)
Device(x:342, y:614) - XYZ(x:342, y:197, z:0)
Device(x:342, y:612) - XYZ(x:342, y:195, z:0)
Device(x:342, y:611) - XYZ(x:342, y:194, z:0)
Device(x:342, y:610) - XYZ(x:342, y:193, z:0)
Device(x:343, y:610) - XYZ(x:343, y:193, z:0)
Device(x:343, y:611) - XYZ(x:343, y:194, z:0)
Device(x:344, y:612) - XYZ(x:344, y:195, z:0)
Device(x:345, y:612) - XYZ(x:345, y:195, z:0)
Device(x:354, y:613) - XYZ(x:354, y:196, z:0)
//// Point (2) (see enclosed screenshot)
Device(x:376, y:613) - XYZ(x:0, y:196, z:1)
Device(x:380, y:613) - XYZ(x:4, y:196, z:1)
Device(x:387, y:612) - XYZ(x:11, y:195, z:1)
Device(x:388, y:612) - XYZ(x:12, y:195, z:1)
Device(x:392, y:612) - XYZ(x:16, y:195, z:1)
Device(x:394, y:613) - XYZ(x:18, y:196, z:1)
Device(x:398, y:613) - XYZ(x:22, y:196, z:1)
Device(x:399, y:613) - XYZ(x:23, y:196, z:1)
Device(x:404, y:614) - XYZ(x:28, y:197, z:1)
Device(x:407, y:614) - XYZ(x:31, y:197, z:1)
Device(x:408, y:615) - XYZ(x:32, y:198, z:1)
Device(x:410, y:621) - XYZ(x:34, y:204, z:1)
//// Point (3) (see enclosed screenshot)

[1] https://github.com/Slicer/Slicer/blob/master/Libs/MRML/DisplayableManager/vtkMRMLCrosshairDisplayableManager.cxx#L755

2012-10-25 15:01

 

nicole

nicole

2012-10-26 08:00

administrator   ~0006809

According to my understanding of VTK rendering terminology, viewport coordinates always fall between 0-1, they're a normalised version of display coordinates achieved by dividing by the window width/height.
Taking another look at how the terminology is used in Slicer, but I've got a fix for the "click in light box, get the correct RAS location" problem, svn 21255[1] fixes that

Working on updating vtkMRMLAnnotationDisplayableManager::GetWorldToDisplayCoordinates
and how the return coordinates are used to position annotations.

[1] http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Modules/Loadable/Annotations/MRMLDisplayableManager/vtkMRMLAnnotationDisplayableManager.cxx?r1=21255&r2=21254&pathrev=21255

nicole

nicole

2012-10-26 17:57

administrator   ~0006827

Disabling showing fiducials and rulers in 2d slice viewers that are in lightbox mode (also compare viewers as they use lightbox). svn 21263.

http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21263

Revisit after RSNA

nicole

nicole

2012-11-02 10:45

administrator   ~0007023

Cleaned up the displayable manager code a bit in svn 21310[1], updated conversion of RAS to display coordinates to use vtkMRMLAbstractSliceViewDisplayableManager::ConvertRASToXYZ(
but keeping lightbox mode disabled while further debugging it

[1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21310

nicole

nicole

2012-11-02 13:32

administrator   ~0007026

Noticed that the number of renderers doesn't necessarily match the number of light boxes (seems to grow but not shrink), so check the lightbox index first in svn 21312[1] and also check if the widget needs it's renderer reset to avoid flickering. The current code also disables moving the widgets while in lightbox mode, that will need to be addressed.

Looking at the Crosshair displayable manager, I think that the annotation displayable managers may need to include a vtkLightBoxRendererManager (from CTK) in order to be able to get the correct renderer to assign to the widgets.

[1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21312

pieper

pieper

2012-11-02 15:14

administrator   ~0007029

After some research and debugging, Nicole and I realized that the (one) underlying issue is that the render window has more renderers than lightbox cells. This was something Jim apparently ran into and fixed about a year ago for the crosshairs, and he added a proxy that gives access to ctk's lightbox manager. This is needed in order to map XYZ coordinates to the proper renderer, but this has not been generalized to support other displayable managers. (Note that the vtkMRMLModelSliceDisplayableManager also only displays in the first cell of a lightbox.

Suggestions:

For 4.2.1: move the lightbox proxy up to the abstract displayable manager class level so that it is available to all displayable manager subclasses. This would mean adding it to the initialize methods for the displayable manager groups. ThreeD displayable managers could just return the single renderer, while slice views could use the proxy to get the correct renderer for the given coordinate (Z coordinate of XYZ space).

For 4.3: factor out more of the redundant code from displayable managers into the abstract class. Functionality to factor out:

  • watching the scene for add/remove of node classes

  • adding/removing observers for the nodes in the current scene

  • managing display pipelines associated with node instances and triggering updates on those pipelines based on changes to the scene. Note that for displayable managers like the ModelSlice, there needs to be one pipeline PER node instance PER renderer so that the correct slice intersections will show up in each cell of the lightbox.
pieper

pieper

2012-11-02 15:16

administrator   ~0007030

Another question to investigate: why are there extra renderers in the slice view render windows that do not get removed. Specifically, at startup there are 2 renderers, then going to 3x3 lightbox mode there become 10 renderers (going back to 1x1 there are still 10 renderers). Going to 6x6 led to 45 renderers, and those remain even after going back to 1x1 mode.

pieper

pieper

2012-11-02 15:18

administrator   ~0007031

Reminder sent to: jcfr, millerjv

Jim and Jc - could you review the latest notes on this and comment as needed?

-Steve and Nicole

millerjv

millerjv

2012-11-02 15:29

developer   ~0007032

I had forgotten about the lightboxmanagerproxy. Yes, I had that same issue that I couldn't map to the correct renderer without asking CTK do it. Of course, the display able managers don't know about CTK, hence the proxy.

I always thought there one extra renderer for the overlay plane. That assumption sounds good until your 6x6 example.

pieper

pieper

2012-11-02 15:36

administrator   ~0007033

Yes, we were also confused by why there are ever extra and/or non-consistent renderers. We did another test where we tried to only use the last row x column renders in the list but that didn't appear to work either.

jcfr

jcfr

2012-11-05 10:37

administrator   ~0007052

Note 7029 sounds like a good approach, I would be happy to review topic regarding the moving of the proxy.

I create issue 0002732 to track it and it is assigned to Jim.

Jim> Can you take care of the refactor ?

NOTE: When done, the change should NOT be pushed on the trunk. Instead, a github topic should be referenced as a note to issue 0002732 for review.

millerjv

millerjv

2012-11-06 10:22

developer   ~0007084

JC, since you do not want this immediately pushed to the trunk, do you want to this based off a particular branch? trunk or 4.2?

jcfr

jcfr

2012-11-06 12:28

administrator   ~0007088

Jim: Just based your topic on today's master.

git chechout -b 2732-move-lightbox-to-abstract-displayable-manager

Nicole will then based her topic named "1690-fiducial-shows-in-wrong-lightbox-cell" on yours.

nicole

nicole

2012-11-12 06:23

administrator   ~0007161

Jim: any updates?

millerjv

millerjv

2012-11-14 06:43

developer   ~0007210

Pushed a patch to https://github.com/millerjv/Slicer4/commit/55f9c1c637f4ef4ba5c0da8b442aac57626d10c7

Branch is "2732-move-lightbox-to-abstract-displayable-manager"

commit 55f9c1c637f4ef4ba5c0da8b442aac57626d10c7
Author: Jim Miller <millerjv@ge.com>
Date: Wed Nov 14 11:29:39 2012 -0500

BUG: <a href="/view.php?id=2732" title="[closed] Move LightBox proxy to abstract displayable manager for easier re-use" class="resolved">0002732</a> move light box renderer manager proxy to abstract displayable manager

Moved the LightBoxRendererManagerProxy up to the superclass of the
DisplayableManager hierarchy so that all (2D & 3D) displayable managers
can interact with a lightbox.

Note that light boxes are only currently supported on 2D viewers, so the
proxy is only configured in qMRMLSliceView. CTK will need to be changed to
put the LightBoxManager into ctkVTKAbstractView to make it accessible to
both ctkVTKSliceView and ctkVTKRenderView. Then qMRMLThreeDView could also
create and initialize a LightBoxManagerProxy and set it on its DisplayableManagers.
Here, we would also want to move qMRMLSliceViewPrivate::vtkInternalLightBoxRendererManagerProxy
class to a place where it could be used by both types of VTK widgets.

The proxy can now be set on the DisplayableManagerGroup which broadcasts
the proxy to all the DisplayableManagers in that group.
jcfr

jcfr

2012-11-14 06:51

administrator   ~0007214

Thanks Jim. Looks great.

Nicole> Is this sufficient for you to make progress ?

nicole

nicole

2012-11-14 13:08

administrator   ~0007224

branched from jim's branch and got my github Slicer fork update, but my first attempt to use the GetRenderer(idx) didn't work, will continue in the morning.

jcfr

jcfr

2012-11-15 13:22

administrator   ~0007255

Hi Nicole,

Any update regarding that issue ? Are the change of Jim working for you ? Can his topic be integrated ?

Thanks
Jc

nicole

nicole

2012-11-15 14:37

administrator   ~0007264

Last edited: 2012-11-15 14:45

Jim's change is helpful, but the problem turned out to be that the widgets being used in the 2d views were using 3d handle representations, and their cameras weren't correct.
Steve and I tired to reset the cameras to something sensible, but that didn't work, and would need to be supported at all levels of the layouts/viewers.
Seed widgets in light box mode did work if I switched to using a 2d point handle (no label text). That also solved the layout change position switching bug as a neat side effect.
The problem with going to a 2d point handle is that I have to redo a lot of the displayable manager code to include a sub case of the 2d case for lightbox (so that we keep the text/colours/glyphs in non light box mode). Markups module rewrite will have two separate dispalayble managers, one for 2d and one for 3d and will avoid this problem.

I cleaned up the first part of the fix and pushed to my github:
https://github.com/naucoin/Slicer/commit/2b21cea6c1a120d8df32919c870c8507df9a7022
That uses the light box proxy renderer, but doesn't fix the location yet.

nicole

nicole

2012-11-15 16:49

administrator   ~0007265

Have the 2d point handle mostly working :
https://github.com/naucoin/Slicer/commits/1690-fiducial-shows-in-wrong-lightbox-cell

The main problem left is that when you switch into and out of light box mode, the fiducials aren't getting their handles updated. They will update once the fid is moved in 3d, but that's not ideal.
Looking into why not getting the slice node modified event and responding to it.

jcfr

jcfr

2012-11-15 17:00

administrator   ~0007269

Thanks for the update. Seems important progress are made :)

nicole

nicole

2012-11-15 17:16

administrator   ~0007270

Okay, done for now:
the code on my github will favour over processing and resetting the fiducial handles on slice node changes rather than just setting the position if the fid is visible. This fixes (as far as I can tell) swapping into and out of light box mode without breaking anything else.

https://github.com/naucoin/Slicer/commits/1690-fiducial-shows-in-wrong-lightbox-cell

I'm going to submit an experimental build to the dashboard (host name b2-d4-10.bwh.harvard.edu) to see what happens, will look at it again in the morning.

pieper

pieper

2012-11-16 03:55

administrator   ~0007274

I did some more testing with the prostate demo scene. It looks like things are very close - the crash I found is an issue in VTK - the WorldToView method checks for ActiveCamera, but the ViewToWorld doesn't -- the patch below fixes this and makes the prostate scene load correctly.

There is still the issue that you need to trigger some of the updates manually in order for fiducials to appear. We should look at the scene with Andrey to be sure the fiducials are in the right places.

0000159 Slicer-superbuild $ (cd VTK; git diff)
diff --git a/Rendering/vtkRenderer.cxx b/Rendering/vtkRenderer.cxx
index d99dad5..b739122 100644
--- a/Rendering/vtkRenderer.cxx
+++ b/Rendering/vtkRenderer.cxx
@@ -1322,6 +1322,12 @@ void vtkRenderer::ViewToWorld(double &x, double &y, double &z)
double result[4];

// get the perspective transformation from the active camera

  • if (!this->ActiveCamera)
  • {
  • vtkErrorMacro("ViewToWorld: no active camera, cannot compute world to view, returning 0,0,0");
  • x = y = z = 0.0;
  • return;
  • }
    vtkMatrix4x4 *matrix = this->ActiveCamera->
    GetCompositeProjectionTransformMatrix(
    this->GetTiledAspectRatio(),0,1);
jcfr

jcfr

2012-11-16 05:26

administrator   ~0007278

Steve: Thanks for proposing the VTK patch. I guess now is the good time to get your gerrit account for VTK :) See http://www.vtk.org/Wiki/VTK/Git/Develop
Then consider reading section "Share a topic"

jcfr

jcfr

2012-11-16 06:42

administrator   ~0007284

Nicole> Jim changes regarding lightbox proxy have been integrated.
See r21431 / http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21431

I am assuming the following commits of your topic are final ? Talking about these commits: https://github.com/naucoin/Slicer/compare/555faa90001b8af89a31a98202142539cb35476e...1690-fiducial-shows-in-wrong-lightbox-cell

nicole

nicole

2012-11-16 06:46

administrator   ~0007285

Those commits are final, but I'm working on another one to try and fix the prostate demo crash (hopefully just need to set the renderer on the widget representation in create widget).

nicole

nicole

2012-11-16 06:52

administrator   ~0007286

Nope, quick fix didn't work.

nicole

nicole

2012-11-16 07:23

administrator   ~0007289

This is kind of odd: in the debugger, at the crash point the renderer is valid but the camera is not:
(gdb) frame 0
#0 0x00007fffe9b05fc4 in vtkRenderer::ViewToWorld (this=0xd9be8e0, x=@0xe20d740, y=@0xe20d748, z=@0xe20d750)
at /projects/birn/nicole/Slicer-git/SlicerSlicer/Slicer-Superbuild/VTK/Rendering/vtkRenderer.cxx:1327
1327 this->GetTiledAspectRatio(),0,1);
(gdb) print this->ActiveCamera
$1 = (vtkCamera *) 0x0

as I was poking through the backtrace, I called GetActiveCamera() and it kept returning a valid camera. Back to frame 0, and the camera is all of a sudden valid again. It turns out that GetActiveCamera sets a camera if one isn't defined according to vtkRenderer.h.
Trying one more thing in the annotation displayable manager...

nicole

nicole

2012-11-16 07:50

administrator   ~0007290

Pushed a patch to my github[1], making sure to check for a valid renderer and active camera before trying to set the display position on the seeds. Also make sure that on creation that the seed and represetnation have the correct and same renderers.

[1] https://github.com/naucoin/Slicer/commit/813046dc70286c7f81a7c5d4b125e9a5f3f2653d

jcfr

jcfr

2012-11-16 08:57

administrator   ~0007291

Does it still make sens to rush with last minute code that may break stuff ?
I set the target date for 4.2.2 to be December 1st.
It would probably make sens to re-target this issue for December 1st.
Let me know what you think ?

nicole

nicole

2012-11-16 09:40

administrator   ~0007293

Found another issue: the light box in which to display a fiducial isn't being correctly determined if the volume slice spacing is != 1.

In light of this, since we're back to the annotations occasionally showing up in the wrong place, Steve and I feel that we can retarget this for 4.2.2.

millerjv

millerjv

2012-11-16 10:13

developer   ~0007296

Last edited: 2012-11-16 10:14

I think the central issue here is that the widgets rely on the CAMERA to properly convert to/from world coordinates.

However, Slicer really doesn't utilize the camera in the 2D views. The situation get muddled further when in lightbox mode. It is hard to follow the code but all the panes in the lightbox may share the same camera.

I think what needs to happen is that each renderer in the lightbox needs to have a unique camera AND each camera needs to configured specific for the slice that camera is displaying. This is so the widget/coordinate classes can utilize the camera projection matrix to go from World to View to Normalized Viewport to Viewport to Normalized Display to Display.

The problem here is that all the current renderering in the SliceViews assumes a default camera since handle all the mapping ourselves.

jcfr

jcfr

2012-11-16 10:25

administrator   ~0007297

Base on recent finding and discussion. Retargeted for 4.2.2 (Dec 1st)

Make sure to update your topic so that it is based on current trunk:

Rename topic

git checkout 1690-fiducial-shows-in-wrong-lightbox-cell
git branch -M 1690-fiducial-shows-in-wrong-lightbox-cell-old

Update master

git checkout master
git checkout svn rebase

Create new topic and cherry pick commit of interest

git checkout -b 1690-fiducial-shows-in-wrong-lightbox-cell
git cherry-pick 30c8fb4
git cherry-pick 6f5cfe0
git cherry-pick b9b0163
git cherry-pick 2b21cea

Delete local obsolete topic

git branch -D 1690-fiducial-shows-in-wrong-lightbox-cell-old

Push new version of the topic on your fork

git push naucoin 1690-fiducial-shows-in-wrong-lightbox-cell --force

nicole

nicole

2012-11-16 10:54

administrator   ~0007299

Thanks for the steps. I'm not using git svn, so I had to use
git pull origin master
to get the updates, and then had to issue the cherry pick commands in the reverse order, but it seems to have worked.

jcfr

jcfr

2012-12-04 11:30

administrator   ~0007410

From hangout discussion> Make sure to consider spacing when going from Ras to lightbox coordinate.

nicole

nicole

2012-12-06 11:26

administrator   ~0007423

Checked in an update to my github that takes into account volume slice spacing when in light box mode - only show fiducials that are within 0.5mm of a light box slice.
https://github.com/naucoin/Slicer/commit/9ff3c39a0931c10c2bff9edd2337ef508b54077b

Still working on debugging the swapping between 2d and 3d handles when switch between light box and 1x1 mode.

jcfr

jcfr

2012-12-06 13:17

administrator   ~0007428

1) Extra. I added few comment on the last commit of the topic

2) Is the issue "swapping between 2d and 3d handles" a show stopper or simply a aesthetic details ?

3) Steve mentioned he would be working on the "snapping" of annotation to closed slice, has this been addressed yet ?

pieper

pieper

2012-12-06 13:38

administrator   ~0007429

Hi Jc - Regarding your third point, see child issue 0002821. Nicole will respond on the others.

nicole

nicole

2012-12-06 13:51

administrator   ~0007431

  1. pushed commit responding to the comments
  2. show stopper: the fiducials were either not appearing or appearing in the wrong place.

It looks like the current state of my github branch fixes the issues (except for a random reset to a starburst glyph instead of the circle glyph when coming back to 1x1 mode) on Mac, though Linux is still having update/renderer issues (fids show in the wrong light box cell, but update correctly on scroll).

nicole

nicole

2012-12-06 14:55

administrator   ~0007442

github commit de6aa0c fixed the glyph update when switching out of light box mode.

nicole

nicole

2012-12-07 10:00

administrator   ~0007454

as of svn 21495, work from github ported back to Slicer trunk. Rulers are disabled, but fiducials are re-enabled.

jcfr

jcfr

2012-12-07 11:07

administrator   ~0007456

Should the issue be resolved ?

An other issue to keep track of the fact Ruler are disabled could be created.

nicole

nicole

2012-12-07 11:30

administrator   ~0007457

There are still some issues with the display on Linux that I'd like to try and track down, but I created another issue for the rulers since they'll have their own special cases, bug # 2823

jcfr

jcfr

2012-12-07 11:35

administrator   ~0007458

Last edited: 2012-12-07 11:36

Would it be possible to list the know issues, I will then mention them in the release notes.

We should probably create separate issue to track this specific issues. That we will be able to close this one. Would that make sens ?

nicole

nicole

2012-12-07 11:38

administrator   ~0007459

When switching into lightbox mode on some Linux systems (SPL workstations show this behaviour), the fiducials sometimes don't update their position until the slices are scrolled.

2012-12-07 13:33

 

issue1690_r21495_step1.png (290,673 bytes)
issue1690_r21495_step1.png (290,673 bytes)

2012-12-07 13:33

 

issue1690_r21495_step2.png (146,652 bytes)
issue1690_r21495_step2.png (146,652 bytes)
jcfr

jcfr

2012-12-07 13:34

administrator   ~0007461

Last edited: 2012-12-07 13:36

Download sample data: MRHead

Step1: Lay down some fiducials along the slicer intersection
Step2: Switch to lightbox. Attempt to move the visible fiducial -> crash

See screenshots issue1690_r21495_step{1,2}.png

pieper

pieper

2012-12-07 13:40

administrator   ~0007462

I can't replicate the crash reported in 7461. Can you generate a stack trace?

jcfr

jcfr

2012-12-07 13:43

administrator   ~0007463

Last edited: 2012-12-07 13:48

Experience 2:

1) Load sample data MRHead

[[ 2) Enable slice interaction ]] -> don't think that is related to the issue

3) Set annationation mode to persistent

4) Lay down a lot of fiducial.
See experience2_issue1690_r21495_step1.png

5) Switch yellow slice to 1x6 light box.
See experience2_issue1690_r21495_step2.png

6) Try to select the cross -> impossible to really move them.
See experience2_issue1690_r21495_step3.png

7) Go back to normal view 1x1
Forgot to take screenshot ...

8) Go back to 1x6 - move fiducial and or the cross -> crash
See experience2_issue1690_r21495_step5.png

2012-12-07 13:44

 

2012-12-07 13:44

 

2012-12-07 13:44

 

2012-12-07 13:46

 

2012-12-07 17:14

 

2012-12-07 17:14

 

jcfr

jcfr

2012-12-07 17:15

administrator   ~0007464

Experience 3: Associated screenshots shows the corresponding stacktrace

pieper

pieper

2012-12-08 04:29

administrator   ~0007466

I was never able to get it to crash, but I did see that in 1xN modes the conversion from 3D to 2D fiducials and back again wasn't reliable. I can see how this would lead to a crash. I didn't see this for MxN modes where M > 1 so that may be a clue for debugging.

nicole

nicole

2012-12-24 09:40

administrator   ~0007575

Following JC's steps in note 7463 I was able to get a crash as well. Only some of the fiducials that I placed updated to 2d/3d when swapping in and out of lightbox, but as I interacted with them via the Fids module GUI, updates led to the 3d ones disappearing entirely. Part of it is that the visibility check is done first (is the fid in the fov of the new narrower viewport brought about by swapping to 1xN mode?) and then the 2d/3d update is triggered and that does't happen if the fid isn't visible. Still tracing through all the paths that various events can lead to to try and shut down the error cases.

jcfr

jcfr

2013-08-20 12:12

administrator   ~0009534

Reminder sent to: millerjv

From Nicole: Could you comment on this issue ?

nicole

nicole

2013-08-23 11:01

administrator   ~0009571

Double checked this with the Markups module, no crashing, but it is showing some odd behaviour that I think is related to the slice node / layout update and widget refresh rate.

nicole

nicole

2013-08-23 11:05

administrator   ~0009572

Reminder sent to: millerjv

Jim: Could you try running the MarkupsInCompareViewers test from the SelfTest GUI? Look at the error messages and you can see that there are complaints about not having a valid slice node in the displayable manager (see below) as it switches between compare view layouts. I think this is one of the causes of odd behaviour with the fiducials as the user switches between numbers of lightboxes/compare views, the layout update and the displayable manager update get a bit out of synch.

ERROR: In /projects/birn/nicole/Slicer42/Slicer/Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsDisplayableManager2D.cxx, line 1168
vtkMRMLMarkupsFiducialDisplayableManager2D (0x6f04d60): GetWorldToDisplayCoordinates: no slice node!

ERROR: In /projects/birn/nicole/Slicer42/Slicer/Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsDisplayableManager2D.cxx, line 783
vtkMRMLMarkupsFiducialDisplayableManager2D (0x6f04d60): IsWidgetDisplayableOnSlice: Could not get the sliceNode.

ERROR: In /projects/birn/nicole/Slicer42/Slicer/Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsDisplayableManager2D.cxx, line 1168
vtkMRMLMarkupsFiducialDisplayableManager2D (0x6f04d60): GetWorldToDisplayCoordinates: no slice node!

ERROR: In /projects/birn/nicole/Slicer42/Slicer/Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsDisplayableManager2D.cxx, line 783
vtkMRMLMarkupsFiducialDisplayableManager2D (0x6f04d60): IsWidgetDisplayableOnSlice: Could not get the sliceNode.

ERROR: In /projects/birn/nicole/Slicer42/Slicer/Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsDisplayableManager2D.cxx, line 1168
vtkMRMLMarkupsFiducialDisplayableManager2D (0x6f04d60): GetWorldToDisplayCoordinates: no slice node!

ERROR: In /projects/birn/nicole/Slicer42/Slicer/Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsDisplayableManager2D.cxx, line 783
vtkMRMLMarkupsFiducialDisplayableManager2D (0x6f04d60): IsWidgetDisplayableOnSlice: Could not get the sliceNode.

nicole

nicole

2013-08-30 10:53

administrator   ~0009733

Still working on this one, don't think it'll be done by Tuesday morning.
Issues found/fixed so far:

  • use the superclass GetMRMLSliceNode instead of holding onto a local slice node that doesn't get updated
  • added a vtkInternal to mirror the crosshair displayable manager and to add an observation on the composite node so get events when change into a new layout and set the background volume
  • the widget was being enabled/disabled and over riding the seed handle enabled states, leftover assumptions from the annotations module where there was only one seed per seed widget, still debugging this
  • related: need to get the light box index and the proper renderer when in lightbox view and set those on the individual seed handles without getting into a state where the seed widget doesn't have a renderer or has the wrong one. It may come to having to switch to a one seed per widget model when in light box mode...
  • having a chicken/egg problem when changing layouts, the layout node broadcasts that it's changed the layout, and a new view node gets added, and the displayable manager is added by the displayable manager group and wants to create and update widgets. The only problem is that the viewers haven't been fully set up yet, so there's either no renderer or no active camera on the renderer and I end up with a null pointer crash in VTK Rendering. This may require some refactoring of events above the Markups module when changing layouts:

Program received signal SIGSEGV, Segmentation fault.
0x00007f173efb7f88 in vtkRenderer::ViewToWorld (this=0x6e10ee0, x=@0x6efd3e0, y=@0x6efd3e8, z=@0x6efd3f0)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Rendering/vtkRenderer.cxx:1327
1327 this->GetTiledAspectRatio(),0,1);
(gdb) bt
#0 0x00007f173efb7f88 in vtkRenderer::ViewToWorld (this=0x6e10ee0, x=@0x6efd3e0, y=@0x6efd3e8, z=@0x6efd3f0)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Rendering/vtkRenderer.cxx:1327
0000001 0x00007f172ba3de0d in vtkCoordinate::GetComputedWorldValue (this=0x6efd380, viewport=0x6e10ee0)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Filtering/vtkCoordinate.cxx:209
0000002 0x00007f1740aff07f in vtkPointPlacer::ComputeWorldPosition (this=0x6ef2a60, ren=0x6e10ee0, displayPos=0x7fff4cb9a970, worldPos=0x7fff4cb9a7b0)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Widgets/vtkPointPlacer.cxx:54
0000003 0x00007f1740a82629 in vtkHandleRepresentation::SetDisplayPosition (this=0x6efc700, displyPos=0x7fff4cb9a970)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Widgets/vtkHandleRepresentation.cxx:62
0000004 0x00007f1740af94ed in vtkPointHandleRepresentation2D::SetDisplayPosition (this=0x6efc700, p=0x7fff4cb9a970)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Widgets/vtkPointHandleRepresentation2D.cxx:137
0000005 0x00007f1740b24fda in vtkSeedRepresentation::SetSeedDisplayPosition (this=0x6ef2580, seedNum=0, pos=0x7fff4cb9a970)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Widgets/vtkSeedRepresentation.cxx:115
0000006 0x00007f1706eedd57 in vtkMRMLMarkupsFiducialDisplayableManager2D::UpdateNthSeedPositionFromMRML (this=0x6e2b180, n=0, widget=0x6ef92a0, pointsNode=
0x67e87e0) at /projects/birn/nicole/Slicer42/Slicer/Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsFiducialDisplayableManager2D.cxx:421
0000007 0x00007f1706eee9c1 in vtkMRMLMarkupsFiducialDisplayableManager2D::SetNthSeed (this=0x6e2b180, n=0, fiducialNode=0x67e87e0, seedWidget=0x6ef92a0)
at /projects/birn/nicole/Slicer42/Slicer/Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsFiducialDisplayableManager2D.cxx:488
---Type <return> to continue, or q <return> to quit---
0000008 0x00007f1706ef2024 in vtkMRMLMarkupsFiducialDisplayableManager2D::PropagateMRMLToWidget (this=0x6e2b180, node=0x67e87e0, widget=0x6ef92a0)
at /projects/birn/nicole/Slicer42/Slicer/Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsFiducialDisplayableManager2D.cxx:1039
0000009 0x00007f1706ee3003 in vtkMRMLMarkupsDisplayableManager2D::AddWidget (this=0x6e2b180, markupsNode=0x67e87e0)
at /projects/birn/nicole/Slicer42/Slicer/Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsDisplayableManager2D.cxx:1635
0000010 0x00007f1706edbaca in vtkMRMLMarkupsDisplayableManager2D::UpdateFromMRML (this=0x6e2b180)
at /projects/birn/nicole/Slicer42/Slicer/Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsDisplayableManager2D.cxx:389
0000011 0x00007f1706edc334 in vtkMRMLMarkupsDisplayableManager2D::UpdateFromMRMLScene (this=0x6e2b180)
at /projects/birn/nicole/Slicer42/Slicer/Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsDisplayableManager2D.cxx:530
0000012 0x00007f1748a8ff54 in vtkMRMLAbstractLogic::ObserveMRMLScene (this=0x6e2b180)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Logic/vtkMRMLAbstractLogic.cxx:494
0000013 0x00007f1748a8f638 in vtkMRMLAbstractLogic::SetMRMLScene (this=0x6e2b180, newScene=0x21d1b60)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Logic/vtkMRMLAbstractLogic.cxx:285
0000014 0x00007f1748df23a1 in vtkMRMLAbstractDisplayableManager::SetAndObserveMRMLDisplayableNode (this=0x6e2b180, newMRMLDisplayableNode=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/DisplayableManager/vtkMRMLAbstractDisplayableManager.cxx:823
0000015 0x00007f1748df72f3 in vtkMRMLDisplayableManagerGroup::SetMRMLDisplayableNode (this=0x6e366f0, newMRMLDisplayableNode=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/DisplayableManager/vtkMRMLDisplayableManagerGroup.cxx:383
---Type <return> to continue, or q <return> to quit---
0000016 0x00007f174ced95fb in qMRMLSliceView::setMRMLSliceNode (this=0x6e0b210, newSliceNode=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLSliceView.cxx:290
0000017 0x00007f174cedbdf8 in qMRMLSliceWidget::setMRMLSliceNode (this=0x69140d0, newSliceNode=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLSliceWidget.cxx:122
0000018 0x00007f174ce7cf5e in qMRMLLayoutManagerPrivate::createSliceWidget (this=0x354da10, sliceNode=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLLayoutManager.cxx:269
0000019 0x00007f174d2f156c in qSlicerLayoutManagerPrivate::createSliceWidget (this=0x354da10, sliceNode=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer/Base/QTGUI/qSlicerLayoutManager.cxx:75
0000020 0x00007f174ce7daec in qMRMLLayoutManagerPrivate::onNodeAddedEvent (this=0x354da10, scene=0x21d1b60, node=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLLayoutManager.cxx:433
0000021 0x00007f174cf0f677 in qMRMLLayoutManagerPrivate::qt_metacall (this=0x354da10, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff4cb9b2d0)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/Slicer-build/Libs/MRML/Widgets/moc_qMRMLLayoutManager_p.cxx:86
0000022 0x00007f1742b51f88 in QMetaObject::activate(QObject, QMetaObject const, int, void**) ()
from /projects/birn/nicole/Qt/QtSDK/Desktop/Qt/474/gcc/lib/libQtCore.so.4
0000023 0x00007f1746fd2eda in ctkVTKConnection::emitExecute (this=0x355f500, _t1=0x21d1b60, _t2=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/CTK-build/CTK-build/Libs/Visualization/VTK/Core/moc_ctkVTKConnection.cxx:99
---Type <return> to continue, or q <return> to quit---
0000024 0x00007f1746fbce3a in ctkVTKConnectionPrivate::execute (this=0x3566320, vtk_obj=0x21d1b60, vtk_event=8193, client_data=0x3566320, call_data=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/CTK/Libs/Visualization/VTK/Core/ctkVTKConnection.cpp:405
0000025 0x00007f1746fbcb8e in ctkVTKConnectionPrivate::DoCallback (vtk_obj=0x21d1b60, event=8193, client_data=0x3566320, call_data=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/CTK/Libs/Visualization/VTK/Core/ctkVTKConnection.cpp:368
0000026 0x00007f172b2a93ab in vtkCallbackCommand::Execute (this=0x36a7be0, caller=0x21d1b60, event=8193, callData=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Common/vtkCallbackCommand.cxx:42
0000027 0x00007f17415f712a in vtkEventBroker::InvokeObservation (this=0x212c440, observation=0x36a85a0, eid=8193, callData=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Core/vtkEventBroker.cxx:868
0000028 0x00007f17415f66ff in vtkEventBroker::ProcessEvent (this=0x212c440, observation=0x36a85a0, caller=0x21d1b60, eid=8193, callData=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Core/vtkEventBroker.cxx:716
0000029 0x00007f17415f7719 in vtkEventBroker::Callback (caller=0x21d1b60, eid=8193, clientData=0x36a85a0, callData=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Core/vtkEventBroker.cxx:943
0000030 0x00007f172b2a93ab in vtkCallbackCommand::Execute (this=0x36a7b90, caller=0x21d1b60, event=8193, callData=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Common/vtkCallbackCommand.cxx:42
0000031 0x00007f172b38997f in vtkSubjectHelper::InvokeEvent (this=0x21cf6a0, event=8193, callData=0x6da5920, self=0x21d1b60)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Common/vtkObject.cxx:620
---Type <return> to continue, or q <return> to quit---
0000032 0x00007f172b389e8f in vtkObject::InvokeEvent (this=0x21d1b60, event=8193, callData=0x6da5920)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Common/vtkObject.cxx:789
0000033 0x00007f1741795cd0 in vtkMRMLScene::AddNode (this=0x21d1b60, n=0x6da5920) at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Core/vtkMRMLScene.cxx:1342
0000034 0x00007f1748ab04c3 in vtkMRMLLayoutLogic::CreateMissingViews (this=0x354ec40, layoutRootElement=0x2fbde30)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Logic/vtkMRMLLayoutLogic.cxx:1367
0000035 0x00007f1748ab00ab in vtkMRMLLayoutLogic::CreateMissingViews (this=0x354ec40)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Logic/vtkMRMLLayoutLogic.cxx:1339
0000036 0x00007f1748aac798 in vtkMRMLLayoutLogic::UpdateFromLayoutNode (this=0x354ec40)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Logic/vtkMRMLLayoutLogic.cxx:754
0000037 0x00007f1748aac1d1 in vtkMRMLLayoutLogic::OnMRMLNodeModified (this=0x354ec40)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Logic/vtkMRMLLayoutLogic.cxx:659
0000038 0x00007f1748a9006d in vtkMRMLAbstractLogic::ProcessMRMLNodesEvents (this=0x354ec40, caller=0x3562e80, event=33)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Logic/vtkMRMLAbstractLogic.cxx:517
0000039 0x00007f1748a8f11b in vtkMRMLAbstractLogic::MRMLNodesCallback (caller=0x3562e80, eid=33, clientData=0x354ec40, callData=0x0)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Logic/vtkMRMLAbstractLogic.cxx:197
0000040 0x00007f172b2a93ab in vtkCallbackCommand::Execute (this=0x356d9a0, caller=0x3562e80, event=33, callData=0x0)
---Type <return> to continue, or q <return> to quit---
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Common/vtkCallbackCommand.cxx:42
0000041 0x00007f172b38997f in vtkSubjectHelper::InvokeEvent (this=0x354dad0, event=33, callData=0x0, self=0x3562e80)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Common/vtkObject.cxx:620
0000042 0x00007f172b389e8f in vtkObject::InvokeEvent (this=0x3562e80, event=33, callData=0x0)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Common/vtkObject.cxx:789
0000043 0x00007f172b38a05e in vtkObject::Modified (this=0x3562e80) at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Common/vtkObject.cxx:855
0000044 0x00007f1741e2d002 in vtkMRMLNode::InvokePendingModifiedEvent (this=0x3562e80) at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Core/vtkMRMLNode.h:380
0000045 0x00007f1741e2a000 in vtkMRMLNode::EndModify (this=0x3562e80, previousDisableModifiedEventState=0)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Core/vtkMRMLNode.h:228
0000046 0x00007f174184dc15 in vtkMRMLLayoutNode::SetViewArrangement (this=0x3562e80, arrNew=12)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Core/vtkMRMLLayoutNode.cxx:205
0000047 0x00007f174ce800ea in qMRMLLayoutManager::setLayout (this=0x3568020, layout=12)
at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLLayoutManager.cxx:965
0000048 0x00007f174cf0ec9e in qMRMLLayoutManager::qt_metacall (this=0x3568020, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7fff4cb9be60)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/Slicer-build/Libs/MRML/Widgets/moc_qMRMLLayoutManager.cxx:142
0000049 0x00007f174d35489a in qSlicerLayoutManager::qt_metacall (this=0x3568020, _c=QMetaObject::InvokeMetaMethod, _id=13, _a=0x7fff4cb9be60)
---Type <return> to continue, or q <return> to quit---
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/Slicer-build/Base/QTGUI/moc_qSlicerLayoutManager.cxx:68
0000050 0x00007f17457e333a in PythonQtCallSlot (classInfo=0x2948f90, objectToCall=0x3568020, args=0x35cc5d0, strict=false, info=0x3ea2730, firstArgument=0x0,
pythonReturnValue=0x7fff4cb9c158, directReturnValuePointer=0x0)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/CTK-build/PythonQt/src/PythonQtSlot.cpp:171
0000051 0x00007f17457e4d4f in PythonQtSlotFunction_CallImpl (classInfo=0x2948f90, objectToCall=0x3568020, info=0x3ea2730, args=0x35cc5d0, firstArg=0x0,
directReturnValuePointer=0x0) at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/CTK-build/PythonQt/src/PythonQtSlot.cpp:338
0000052 0x00007f17457e3e9d in PythonQtMemberFunction_Call (info=0x3ea2730, m_self=0x35c8110, args=0x35cc5d0, kw=0x0)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/CTK-build/PythonQt/src/PythonQtSlot.cpp:250
0000053 0x00007f17457e3ab3 in PythonQtSlotFunction_Call (func=0x35cdb90, args=0x35cc5d0, kw=0x0)
at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/CTK-build/PythonQt/src/PythonQtSlot.cpp:238
0000054 0x00007f174630ade3 in PyObject_Call () from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/python-install/lib/libpython2.7.so
0000055 0x00007f17463adf1d in PyEval_EvalFrameEx () from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/python-install/lib/libpython2.7.so
0000056 0x00007f17463af4ce in PyEval_EvalFrameEx () from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/python-install/lib/libpython2.7.so
0000057 0x00007f17463b05ce in PyEval_EvalCodeEx () from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/python-install/lib/libpython2.7.so
0000058 0x00007f174633de51 in function_call () from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/python-install/lib/libpython2.7.so
0000059 0x00007f174630ade3 in PyObject_Call () from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/python-install/lib/libpython2.7.so

The crux of the current problem with changing

nicole

nicole

2013-10-09 14:17

administrator   ~0010170

Possibly related issue found while trying to debug missing key press events:

I think I copied the method to add an initial initialize step in the displayable mangers from a source with a typo in it.
In vtkMRMLAbstractDisplayableManager.h it's:
AdditionalInitializeStep
but in vtkMRMLCameraDisplayableManager.h it's:
AdditionnalInitializeStep
with an extra n. Using that signature, it was never getting called in my Markups displayable managers.

Doing a quick test to see what happens when I take the extra n out of the camera displayable manager, I noticed that it's got an assert, and that it's setting the active camera on the renderer, which might explain some of the problems seen in this bug if it wasn't getting triggered. Building now and will run tests and upload them to the dashboard with the camera displayable manager change.

millerjv

millerjv

2013-10-10 11:41

developer   ~0010171

Spelling mistakes are nasty bugs. Had one a while ago where the function name in the superclass had a typo. So my classes correctly spelled function override was never called.

Did this fix the issue?

nicole

nicole

2013-10-14 06:25

administrator   ~0010175

Last edited: 2013-10-14 07:59

Unfortunately it didn't fix this issue, but I suspect that's partially because I'd already put in code to catch null pointers. I want to check in the fix though as it is a bug and it didn't break any of the tests when I submitted an experimental build, these failing tests are due to a corrupted mrb and a widget size check failing:
http://slicer.cdash.org/viewTest.php?onlyfailed&buildid=158070

Checked in the fix as svn 22611:
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=22611

jcfr

jcfr

2013-10-21 06:11

administrator   ~0010203

Backported r22611 to branch Slicer-4-3.

See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=22626

pieper

pieper

2014-03-07 09:37

administrator   ~0011360

Will take another run at resolving this issue, but if not we will disable the fiducials when in light box mode and provide a dialog box warning users that fiducials will disappear when going into light box mode.

jcfr

jcfr

2014-07-11 04:41

administrator   ~0012160

@Steve, @nicole: What about re-using the logic used by the cross-hair ?

pieper

pieper

2014-07-11 04:51

administrator   ~0012162

@jcfr I'm fine with that. @Nicole let us know if you need another set of eyes on this.

nicole

nicole

2014-07-11 06:40

administrator   ~0012167

I already implemented the cross hair logic, the error is currently from using the vtkSeedWidget as a 2d implementation. I have some code in a topic branch that might fix it, I need to rebase it and recheck it.

jcfr

jcfr

2014-07-12 16:34

administrator   ~0012172

Excellent. Let me know if you like me to test a topic.

jcfr

jcfr

2014-12-20 17:41

administrator   ~0012797

For reference, commit r23841 [1] should help to address the "no active camera" warning/issue.

[1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=23841

nicole

nicole

2015-11-03 13:51

administrator   ~0013537

Disabling fiducials in light box mode:

I¹m fairly certain that this logic check is backward since the point handles were becoming visible again when I¹d mouse near them after turning their visibility off:
https://github.com/Slicer/VTK/blob/slicer-v6.3.0-2015-07-21-426987d/Interaction/Widgets/vtkPointHandleRepresentation2D.cxx#L176
I can get around it by turning the active representation on in Slicer, will submit a patch when I'm sure it works.

jcfr

jcfr

2015-11-03 14:13

administrator   ~0013538

Considering the documentation:

// Description:
// Flag controls whether the widget becomes visible when the mouse pointer
// moves close to it (i.e., the widget becomes active). By default,
// ActiveRepresentation is off and the representation is always visible.

the code makes sense.

By setting the property "ActiveRepresentation" to 1, the widget will be hidden if the mouse is away, and visible if it is nearby.

That said, to ensure that the visibility of a widget representation is not affected by the mouse, seems you need to disable the widget to ensure mouse interaction won't affect the visibility of the associated representations.

See https://github.com/Slicer/VTK/blob/8e43f69ff8ae0b5c464f431acc2ae48780a51ce6/Interaction/Widgets/vtkAbstractWidget.h#L69-L75

For markups, that means that:

  • LOCKED:

    • TRUE: widget enabled
    • FALSE: widget disabled
  • VISIBLE:
    • TRUE: visibility on
    • FALSE: visbility off + widget disabled

In any case, ActiveRepresentation should be set to 0.

nicole

nicole

2015-11-03 14:58

administrator   ~0013539

Thanks for the clarification, I'll double check my logic!

I'm still unable to get the seed widget to behave properly when swtiching between lightbox and non light box modes in terms of having the correct types of handles (I'd tried to fix this issue by moving to 2d point handles when in light box) and the correct number of handles (found a state where there's a mix of types). Will pick it up again tomorrow, I won't be able to fix it tonight.

nicole

nicole

2015-11-04 06:49

administrator   ~0013556

For the ActiveRepresentatin, this is the annotated code snippet that's confusing me:
// by default, the handle is visible:
this->VisibilityOn();
double tol2 = this->Tolerance * this->Tolerance;
if ( vtkMath::Distance2BetweenPoints(xyz,pos) <= tol2 )
{
// the mouse is nearby, the handle is always visible
this->InteractionState = vtkHandleRepresentation::Nearby;
}
else
{
// the mouse isn't nearby
this->InteractionState = vtkHandleRepresentation::Outside;
// if the handle is not supposed to be visible due to other factors than nearby/outside, but active representation is on, this check leaves the handle visible, over riding the visibility off call made elsewhere due to the default above.
if ( this->ActiveRepresentation )
{
this->VisibilityOff();
}
}

I see what you mean about the enabled state, but it seems backward to me that this is the current default behaviour (with active representation off):
I set this handle to be invisible.
I mouse near it, it becomes visible again.

nicole

nicole

2015-11-04 08:08

administrator   ~0013559

Topic branch disabling showing fiducials has been pushed:
https://github.com/naucoin/Slicer/tree/1690-Fiducial-shows-in-wrong-lightbox-cell
Pull request:
https://github.com/Slicer/Slicer/pull/399

jcfr

jcfr

2015-11-11 13:13

administrator   ~0013595

Integrated in r24726
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=24726

Note that in rr24727, I added a check to disable the popup if testing is enabled.

lassoan

lassoan

2017-06-13 15:15

developer   ~0014821

Considering how difficult (I would say practically nearly impossible) to implement interactions correctly in lightbox views - what about taking a different approach and generating lightbox views as static image mosaics instead? Posted more details and asked for feedback here: https://discourse.slicer.org/t/who-uses-lightbox-view/495

lassoan

lassoan

2018-05-30 00:35

developer   ~0015806

Retarget stale issues to backlog.

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file 15908f5b

2012-12-07 14:53:01

naucoin

Details Diff
BUG: fix fiducial display in light box mode.

Use the renderer from the light box proxy manager if it's defined
When in light box mode, switch to using 2d point handles for fiducials.
Avoid seed widget and representation having different renderers on creation.
Unify light box index calculation.
Fix the annotations showing up in the 0th light box when the annotation
should be in the -1th.
Take into account volume spacing, calculate the distance between the fiducial
and the slice at this light box index using distance from the fiducial point and the slice plane.
Reset the glyph type when changing in and out of lightbox mode.

Issue 0001690


git-svn-id: http://svn.slicer.org/Slicer4/trunk@21494 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Applications/SlicerApp/Testing/Python/CMakeLists.txt Diff File
mod - Base/QTCore/qSlicerSceneBundleIO.cxx Diff File
mod - Modules/Loadable/Annotations/MRMLDisplayableManager/vtkMRMLAnnotationDisplayableManager.cxx Diff File
mod - Modules/Loadable/Annotations/MRMLDisplayableManager/vtkMRMLAnnotationDisplayableManager.h Diff File
mod - Modules/Loadable/Annotations/MRMLDisplayableManager/vtkMRMLAnnotationFiducialDisplayableManager.cxx Diff File

Slicer: 2145-support-for-installing-extension-from-file d02e772f

2013-10-14 11:58:40

naucoin

Details Diff
BUG: fix typo in AdditionalInitializeStep method name

Fixing a mis spelling in the additional initialize step method name.
In vtkMRMLAbstractDisplayableManager it's defined as:
AdditionalInitializeStep
but vtkMRMLCameraDisplayableManager was using:
AdditionnalInitializeStep
with an extra n. Using that signature, it was never getting called
so when new layout windows were being created, the active camera
was not getting set on the renderer.

Issue 0001690



git-svn-id: http://svn.slicer.org/Slicer4/trunk@22611 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/MRML/DisplayableManager/vtkMRMLCameraDisplayableManager.cxx Diff File
mod - Libs/MRML/DisplayableManager/vtkMRMLCameraDisplayableManager.h Diff File

Import 2017-06-07 23:51:09: master 5bda82b9

2014-12-20 22:15:09

jcfr

Details Diff
BUG: Update CTK to fix Fix warning related to missing active camera

// ----------
vtkLightBoxRendererManager - Fix warning related to missing active camera

This issue was occurring after (1) adding a markup and (2) registering
a custom Slicer layout having at least on Slice view.

It addresses the following warning:

WorldToView: no active camera, cannot compute world to view, returning 0,0,0

The "no active camera" warning/issue is also discussed in Slicer issue
0001690 but note that this commit does NOT address that problem.
// ----------

$ git shortlog cb53ac3..07222d0 --no-merges
Jean-Christophe Fillion-Robin (1):
vtkLightBoxRendererManager - Fix warning related to missing active camera

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23841 3bd1e089-480b-0410-8dfb-8563597acbee
mod - SuperBuild/External_CTK.cmake Diff File

Import 2017-06-07 23:51:09: master 0a7c91eb

2015-11-11 17:31:58

jcfr

Details Diff
BUG: Disable fiducials in light box mode. See 0001690

Fiducials are not being properly positioned when in light box mode, this
change disables them and gives the user a warning that they are being
disabled (new fiducials can still be placed, but will not be visible until
you exit light box mode).

This change fixes bugs that were left from the attempt to use the point
handle widgets in 2D so that they can be properly hidden: fix the
visibility setting on the point handles in light box mode, disable
the point handles when invisible so that they don't become visible
when the mouse is near it, updated a visibility check comparision
to match return type from method.

Also removed warning messages by casting the 3d handles before changing
the picking state.

Fixed a bug wherein if you had a mix of fiducials having been placed
in lightbox and not light box mode, the seed widget would have a mix
of 2d and 3d handles.

This fix removes all the current handles so that they're properly
recreated as the necessary type.

Issue 0001690

From: Nicole Aucoin <nicole@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24726 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/MRML/Widgets/qMRMLSliceControllerWidget.cxx Diff File
mod - Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsDisplayableManager2D.cxx Diff File
mod - Modules/Loadable/Markups/MRMLDM/vtkMRMLMarkupsFiducialDisplayableManager2D.cxx Diff File

Issue History

Date Modified Username Field Change
2012-02-07 09:26 pieper New Issue
2012-02-07 09:26 pieper Status new => assigned
2012-02-07 09:26 pieper Assigned To => nicole
2012-02-07 09:26 pieper File Added: Selection_181.png
2012-08-20 09:53 nicole Target Version => Slicer 4.2.0 - Feature freeze Sept 1st 2012
2012-08-20 11:46 jcfr Note Added: 0005625
2012-08-20 12:01 jcfr Relationship added related to 0001914
2012-10-23 16:23 nicole Note Added: 0006715
2012-10-25 12:08 jcfr Note Added: 0006758
2012-10-25 12:40 nicole Note Added: 0006767
2012-10-25 13:22 jcfr Note Added: 0006775
2012-10-25 13:43 nicole Note Added: 0006780
2012-10-25 13:59 jcfr Note Added: 0006783
2012-10-25 14:33 nicole Note Added: 0006797
2012-10-25 14:58 jcfr Note Added: 0006800
2012-10-25 15:01 jcfr File Added: Screenshot-issue-1690-note-6800.png
2012-10-26 08:00 nicole Note Added: 0006809
2012-10-26 17:57 nicole Note Added: 0006827
2012-10-26 17:57 nicole Status assigned => acknowledged
2012-10-26 17:58 nicole Target Version Slicer 4.2.0 - coming release => Slicer 4.3.0
2012-11-02 10:45 nicole Note Added: 0007023
2012-11-02 10:45 nicole Status acknowledged => assigned
2012-11-02 10:45 nicole Target Version Slicer 4.3.0 => Slicer 4.2.1
2012-11-02 13:32 nicole Note Added: 0007026
2012-11-02 15:14 pieper Note Added: 0007029
2012-11-02 15:16 pieper Note Added: 0007030
2012-11-02 15:18 pieper Note Added: 0007031
2012-11-02 15:29 millerjv Note Added: 0007032
2012-11-02 15:36 pieper Note Added: 0007033
2012-11-05 10:37 jcfr Note Added: 0007052
2012-11-06 09:50 jcfr Relationship added related to 0002732
2012-11-06 10:22 millerjv Note Added: 0007084
2012-11-06 12:28 jcfr Note Added: 0007088
2012-11-12 06:23 nicole Note Added: 0007161
2012-11-14 06:43 millerjv Note Added: 0007210
2012-11-14 06:51 jcfr Note Added: 0007214
2012-11-14 13:08 nicole Note Added: 0007224
2012-11-15 13:22 jcfr Note Added: 0007255
2012-11-15 14:37 nicole Note Added: 0007264
2012-11-15 14:45 nicole Note Edited: 0007264
2012-11-15 16:49 nicole Note Added: 0007265
2012-11-15 17:00 jcfr Note Added: 0007269
2012-11-15 17:16 nicole Note Added: 0007270
2012-11-16 03:55 pieper Note Added: 0007274
2012-11-16 05:26 jcfr Note Added: 0007278
2012-11-16 06:42 jcfr Note Added: 0007284
2012-11-16 06:46 nicole Note Added: 0007285
2012-11-16 06:52 nicole Note Added: 0007286
2012-11-16 07:23 nicole Note Added: 0007289
2012-11-16 07:50 nicole Note Added: 0007290
2012-11-16 08:57 jcfr Note Added: 0007291
2012-11-16 09:40 nicole Note Added: 0007293
2012-11-16 10:13 millerjv Note Added: 0007296
2012-11-16 10:14 millerjv Note Edited: 0007296
2012-11-16 10:21 jcfr Target Version Slicer 4.2.1 => Slicer 4.2.2
2012-11-16 10:25 jcfr Note Added: 0007297
2012-11-16 10:54 nicole Note Added: 0007299
2012-12-04 11:30 jcfr Note Added: 0007410
2012-12-06 11:26 nicole Note Added: 0007423
2012-12-06 12:11 pieper Relationship added parent of 0002821
2012-12-06 13:17 jcfr Note Added: 0007428
2012-12-06 13:38 pieper Note Added: 0007429
2012-12-06 13:51 nicole Note Added: 0007431
2012-12-06 14:55 nicole Note Added: 0007442
2012-12-07 10:00 nicole Note Added: 0007454
2012-12-07 11:07 jcfr Note Added: 0007456
2012-12-07 11:29 nicole Relationship added related to 0002823
2012-12-07 11:30 nicole Note Added: 0007457
2012-12-07 11:35 jcfr Note Added: 0007458
2012-12-07 11:36 jcfr Note Edited: 0007458
2012-12-07 11:38 nicole Note Added: 0007459
2012-12-07 13:33 jcfr File Added: issue1690_r21495_step1.png
2012-12-07 13:33 jcfr File Added: issue1690_r21495_step2.png
2012-12-07 13:34 jcfr Note Added: 0007461
2012-12-07 13:36 jcfr Note Edited: 0007461
2012-12-07 13:40 pieper Note Added: 0007462
2012-12-07 13:43 jcfr Note Added: 0007463
2012-12-07 13:44 jcfr File Added: experience2_issue1690_r21495_step1.png
2012-12-07 13:44 jcfr File Added: experience2_issue1690_r21495_step2.png
2012-12-07 13:44 jcfr File Added: experience2_issue1690_r21495_step3.png
2012-12-07 13:46 jcfr File Added: experience2_issue1690_r21495_step5.png
2012-12-07 13:47 jcfr Note Edited: 0007463
2012-12-07 13:48 jcfr Note Edited: 0007463
2012-12-07 17:14 jcfr File Added: experience3_issue1690_r21495_slicer.png
2012-12-07 17:14 jcfr File Added: experience3_issue1690_r21495_stacktrace.png
2012-12-07 17:15 jcfr Note Added: 0007464
2012-12-07 18:01 jcfr Target Version Slicer 4.2.2 => Slicer 4.2.3
2012-12-08 04:29 pieper Note Added: 0007466
2012-12-24 09:40 nicole Note Added: 0007575
2013-02-12 09:37 jcfr Target Version Slicer 4.2.3 => Slicer 4.3.0
2013-08-20 12:12 jcfr Note Added: 0009534
2013-08-23 11:01 nicole Note Added: 0009571
2013-08-23 11:01 nicole Category Module Annotations => Module Markups
2013-08-23 11:05 nicole Note Added: 0009572
2013-08-30 10:53 nicole Note Added: 0009733
2013-09-02 18:57 jcfr Target Version Slicer 4.3.0 => Slicer 4.3.1
2013-09-24 12:44 jcfr Target Version Slicer 4.3.1 => Slicer 4.3.2
2013-10-09 14:17 nicole Note Added: 0010170
2013-10-10 11:41 millerjv Note Added: 0010171
2013-10-14 06:25 nicole Note Added: 0010175
2013-10-14 07:59 nicole Note Edited: 0010175
2013-10-21 06:10 jcfr Fixed in Version => Slicer 4.3.2
2013-10-21 06:11 jcfr Note Added: 0010203
2014-03-06 10:15 nicole Target Version Slicer 4.3.2 => Slicer 4.4.0
2014-03-06 10:17 nicole Fixed in Version Slicer 4.3.2 => Slicer 4.4.0
2014-03-07 09:37 pieper Note Added: 0011360
2014-05-13 10:33 jcfr Relationship added related to 0003690
2014-05-13 10:34 jcfr Fixed in Version Slicer 4.4.0 =>
2014-05-13 10:34 jcfr Target Version Slicer 4.4.0 =>
2014-07-09 12:57 nicole Relationship added related to 0003761
2014-07-11 04:41 jcfr Note Added: 0012160
2014-07-11 04:51 pieper Note Added: 0012162
2014-07-11 06:40 nicole Note Added: 0012167
2014-07-12 16:34 jcfr Note Added: 0012172
2014-12-20 17:41 jcfr Note Added: 0012797
2015-11-03 13:51 nicole Note Added: 0013537
2015-11-03 14:13 jcfr Note Added: 0013538
2015-11-03 14:58 nicole Note Added: 0013539
2015-11-04 06:49 nicole Note Added: 0013556
2015-11-04 08:08 nicole Note Added: 0013559
2015-11-11 13:13 jcfr Note Added: 0013595
2017-06-07 23:27 Changeset attached => Slicer 2145-support-for-installing-extension-from-file d02e772f
2017-06-07 23:27 Changeset attached => Slicer 2145-support-for-installing-extension-from-file 15908f5b
2017-06-10 08:51 jcfr Changeset attached => Slicer master 0a7c91eb
2017-06-10 08:51 jcfr Changeset attached => Slicer master 5bda82b9
2017-06-13 15:15 lassoan Note Added: 0014821
2018-05-30 00:35 lassoan Target Version => backlog
2018-05-30 00:35 lassoan Note Added: 0015806