Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Added segment selector combobox to slice view controller #581

Conversation

cpinter
Copy link
Member

@cpinter cpinter commented Sep 15, 2016

A fourth row is added to slice view controller which is only visible if a segmentation node is present in the scene. It behaves differently than the other rows in the sense that it does not assign the selected node to a role that is specific to the slice view, but allows changing display properties of a segmentation that are global (visibility, opacity, segment visibility, outline/fill). Selecting a segmentation shows it if hidden.

ENH: Added multi-selection option to segment selector widget

ENH: Removed legacy labelmap support

Segmentation node is no longer subclass of labelmap volume node. Temporary color table is removed (color index tag remained, consecutive values are assigned). Utility function ShiftImageDataExtentToZeroStart moved to volume node from segmentation node, may come in handy

@cpinter
Copy link
Member Author

cpinter commented Sep 15, 2016

Segmentation nodes do not provide a merged labelmap any more to display in the label layer. It caused confusion between labelmaps and segmentations, it was undeterministic in case of overlapping segments, caused labelmap conversion unnecessarily if it was the first node in the volume combobox when switching to the Volumes module (and in other cases when GetImageData was called), etc.

Instead of the label layer support, slice view controller was augmented for segmentations, so that it can be used in the usual way too. This short video demonstrates:
https://screencast.com/t/2BInMbl4OO

@cpinter
Copy link
Member Author

cpinter commented Sep 15, 2016

I decided that Data probe support will be added in a separate pull request, I think it's cleaner this way.

@pieper
Copy link
Member

pieper commented Sep 15, 2016

I didn't look into the code, but the video is very convincing!

On Thu, Sep 15, 2016 at 4:26 PM, Csaba Pinter [email protected]
wrote:

I decided that Data probe support will be added in a separate pull
request, I think it's cleaner this way.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
Slicer/Slicer#581 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAHsfad2X_5dcWG7rsIFjMo-eg1dizMHks5qqan_gaJpZM4J-Tv3
.

@fedorov
Copy link
Member

fedorov commented Sep 15, 2016

Csaba, few questions:

  • in the demo video you provided, what is the "Tiny Two Labels" ? Is it the legacy label map?
  • have you tested the behavior of the node and segment selectors when the node name exceeds the space allocated?
  • is there any way the height of the selectors can be reduced? The popup will now consume more than half of the slice viewer height ... I understand this is unrelated to this specific PR, but do you know why do we have the padding above and under the text in the node selector?

@cpinter
Copy link
Member Author

cpinter commented Sep 15, 2016

Good questions Andrey!

  • TinyTwoLabels is a simple labelmap just to show a scenario where we have one of each
  • Good point, I'll try
  • Indeed, there is a few pixel extra height and I tried to get rid of that and spent an hour or so but had no luck without adding harsh limits. Any idea anyone?

On September 15, 2016 5:07:09 PM Andrey Fedorov [email protected] wrote:

Csaba, few questions:

  • in the demo video you provided, what is the "Tiny Two Labels" ? Is it the legacy label map?
  • have you tested the behavior of the node and segment selectors when the node name exceeds the space allocated?
  • is there any way the height of the selectors can be reduced? The popup will now consume more than half of the slice viewer height ... I understand this is unrelated to this specific PR, but do you know why do we have the padding above and under the text in the node selector?

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Slicer/Slicer/pull/581#issuecomment-247455419, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABQ7nCOe44pXXwHKdWMDNsCFS9-o5d_nks5qqbMpgaJpZM4J-Tv3.

@fedorov
Copy link
Member

fedorov commented Sep 15, 2016

Thank you Csaba!

To state the obvious - this functionality is essential for helping users navigate the segmentations overlay. Thank you very much for working on this, this is a great improvement over how things are handled right now!

@fedorov
Copy link
Member

fedorov commented Sep 15, 2016

Oh, another suggestion. Trying to load brain atlas is always a good stress test. It would be interesting to see how that volume of segments will be handled.

@cpinter
Copy link
Member Author

cpinter commented Sep 15, 2016

Andras did a lot of performance improvements over the last week(s) using the brain atlas, so the generic segmentation infrastructure can handle that many segments much better now.

I'll try it too to make sure my changes don't introduce new bottlenecks.

On September 15, 2016 5:27:16 PM Andrey Fedorov [email protected] wrote:

Oh, another suggestion. Trying to load brain atlas is always a good stress test. It would be interesting to see how that volume of segments will be handled.

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Slicer/Slicer/pull/581#issuecomment-247460240, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABQ7nGI27rSohmIxxXx72o3fpJRHiid5ks5qqbgXgaJpZM4J-Tv3.

@cpinter
Copy link
Member Author

cpinter commented Sep 16, 2016

I found that neither the long node names nor the many segments in the brain atlas cause problems.

I found a bug that I need to fix (combobox not updated correctly after renaming a segment), and I'm still not sure what to do about the height of the rows in the controller popup. Otherwise all seems good to me.

@cpinter
Copy link
Member Author

cpinter commented Sep 16, 2016

I fixed the bug. If there are no objections then I'll integrate. Thanks for the comments!

@cpinter cpinter force-pushed the segmentation-legacy-labelmap-support-removal branch from 5f08077 to 9ce3317 Compare September 16, 2016 18:58
A fourth row is added to slice view controller which is only visible if a segmentation node is present in the scene. It behaves differently than the other rows in the sense that it does not assign the selected node to a role that is specific to the slice view, but allows changing display properties of a segmentation that are global (visibility, opacity, segment visibility, outline/fill). Selecting a segmentation shows it if hidden.

ENH: Added multi-selection option to segment selector widget

ENH: Removed legacy labelmap support

Segmentation node is no longer subclass of labelmap volume node. Temporary color table is removed (color index tag remained, consecutive values are assigned). Utility function ShiftImageDataExtentToZeroStart moved to volume node from segmentation node, may come in handy
@cpinter
Copy link
Member Author

cpinter commented Sep 16, 2016

I integrated this commit as https://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=25367
If anybody finds issues please let me know!
Also closing this pull request.

@cpinter cpinter closed this Sep 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants