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

**URL:** <https://discourse.slicer.org/t/how-to-set-default-centerline-curve-width-programmatically-and-how-to-have-slice-intersection-displayed/15957>\
**Category:** Development\
**Tags:** python\
**Created:** [February 11, 2021, 8:29pm UTC](https://discourse.slicer.org/t/how-to-set-default-centerline-curve-width-programmatically-and-how-to-have-slice-intersection-displayed/15957 "2021-02-11T20:29:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)\
**Post date:** [February 11, 2021, 8:29pm UTC](https://discourse.slicer.org/t/how-to-set-default-centerline-curve-width-programmatically-and-how-to-have-slice-intersection-displayed/15957/1 "2021-02-11T20:29:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 11, 2021, 8:50pm UTC](https://discourse.slicer.org/t/how-to-set-default-centerline-curve-width-programmatically-and-how-to-have-slice-intersection-displayed/15957/2 "2021-02-11T20:50:32Z")

</div>

> [@akshay\_pillai](#):
>
> 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.

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)

```

> [@akshay\_pillai](#):
>
> 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?

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](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Customize_viewer_layout).

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/b/bb9765f40900d83846210236865b1c198a89985e.png)

---

<div class="post-metadata">

**Author:** ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)\
**Post date:** [February 11, 2021, 9:20pm UTC](https://discourse.slicer.org/t/how-to-set-default-centerline-curve-width-programmatically-and-how-to-have-slice-intersection-displayed/15957/5 "2021-02-11T21:20:30Z")

</div>

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.
