trouble with EditorSingletonTag when importing editor widget

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

trouble with EditorSingletonTag when importing editor widget

This post has NOT been accepted by the mailing list yet.
Hi everybody,

I am quite new to Slicer (and Python as well) so I apologize if this is a silly question.

I need to create a widget with some personalized buttons and append the Editor widget to it.
So I have copied some code from the SegmentEditor module that I thought would do the job, but now I get a weird behavior and I think it might be because I'm not doing the right thing with segmentEditorSingletonTag.

For example if I load some DICOM data, go to my module add a new segment and use the draw tool in the segment editor everything seems to work fine. But if I click on "Reload and test" in my module and then try to use the segmentation tools from the Editor in my module, they don't work properly (I can still draw a polygon, but when I click "Apply" it doesn't fill in the selection).

Can somebody clarify what I'm doing wrong?

Here is my code:
 I'm defining selectParameterNode on line 40 and importing the editor widget on line 115.

Thank you very much,