# How does SubjectHierarchy Plugins works in Slicer

**URL:** https://discourse.slicer.org/t/how-does-subjecthierarchy-plugins-works-in-slicer/8354
**Category:** Development
**Created:** [September 10, 2019, 5:12am UTC](https://discourse.slicer.org/t/how-does-subjecthierarchy-plugins-works-in-slicer/8354 "2019-09-10T05:12:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mikecsu](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@mikecsu](https://discourse.slicer.org/u/mikecsu)
#### Post date: [September 10, 2019, 5:12am UTC](https://discourse.slicer.org/t/how-does-subjecthierarchy-plugins-works-in-slicer/8354/1 "2019-09-10T05:12:33Z")

</div>

Operating system:win10  
Slicer version:slicer 4.10.0  
Expected behavior:  
Actual behavior:

Hi,everyone. I am learning the slicer source code for simplifying some operations in Slicer. But i have trouble in understanding the SubjectHierarchy Plugins, can anyone explain it ?

Any help would be appreciated.

---

<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: [September 11, 2019, 2:45pm UTC](https://discourse.slicer.org/t/how-does-subjecthierarchy-plugins-works-in-slicer/8354/2 "2019-09-11T14:45:28Z")

</div>

Subject hierarchy plugins can be used to add custom icon, override default actions (such as show/hide), or define new actions in the right-click menu.

You can implement these plugins in either C++ or Python. There are many examples in Slicer core: download source code of Slicer and search for “SubjectHierarchyPlugins” folders.

---

<div class="post-metadata">

### Author: ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)
#### Post date: [September 11, 2019, 2:51pm UTC](https://discourse.slicer.org/t/how-does-subjecthierarchy-plugins-works-in-slicer/8354/3 "2019-09-11T14:51:49Z")

</div>

I suggest also reading the Information for Developers section on this page  
[https://www.slicer.org/wiki/Documentation/Nightly/Modules/Data](https://www.slicer.org/wiki/Documentation/Nightly/Modules/Data)
