# \#subject-hierarchy

**URL:** https://discourse.slicer.org/tag/subject-hierarchy/190.md

[Latest](https://discourse.slicer.org/latest.md) · [Categories](https://discourse.slicer.org/categories.md) · [Tags](https://discourse.slicer.org/tags.md)

---

## [Writing a Scripted Subject Hierarchy Plugin -- documentation lacking](https://discourse.slicer.org/t/writing-a-scripted-subject-hierarchy-plugin-documentation-lacking/45252)

<div class="topic-metadata">

**Author:** [@shai-ikko](https://discourse.slicer.org/u/shai-ikko)\
**Replies:** 2\
**Last updated:** [December 3, 2025, 4:18pm UTC](https://discourse.slicer.org/t/writing-a-scripted-subject-hierarchy-plugin-documentation-lacking/45252 "2025-12-03T16:18:40Z")

</div>

Hi, Recently I’ve been writing an internal-use Subject Hierarchy plugin. I ran into some difficulties that stem, IMO, from lacking documentation, so I want to share what I’ve learned with a view to getting some comments…

---

## [Hiding nodes from qMRMLSubjectHierarchyTreeView widget](https://discourse.slicer.org/t/hiding-nodes-from-qmrmlsubjecthierarchytreeview-widget/44019)

<div class="topic-metadata">

**Author:** [@Victor\_Wayne](https://discourse.slicer.org/u/Victor_Wayne)\
**Replies:** 3\
**Last updated:** [August 13, 2025, 8:51am UTC](https://discourse.slicer.org/t/hiding-nodes-from-qmrmlsubjecthierarchytreeview-widget/44019 "2025-08-13T08:51:58Z")

</div>

Hello, 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 c…

---

## [Adding nodes to qMRMLSubjectHierarchyTreeView](https://discourse.slicer.org/t/adding-nodes-to-qmrmlsubjecthierarchytreeview/43999)

<div class="topic-metadata">

**Author:** [@Victor\_Wayne](https://discourse.slicer.org/u/Victor_Wayne)\
**Replies:** 0\
**Last updated:** [August 7, 2025, 12:36pm UTC](https://discourse.slicer.org/t/adding-nodes-to-qmrmlsubjecthierarchytreeview/43999 "2025-08-07T12:36:13Z")

</div>

Hello, In my custom widget, I have added an empty qMRMLSubjectHierarchyTreeView. I have a class that tracks nodes of a plans. I just need to show those node inside the qMRMLSubjectHierarchyTreeView so that I can get the…

---

## [Adding nodes in qMRMLSubjectHierarchyTreeView](https://discourse.slicer.org/t/adding-nodes-in-qmrmlsubjecthierarchytreeview/43993)

<div class="topic-metadata">

**Author:** [@Victor\_Wayne](https://discourse.slicer.org/u/Victor_Wayne)\
**Replies:** 1\
**Last updated:** [August 7, 2025, 12:28pm UTC](https://discourse.slicer.org/t/adding-nodes-in-qmrmlsubjecthierarchytreeview/43993 "2025-08-07T12:28:23Z")

</div>

Hello, I am tracking some line nodes of type \`vtkMRMLMarkupsLineNode\` in a class called Plan for specific plan created by the user. How can I add those lines to the qMRMLSubjectHierarchyTreeView that I created in my cu…

---

## [Hide a volume programmatically](https://discourse.slicer.org/t/hide-a-volume-programmatically/26654)

<div class="topic-metadata">

**Author:** [@rhodesdante](https://discourse.slicer.org/u/rhodesdante)\
**Replies:** 9\
**Last updated:** [August 2, 2024, 1:03pm UTC](https://discourse.slicer.org/t/hide-a-volume-programmatically/26654 "2024-08-02T13:03:57Z")

</div>

I am writing a custom module in Python and I would like to: Replace the active volume in the slice viewer (similar to clicking on the “eye” icon of a different volume) with the next volume in the subject hierarchy Shut…

---

## [I can't drag nodes into a folder in the subject hierarchy](https://discourse.slicer.org/t/i-cant-drag-nodes-into-a-folder-in-the-subject-hierarchy/33313)

<div class="topic-metadata">

**Author:** [@jashrand](https://discourse.slicer.org/u/jashrand)\
**Replies:** 2\
**Last updated:** [December 11, 2023, 1:01pm UTC](https://discourse.slicer.org/t/i-cant-drag-nodes-into-a-folder-in-the-subject-hierarchy/33313 "2023-12-11T13:01:43Z")

</div>

I’m sure this is a silly question, but I can’t click-and-drag nodes in the subject hierarchy to put them into a folder. I’m using a Macbook with a normal touchpad, no external mouse or anything. Every time I click and dr…

---

## [Detect subject hierarchy node deletion before its children get deleted](https://discourse.slicer.org/t/detect-subject-hierarchy-node-deletion-before-its-children-get-deleted/27517)

<div class="topic-metadata">

**Author:** [@Albi](https://discourse.slicer.org/u/Albi)\
**Replies:** 1\
**Last updated:** [February 9, 2023, 9:59am UTC](https://discourse.slicer.org/t/detect-subject-hierarchy-node-deletion-before-its-children-get-deleted/27517 "2023-02-09T09:59:45Z")

</div>

In a custom module I would like to detect the deletion of an item to take appropriate action before its children gets deleted. I observed that the signal SubjectHierarchyItemAboutToBeRemovedEvent of the item is emitted a…

---

## [Multiple display nodes observed by scalar volume or model](https://discourse.slicer.org/t/multiple-display-nodes-observed-by-scalar-volume-or-model/20733)

<div class="topic-metadata">

**Author:** [@Mik](https://discourse.slicer.org/u/Mik)\
**Replies:** 2\
**Last updated:** [November 25, 2021, 1:13pm UTC](https://discourse.slicer.org/t/multiple-display-nodes-observed-by-scalar-volume-or-model/20733 "2021-11-25T13:13:19Z")

</div>

A couple of questions how things work: What class of object is responsible for visibility of display nodes when i click on visibility icon in subject hierarchy node browser? What is the role of SubjectHierarchy plu…

---

## [Clone of model node can change the original model node](https://discourse.slicer.org/t/clone-of-model-node-can-change-the-original-model-node/14521)

<div class="topic-metadata">

**Author:** [@ungi](https://discourse.slicer.org/u/ungi)\
**Replies:** 1\
**Last updated:** [November 10, 2020, 7:22pm UTC](https://discourse.slicer.org/t/clone-of-model-node-can-change-the-original-model-node/14521 "2020-11-10T19:22:40Z")

</div>

Tested on Windows with latest stable (4.11.20200930) version. How to reproduce: Load or create a surface model node. Clone it in the Data module Create a transform node for the clone (model copy) and move it somewhere…

---

## [How Can I use python to get the status of a node's show/hides status in the "data" or "DICOM" module in the Subject hierarchy area?](https://discourse.slicer.org/t/how-can-i-use-python-to-get-the-status-of-a-nodes-show-hides-status-in-the-data-or-dicom-module-in-the-subject-hierarchy-area/12786)

<div class="topic-metadata">

**Author:** [@Tesla2687](https://discourse.slicer.org/u/Tesla2687)\
**Replies:** 15\
**Last updated:** [August 4, 2020, 12:18pm UTC](https://discourse.slicer.org/t/how-can-i-use-python-to-get-the-status-of-a-nodes-show-hides-status-in-the-data-or-dicom-module-in-the-subject-hierarchy-area/12786 "2020-08-04T12:18:21Z")

</div>

Operating system: Windows 10 Slicer version: 4.10.2 Expected behavior: Using python to get the status of a node’s show/hides status in the “data” or “DICOM” module in the Subject hierarchy area? Actual behavior:

---

## [vtkMRMLModelHierarchyNode nodes imported as subject hierarchies](https://discourse.slicer.org/t/vtkmrmlmodelhierarchynode-nodes-imported-as-subject-hierarchies/11707)

<div class="topic-metadata">

**Author:** [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Replies:** 2\
**Last updated:** [May 26, 2020, 10:50am UTC](https://discourse.slicer.org/t/vtkmrmlmodelhierarchynode-nodes-imported-as-subject-hierarchies/11707 "2020-05-26T10:50:19Z")

</div>

Hello, I create a model hierarchy (based on vtkMRMLModelHierarchyNode objects) and save the mrml scene. When I open that scene, the model hierarchy has been turned into a subject hierarchy. Is that the expected behaviou…

---

## [Change data-transform hierarchy nodes](https://discourse.slicer.org/t/change-data-transform-hierarchy-nodes/7187)

<div class="topic-metadata">

**Author:** [@zapaishchykova](https://discourse.slicer.org/u/zapaishchykova)\
**Replies:** 2\
**Last updated:** [June 17, 2019, 2:15pm UTC](https://discourse.slicer.org/t/change-data-transform-hierarchy-nodes/7187 "2019-06-17T14:15:39Z")

</div>

Hi there! I’m trying to find how can I with python change transform hierarchy of the scene, and all I was able to find is only how to change subject hierarchy: sceneItemID = shn.GetSceneItemID() shn = slicer.vtkMRMLSu…

---

## [Is it possible to create/clone a node keeping the same location in the hierarchy of the father node?](https://discourse.slicer.org/t/is-it-possible-to-create-clone-a-node-keeping-the-same-location-in-the-hierarchy-of-the-father-node/5540)

<div class="topic-metadata">

**Author:** [@Alex\_Vergara](https://discourse.slicer.org/u/Alex_Vergara)\
**Replies:** 5\
**Last updated:** [January 30, 2019, 1:17am UTC](https://discourse.slicer.org/t/is-it-possible-to-create-clone-a-node-keeping-the-same-location-in-the-hierarchy-of-the-father-node/5540 "2019-01-30T01:17:14Z")

</div>

Basically I have a big subject hierarchy (several folders), and inside each I have nodes (volumes, segmentations, transformations). I want to create a table for instance and place it in the same location of the generatin…
