Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
24-12_mr-image_processing
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julius Steiglechner
24-12_mr-image_processing
Commits
7f3f61d2
Commit
7f3f61d2
authored
2 months ago
by
Julius Steiglechner
Browse files
Options
Downloads
Patches
Plain Diff
Review.
parent
0e4ddbae
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
intensity_modification/correction.py
+20
-6
20 additions, 6 deletions
intensity_modification/correction.py
with
20 additions
and
6 deletions
intensity_modification/correction.py
+
20
−
6
View file @
7f3f61d2
"""
This module provides functionality to correct and unify images.
"""
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 12 00:56:39 2024
@author: jsteiglechner
This module provides functionality to correct and unify images.
"""
import
numpy
as
np
def
clean_up_image
(
image
:
np
.
ndarray
)
->
np
.
ndarray
:
"""
Clean an image by removing infinite numbers and unnecessary dimensions.
"""
Clean an image by removing infinite numbers and unnecessary dimensions.
Parameters
----------
image : np.ndarray
an image.
Args:
image (np.ndarray): an image
Returns
-------
np.ndarray
cleaned image.
Returns:
np.ndarray: cleaned image
"""
return
np
.
nan_to_num
(
np
.
squeeze
(
image
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment