Skip to content

Refactor render channels to render images #55

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

Merged
merged 17 commits into from
Apr 19, 2023

Conversation

sagar87
Copy link
Collaborator

@sagar87 sagar87 commented Apr 18, 2023

  • Basic implementation of render_channels.

@sagar87
Copy link
Collaborator Author

sagar87 commented Apr 19, 2023

Complements pl.render_images with the ability to plot specific channels, i.e. (shown is the steinbock_io example from the sandbox)

fig, ax = plt.subplots(2, 2, figsize=(9, 8))

# render channel 1
stein.pp.get_elements('Patient4_005').pl.render_images(channel=[1]).pl.show(ax=ax[0, 0]) 
# render channel 1 and overlay segmentation mask
stein.pp.get_elements('Patient4_005').pl.render_images(channel=[1]).pl.render_labels(fill_alpha=0.).pl.show(ax=ax[0, 1]) 
# plot channel 1, 2, 3 and use default color palette
stein.pp.get_elements('Patient4_005').pl.render_images(channel=[1, 2, 3]).pl.show(ax=ax[1, 0]) 
# plot channel 1, 2, 3 and let user define the colors
stein.pp.get_elements('Patient4_005').pl.render_images(channel=[1, 2, 3], palette=['seagreen', 'yellow', 'red']).pl.show(ax=ax[1, 1]) 

image

@sagar87 sagar87 marked this pull request as ready for review April 19, 2023 07:40
@sagar87 sagar87 requested a review from timtreis April 19, 2023 07:40
@timtreis timtreis merged commit cb2528a into main Apr 19, 2023
@timtreis timtreis deleted the feature/refactor_render_channels_to_render_images branch April 19, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants