How to set default centerline curve width programmatically and how to have slice intersection displayed?

Operating system: Windows 10
Slicer version: 4.11.20200930

This is a 2 part question. First, I want to know how to programmatically set the default centerline curve width for the centerline curve obtained from the extract centerline module. I want to set the width to a higher number than what it generates now. Second, Is there a way to display the slice intersections even when the view(layout) only has the yellow slice only? Currently, the slice intersections don’t show up when I select the yellow slice only layout. I want the slice intersection in sagittal view(when set to four-up layout) to appear when I set the layout to yellow only, is that possible? Any help is appreciated thanks.

What do you mean by width? Diameter of the curve?
As far as I remember, the module just uses default glyph scale and line thickness. To change the defaults, go to Markups module / Display section, change the values for any of the curves, and click Save to Defaults. Right now, glyph scale is saved to defaults but line thickness is not. We could consider adding line thickness to the defaults as well, but until then you can just control the thickness using glyph scale (line thickness is by default relative to the chosen glyph size), or copy-paste this into the Python console (to make thickness to 80% of glyph size by default):

slicer.mrmlScene.GetDefaultNodeByClass('vtkMRMLMarkupsDisplayNode').SetLineThickness(0.8)

Intersection with non-existing views cannot be displayed. However, there are view layouts that contain multiple views yet they show maximized view of a selected one, for example “Tabbed slice”. You can also define any custom layout (with tabs, splitters, any number of slice, 3D, plot, and table views) by an XML string.

image

1 Like

Yes that’s what I was looking for, I meant glyph size only. Thanks. I’ll post here if I have further questions. Thanks again.