# How to add folder in scene?

**URL:** <https://discourse.slicer.org/t/how-to-add-folder-in-scene/29499>\
**Category:** Development\
**Created:** [May 17, 2023, 2:09am UTC](https://discourse.slicer.org/t/how-to-add-folder-in-scene/29499 "2023-05-17T02:09:51Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![Victor\_Wayne](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/victor_wayne/32/80778_2.png) [@Victor\_Wayne](https://discourse.slicer.org/u/Victor_Wayne)\
**Post date:** [August 7, 2025, 11:59am UTC](https://discourse.slicer.org/t/how-to-add-folder-in-scene/29499/16 "2025-08-07T11:59:41Z")

</div>

I have to admit that I don’t quite get what you are saying.

Here’s what I want to do.

I inspected the Data module and found out that it is using qMRMLSubjectHierarchyTreeView widget for showing the nodes in a tree view. I wanted to customize the Data module by creating my own custom widget. So I created a widget, with a combo box that selects from the list plans. The plans contains lines. I want to show the lines like a list and with all the added functionality of hide/show `eye` button, transformation tracking, color picking, and their IDs like how the Data module shows it. So I created one instance of qMRMLSubjectHierarchyTreeView, and set it like this.

```python
self.lineDetailView = qMRMLSubjectHierarchyTreeView()
self.lineDetailView.setMRMLScene(slicer.mrmlScene)

```

The problem is that it shows all the nodes and folders. I just want to show the line that corresponds to the selected plan. I thought I could do the following

```python
self.lineDetailView.nodeTypes = ['vtkMRMLMarkupsLineNode']

```

but this shows the folders with the lines. even if it didn’t show the folders, I don’t know how to delete the other line nodes that doesn’t belong to the current selected plan.

Any help will be appreciated. Thank you for replying to me.

---

_[View the full topic](https://discourse.slicer.org/t/how-to-add-folder-in-scene/29499)._
