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
!130
Automatic objects colormap
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Automatic objects colormap
automatic-objects-colormap
into
main
Overview
0
Commits
10
Pipelines
0
Changes
3
Merged
Automatic objects colormap
s233039
requested to merge
automatic-objects-colormap
into
main
10 months ago
Overview
0
Commits
10
Pipelines
0
Changes
1
https://www.notion.so/qim-dtu/Automatic-labels-colormap-122bab83b2f98056a334e949fecb9769
0
0
Merge request reports
Compare
version 3
version 4
3bedab48
9 months ago
version 3
91faafc0
9 months ago
version 2
8b979ba4
9 months ago
version 1
5d36c4bf
10 months ago
main (base)
and
latest version
latest version
4089027f
10 commits,
9 months ago
version 4
3bedab48
8 commits,
9 months ago
version 3
91faafc0
7 commits,
9 months ago
version 2
8b979ba4
6 commits,
9 months ago
version 1
5d36c4bf
5 commits,
10 months ago
Show latest version
1 file
+
3
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
qim3d/viz/explore.py
+
3
−
6
View file @ 4089027f
Edit in single-file editor
Open in Web IDE
Show full file
@@ -81,7 +81,8 @@ def slices(
img_height
=
img_size
img_width
=
img_size
# If we pass python None to the imshow function, we will get
# If we pass python None to the imshow function, it will set to
# default value 'antialiased'
if
interpolation
is
None
:
interpolation
=
'
none
'
@@ -102,14 +103,10 @@ def slices(
raise
ValueError
(
f
"
Invalid value for
'
axis
'
. It should be an integer between 0 and
{
vol
.
ndim
-
1
}
.
"
)
if
cmap
==
'
objects
'
:
num_labels
=
len
(
np
.
unique
(
vol
))
cmap
=
qim3d
.
viz
.
colormaps
.
objects
(
num_labels
)
if
type
(
cmap
)
==
matplotlib
.
colors
.
LinearSegmentedColormap
or
cmap
==
'
objects
'
:
num_labels
=
len
(
np
.
unique
(
vol
))
if
cmap
==
'
objects
'
:
cmap
=
qim3d
.
viz
.
colormaps
.
objects
(
num_labels
)
# If vmin and vmax are not set like this, then in case the
Loading