# Adding custom tags to subject without creating/exporting DICOMs

**URL:** <https://discourse.slicer.org/t/adding-custom-tags-to-subject-without-creating-exporting-dicoms/5189>\
**Category:** Feature requests\
**Created:** [December 26, 2018, 5:21am UTC](https://discourse.slicer.org/t/adding-custom-tags-to-subject-without-creating-exporting-dicoms/5189 "2018-12-26T05:21:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [December 27, 2018, 6:16am UTC](https://discourse.slicer.org/t/adding-custom-tags-to-subject-without-creating-exporting-dicoms/5189/2 "2018-12-27T06:16:15Z")

</div>

You can set subject hierarchy attributes using `shNode.SetItemAttribute` method as shown in this post: [Hausdorff distance calculation in SegmentComparison module](https://discourse.slicer.org/t/hausdorff-distance-calculation-in-segmentcomparison-module/4300/18?u=lassoan)

If this scripting interface is not convenient enough then you can add items add an item to the right-click menu that shows a popup where you can add/edit/delete item attributes. You can add menu items using Subject Hierarchy plugin, using either Python or C++. See [this example](https://github.com/Slicer/Slicer/blob/master/Modules/Scripted/SegmentStatistics/SubjectHierarchyPlugins/SegmentStatisticsSubjectHierarchyPlugin.py) that adds a “Calculate statistics…” menu item. If we find that this need comes up often then we can add the plugin in Slicer core or maybe add an attribute editor similar to the node attribute editor in the Data module.

---

_[View the full topic](https://discourse.slicer.org/t/adding-custom-tags-to-subject-without-creating-exporting-dicoms/5189)._
