{"action":"created","issue":{"url":"https://api.github.com/repos/Slicer/Slicer/issues/287","labels_url":"https://api.github.com/repos/Slicer/Slicer/issues/287/labels{/name}","comments_url":"https://api.github.com/repos/Slicer/Slicer/issues/287/comments","events_url":"https://api.github.com/repos/Slicer/Slicer/issues/287/events","html_url":"https://github.com/Slicer/Slicer/pull/287","id":86955689,"number":287,"title":"Refactor editor helperbox","user":{"login":"jcfr","id":219043,"avatar_url":"https://avatars.githubusercontent.com/u/219043?v=3","gravatar_id":"","url":"https://api.github.com/users/jcfr","html_url":"https://github.com/jcfr","followers_url":"https://api.github.com/users/jcfr/followers","following_url":"https://api.github.com/users/jcfr/following{/other_user}","gists_url":"https://api.github.com/users/jcfr/gists{/gist_id}","starred_url":"https://api.github.com/users/jcfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcfr/subscriptions","organizations_url":"https://api.github.com/users/jcfr/orgs","repos_url":"https://api.github.com/users/jcfr/repos","events_url":"https://api.github.com/users/jcfr/events{/privacy}","received_events_url":"https://api.github.com/users/jcfr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-06-10T12:35:02Z","updated_at":"2015-06-12T14:50:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Slicer/Slicer/pulls/287","html_url":"https://github.com/Slicer/Slicer/pull/287","diff_url":"https://github.com/Slicer/Slicer/pull/287.diff","patch_url":"https://github.com/Slicer/Slicer/pull/287.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/Slicer/Slicer/issues/comments/111516992","html_url":"https://github.com/Slicer/Slicer/pull/287#issuecomment-111516992","issue_url":"https://api.github.com/repos/Slicer/Slicer/issues/287","id":111516992,"user":{"login":"jcfr","id":219043,"avatar_url":"https://avatars.githubusercontent.com/u/219043?v=3","gravatar_id":"","url":"https://api.github.com/users/jcfr","html_url":"https://github.com/jcfr","followers_url":"https://api.github.com/users/jcfr/followers","following_url":"https://api.github.com/users/jcfr/following{/other_user}","gists_url":"https://api.github.com/users/jcfr/gists{/gist_id}","starred_url":"https://api.github.com/users/jcfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcfr/subscriptions","organizations_url":"https://api.github.com/users/jcfr/orgs","repos_url":"https://api.github.com/users/jcfr/repos","events_url":"https://api.github.com/users/jcfr/events{/privacy}","received_events_url":"https://api.github.com/users/jcfr/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T14:50:08Z","updated_at":"2015-06-12T14:50:08Z","body":"@pieper I noticed that there is the `Effect,scope` parameter. Few remarks:\r\n* Seems the `scope` option is explicitly disabled for morphology based effect since they have been ported to Slicer4. See [here](https://github.com/Slicer/Slicer/blob/9dce0519d08e254bc26a50b624b33816c9ab7cdd/Modules/Scripted/EditorLib/MorphologyEffect.py#L35-L36) and https://github.com/Slicer/Slicer/commit/5127b9342d636944a7f9caf4b5ff8743ea664425\r\n* Tried to enabled the scope for morphology effect but the scope doesn't work for dilate effect. See screenshot below comparing observed result between current Slicer trunk and the version 3.6.\r\n\r\n![effect-scope-broken-in-slicer4-for-morphology-operator](https://cloud.githubusercontent.com/assets/219043/8132018/9572db60-10ec-11e5-9158-98782af1f426.png)\r\n\r\n\r\nSince I would like to provide a unified interface to access the label map node and image that is updated by the different effects. I suggest the following plan:\r\n\r\n* Step1: remove the support for *scope*\r\n * remove `Effect.getScopedLayer()`, `Effect.getScopedBackground()` and `Effect.getScopedLabelInput()` functions\r\n * remove `Effect.getScopedLabelOutput()` function\r\n * instead use `self.sliceLogic.GetLabelLayer().GetVolumeNode()` and `self.imageBuffer`\r\n\r\n* Step2: introduce the `Effect` property `image` that would correspond the label image currently being edited. It could either be the image data of a labelmap node or the one of segment.\r\n\r\n* Step3: In `EditUtil`, remove or update function like the following ones `getCompositeNode/getSliceWidget/getSliceLogic/getBackgroundImage/getBackgroundVolume/getBackgroundID/getLabelImage/getLabelID/getLabelVolume/getLabelVolume` to make them context specific. Effect shouldn't assume the volume in the red slice viewer is the one being edited. This should be set at the application level.\r\n"}}