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.
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
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.