trouble with EditorSingletonTag when importing editor widget

classic Classic list List threaded Threaded
5 messages Options
mag
Reply | Threaded
Open this post in threaded view
|

trouble with EditorSingletonTag when importing editor widget

mag
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:
testEd.py <http://slicer-devel.65872.n3.nabble.com/file/n4038129/testEd.py>  
 I'm defining selectParameterNode on line 40 and importing the editor widget
on line 115.

Thank you very much,

Marta





--
View this message in context: http://slicer-devel.65872.n3.nabble.com/trouble-with-EditorSingletonTag-when-importing-editor-widget-tp4038129.html
Sent from the slicer-devel mailing list archive at Nabble.com.
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: trouble with EditorSingletonTag when importing editor widget

pinter
Hi Marta,

I tried your module with the latest nightly, and I can confirm that the Apply button in the Draw effect breaks after Reload and Test. However if I simply right-click (which is the same as Apply), then it works. I suggest using the right button until we fix this issue.

Thanks,
csaba

-----Original Message-----
From: slicer-devel [mailto:[hidden email]] On Behalf Of martag
Sent: Wednesday, March 1, 2017 07:43
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] trouble with EditorSingletonTag when importing editor widget

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:
testEd.py <http://slicer-devel.65872.n3.nabble.com/file/n4038129/testEd.py>
 I'm defining selectParameterNode on line 40 and importing the editor widget on line 115.

Thank you very much,

Marta





--
View this message in context: http://slicer-devel.65872.n3.nabble.com/trouble-with-EditorSingletonTag-when-importing-editor-widget-tp4038129.html
Sent from the slicer-devel mailing list archive at Nabble.com.
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: trouble with EditorSingletonTag when importing editor widget

pinter
Hi Marta,

I committed a "fix". The commit message clarifies what we did and why:
"The Apply button did not work after closing scene. It could have been fixed by keeping track of the slice view on which the user drew last and then call apply on that pipeline, but we decided to remove the Apply button instead, and force the user to use the much simpler mouse right button and Enter key shortcuts"

Let me know if this is adequate.

csaba

-----Original Message-----
From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: Wednesday, March 1, 2017 11:37
To: martag <[hidden email]>; SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] trouble with EditorSingletonTag when importing editor widget

Hi Marta,

I tried your module with the latest nightly, and I can confirm that the Apply button in the Draw effect breaks after Reload and Test. However if I simply right-click (which is the same as Apply), then it works. I suggest using the right button until we fix this issue.

Thanks,
csaba

-----Original Message-----
From: slicer-devel [mailto:[hidden email]] On Behalf Of martag
Sent: Wednesday, March 1, 2017 07:43
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] trouble with EditorSingletonTag when importing editor widget

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:
testEd.py <http://slicer-devel.65872.n3.nabble.com/file/n4038129/testEd.py>
 I'm defining selectParameterNode on line 40 and importing the editor widget on line 115.

Thank you very much,

Marta





--
View this message in context: http://slicer-devel.65872.n3.nabble.com/trouble-with-EditorSingletonTag-when-importing-editor-widget-tp4038129.html
Sent from the slicer-devel mailing list archive at Nabble.com.
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
mag
Reply | Threaded
Open this post in threaded view
|

Re: trouble with EditorSingletonTag when importing editor widget

mag
Oh, that's great.
I didn't even think that the problem might simply be the Apply button and
was looking for much more complicated explanations. This works perfectly.

Thanks a lot for your help!

Marta



--
View this message in context: http://slicer-devel.65872.n3.nabble.com/trouble-with-EditorSingletonTag-when-importing-editor-widget-tp4038130p4038133.html
Sent from the slicer-devel mailing list archive at Nabble.com.
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
mag
Reply | Threaded
Open this post in threaded view
|

Re: trouble with EditorSingletonTag when importing editor widget

mag
This post has NOT been accepted by the mailing list yet.
In reply to this post by pinter
Oh, that's great.
I didn't even think that the problem might simply be the Apply button and was looking for much more complicated explanations. This works perfectly.

Thanks a lot for your help!

Marta