# Markups Node Table for vtkMRMLMarkupsLineNode

**URL:** <https://discourse.slicer.org/t/markups-node-table-for-vtkmrmlmarkupslinenode/12338>\
**Category:** Development\
**Created:** [July 2, 2020, 3:48pm UTC](https://discourse.slicer.org/t/markups-node-table-for-vtkmrmlmarkupslinenode/12338 "2020-07-02T15:48:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EricM](https://avatars.discourse-cdn.com/v4/letter/e/48db29/32.png) [@EricM](https://discourse.slicer.org/u/EricM)\
**Post date:** [July 2, 2020, 3:48pm UTC](https://discourse.slicer.org/t/markups-node-table-for-vtkmrmlmarkupslinenode/12338/1 "2020-07-02T15:48:02Z")

</div>

Hello Slicer Community,

I’m trying to include a module where annotators can draw major and minor axes on brain images. I found that the `vtkMRMLMarkupsLineNode` does just the job. In Slicer 4.11 (not sure about previous versions), there is a table widget (perhaps a QTableView ?) that keeps track of all of the `vtkMRMLMarkupsLineNode`s (see screenshot below). I’d like to take this widget and import it in my module, but I cannot find it in any parent widget or modules accessible through python.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/7/27e76f81ec4f31fbe60986051aeead1515df2071.png)

Ideally, what I would like is to get the different markup buttons (create fiducial, create line, create curve, etc.) as well as the table underneath (with columns Node, Description, Visible, Color). I don’t need to get the collapsable Display or Control Points Widgets.

Thanks for any guidance.  
Best,  
Eric

---

<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:** [July 2, 2020, 4:11pm UTC](https://discourse.slicer.org/t/markups-node-table-for-vtkmrmlmarkupslinenode/12338/2 "2020-07-02T16:11:08Z")

</div>

The table widget is a `qMRMLSubjectHierarchyTreeView`. The buttons above are just simple QPushButtons. You can open Qt Designer and just drag-and-drop these widgets into your module GUI.

For the future, you can find instructions here how to find implementation of a feature that you see on the Slicer GUI [here](https://slicer.readthedocs.io/en/latest/developer_guide/python_faq.html#how-to-find-a-python-function-for-any-slicer-features).

---

<div class="post-metadata">

**Author:** ![EricM](https://avatars.discourse-cdn.com/v4/letter/e/48db29/32.png) [@EricM](https://discourse.slicer.org/u/EricM)\
**Post date:** [July 8, 2020, 1:16pm UTC](https://discourse.slicer.org/t/markups-node-table-for-vtkmrmlmarkupslinenode/12338/3 "2020-07-08T13:16:57Z")

</div>

Hi Andras,

Thanks for this tip!  
While looking around a bit more, I found a way to access the Markups widget and am able to get everything I need

```auto
slicer.modules.markups.widgetRepresentation().children()

(QVBoxLayout (QVBoxLayout at: 0x000001C2B981D5C0), QLabel(0x1c2d23aa960, name="createLabel") , QPushButton(0x1c2d23ab0e0, name="createFiducialPushButton") , QPushButton(0x1c2d23aa2e0, name="createLinePushButton") , QPushButton(0x1c2d23aaca0, name="createAnglePushButton") , QPushButton(0x1c2d23aaa20, name="createOpenCurvePushButton") , QPushButton(0x1c2d23aa5e0, name="createClosedCurvePushButton") , ctkExpandableWidget(0x1c2d23aa620, name="ResizableFrame") , qMRMLCollapsibleButton(0x1c2d23acaa0, name="CollapsibleGroupBox") , ctkCollapsibleButton(0x1c2d2390de0, name="controlPointsCollapsibleButton") , ctkCollapsibleButton(0x1c2d3404090, name="resampleCurveCollapsibleButton") , QAction(0x1c2d391da50 text="Cut" toolTip="Cut" shortcut=QKeySequence("Ctrl+X") menuRole=TextHeuristicRole visible=true) , QAction(0x1c2d391de10 text="Copy" toolTip="Copy" shortcut=QKeySequence("Ctrl+C") menuRole=TextHeuristicRole visible=true) , QAction(0x1c2d391df70 text="Paste" toolTip="Paste" shortcut=QKeySequence("Ctrl+V") menuRole=TextHeuristicRole visible=true) )

```

Thanks!
