Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qim3d
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
QIM
Tools
qim3d
Merge requests
!56
Simple 3d slicer
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Simple 3d slicer
simple_3D_slicer
into
main
Overview
0
Commits
17
Pipelines
0
Changes
1
Merged
Simple 3d slicer
s184058
requested to merge
simple_3D_slicer
into
main
Feb 28, 2024
Overview
0
Commits
17
Pipelines
0
Changes
1
Implemented slicer function for viewing slices in a single arbitrary dimension with slider
Implemented orthogonal function for viewing slices in all three dimensions with slider
0
0
Merge request reports
Viewing commit
dfe07ab0
Prev
Next
Show latest version
1 file
+
1
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
dfe07ab0
Minor changes
· dfe07ab0
Stefan Peter Engelmann Jensen
authored
Feb 21, 2024
qim3d/viz/img.py
+
1
−
3
View file @ dfe07ab0
Edit in single-file editor
Open in Web IDE
Show full file
@@ -13,7 +13,6 @@ import math
import
qim3d.io
import
os
def
grid_overview
(
data
,
num_images
=
7
,
cmap_im
=
"
gray
"
,
cmap_segm
=
"
viridis
"
,
alpha
=
0.5
,
show
=
False
):
@@ -393,7 +392,7 @@ def slicer(
img_height
:
int
=
3
,
img_width
:
int
=
3
,
show_position
:
bool
=
False
,
interpolation
:
Optional
[
str
]
=
None
,
interpolation
:
Optional
[
str
]
=
None
)
->
widgets
.
interactive
:
"""
Interactive widget for visualizing slices of a 3D volume.
@@ -418,7 +417,6 @@ def slicer(
# Create the interactive widget
def
_slicer
(
position
):
fig
=
slices
(
vol
,
axis
=
axis
,
cmap
=
cmap
,
img_height
=
img_height
,
img_width
=
img_width
,
show_position
=
show_position
,
interpolation
=
interpolation
,
position
=
position
,
n_slices
=
1
,
show
=
True
)
#fig.get_axes()[0].axvline(position, 0, vol.shape[axis], color='r', linestyle='--', linewidth=1)
return
fig
position_slider
=
widgets
.
IntSlider
(
value
=
vol
.
shape
[
axis
]
//
2
,
min
=
0
,
max
=
vol
.
shape
[
axis
]
-
1
,
description
=
'
Slice
'
,
continuous_update
=
True
)
slicer_obj
=
widgets
.
interactive
(
_slicer
,
position
=
position_slider
)
Loading