# Input Models and Markups into Effects inside Segment Editor

**URL:** <https://discourse.slicer.org/t/input-models-and-markups-into-effects-inside-segment-editor/20876>\
**Category:** Development\
**Tags:** segmentation\
**Created:** [December 2, 2021, 6:12am UTC](https://discourse.slicer.org/t/input-models-and-markups-into-effects-inside-segment-editor/20876 "2021-12-02T06:12:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthik](https://avatars.discourse-cdn.com/v4/letter/k/9fc348/32.png) [@Karthik](https://discourse.slicer.org/u/Karthik)\
**Post date:** [December 2, 2021, 6:12am UTC](https://discourse.slicer.org/t/input-models-and-markups-into-effects-inside-segment-editor/20876/1 "2021-12-02T06:12:56Z")

</div>

Hi. I am creating an effect inside Segment Editor. I have looked at the code from other effects and saw how a volume selector was being written.  
self.inputVolumeSelector = slicer.qMRMLNodeComboBox()  
self.inputVolumeSelector.nodeTypes = [“vtkMRMLScalarVolumeNode”]  
self.inputVolumeSelector.selectNodeUponCreation = True  
self.inputVolumeSelector.addEnabled = True  
self.inputVolumeSelector.removeEnabled = True  
self.inputVolumeSelector.noneEnabled = True  
self.inputVolumeSelector.noneDisplay = “(Master volume)”  
self.inputVolumeSelector.showHidden = False  
self.inputVolumeSelector.setMRMLScene(slicer.mrmlScene)  
self.inputVolumeSelector.setToolTip(“Volume to split. Default is current master volume node.”)  
self.inputVolumeSelector.connect(“currentNodeChanged(vtkMRMLNode\*)”, self.updateMRMLFromGUI)

This creates a volume selector dropdown from where the user can select an input volume for their logic.

Similarly, I would like to add a inputModelSelector and inputMarkupsSelector. But, when I try it, I am not able to select anything in the dropdown. Also, no other effects have taken input a model or markups, therefore I cannot find any reference for this.

 ![Screenshot from 2021-12-02 11-38-58](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/4/949170c544670377d2e8a25d35bde6aba9429e04.jpeg)

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [December 2, 2021, 3:31pm UTC](https://discourse.slicer.org/t/input-models-and-markups-into-effects-inside-segment-editor/20876/2 "2021-12-02T15:31:12Z")

</div>

The dropdown won’t show anything unless the scene is set:

> self.inputVolumeSelector.setMRMLScene(slicer.mrmlScene)

There are examples in [SlicerSegmentEditorExtraEffects](https://github.com/lassoan/SlicerSegmentEditorExtraEffects). For example, ROI nodes are used in the local threshold effect here: [SlicerSegmentEditorExtraEffects/SegmentEditorLocalThreshold/SegmentEditorLocalThresholdLib/SegmentEditorEffect.py at 88673aa16b5c818f8319c7860eef73c361be985b · lassoan/SlicerSegmentEditorExtraEffects · GitHub](https://github.com/lassoan/SlicerSegmentEditorExtraEffects/blob/88673aa16b5c818f8319c7860eef73c361be985b/SegmentEditorLocalThreshold/SegmentEditorLocalThresholdLib/SegmentEditorEffect.py#L163-L168)
