I am writing to report what seems to be a bug with the labelling of centerline curves or markup curves in general in the 3D view. The details of this bug can be found in a previous discussion here. But to summarise, there are two main problems:
When generating centerline curves using the ‘ExtractCenterline’ module from VMTK, if your 3D view is zoomed and does not show the full segmentation structure, only those curves that are included in your current view will be labelled in the 3D view.
Even when the curves are labelled initially, if you save the curves either as a .mrk.json file or the whole scene in a mrml or mrb file, when reloading it, no markup curve will be labelled in the 3D view.
To replicate the first problem, you may use this scene with a segmentation and re-run the ExtractCenterline module. To replicate the second problem, you may use the same file or just draw any mark up curve in slicer and try saving and reloading it.
I will appreciate it very much if anyone can help me check if this is indeed a bug and fix it if it is!
@chir.set@mikebind Hi! This request of mine seems to have been largely ignored, but I will still appreciate some help with it from the experts, as it is very annoying to have extracted and saved the curves and to be unable to see their labels in the 3D view when loading them later.
I don’t think it would be considered a bug by core developers, i.e, it’s doubtful they would spend time tracking the root cause.
There are other glitches. For example, with a double 3D view layout, if I apply a volume rendering then display the ROI, the resizing handles appear in the slice views, but would next disappear in the green and yellow views when the mouse cursor is over them. They persist in the red view only. I did not report it since there are other ways to resize the ROI and it does not result in an unusable workspace.
So I think thet one has to accept the kind of unexpected observation you described as it is; or convince some core developer to look into it.
Sorry for the slow response, we just have not had the chance to get to this. There is indeed something wrong with the initialization of the property label when all the control points are hidden.
A workaround until we fix the issue is to show and hide a control point; or enable occluded visibility.
Since the problem is 100% reproducible I expect that we can fix it very quickly.
Unfortunately, the problem is not so simple. It is actually a feature that a curve label is not displayed if none of the curve points are visible in the current 3D view. The check if the curve points are visible is done by checking if there is any control point that is not occluded. Occlusion check is expensive and so it is only done if a control point is visible, otherwise the previous result of the occlusion check will be used. This is not a good choice, as the curve may become visible or occluded while none of the control points are shown. If we turn off the occlusion check then the curve label would be always visible, which would mean all curve names would always be visible in all 3D views, regardles if the curve is occluded or not.
For now, you can force display of the property label by enabling occluded visibility or show one control point.
I’ve added an issue to make determination of curve visibility better:
you can force display of the property label by enabling occluded visibility
Can I please ask where I can change this setting? The other option to show one control point for each curve might be too troublesome for me, as I have many curves to load.