Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python-imcflibs
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This project is archived. Its data is
read-only
.
Show more breadcrumbs
imcf
python-imcflibs
Commits
4822aad6
Commit
4822aad6
authored
Jan 8, 2019
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Make sure input dataset actually is a stack before projecting
parent
eabdfcf8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/imcflibs/imagej/projections.py
+12
-0
12 additions, 0 deletions
src/imcflibs/imagej/projections.py
with
12 additions
and
0 deletions
src/imcflibs/imagej/projections.py
+
12
−
0
View file @
4822aad6
...
...
@@ -19,6 +19,10 @@ def average(imp):
ij.ImagePlus
The result of the projection.
"""
if
imp
.
getDimensions
()[
3
]
<
2
:
log
.
warn
(
"
ImagePlus is not a z-stack, not creating a projection!
"
)
return
imp
log
.
debug
(
"
Creating average projection...
"
)
proj
=
ZProjector
.
run
(
imp
,
"
avg
"
)
return
proj
...
...
@@ -37,6 +41,10 @@ def maximum(imp):
ij.ImagePlus
The result of the projection.
"""
if
imp
.
getDimensions
()[
3
]
<
2
:
log
.
warn
(
"
ImagePlus is not a z-stack, not creating a projection!
"
)
return
imp
log
.
debug
(
"
Creating maximum intensity projection...
"
)
proj
=
ZProjector
.
run
(
imp
,
"
max
"
)
return
proj
...
...
@@ -59,6 +67,10 @@ def create_and_save(imp, projections, path, filename, export_format):
export_format : str
The suffix to be given to Bio-Formats, determining the storage format.
"""
if
imp
.
getDimensions
()[
3
]
<
2
:
log
.
error
(
"
ImagePlus is not a z-stack, not creating any projections!
"
)
return
command
=
{
'
Average
'
:
'
avg
'
,
'
Maximum
'
:
'
max
'
,
...
...
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
sign in
to comment