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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
imcf
python-imcflibs
Commits
a61a260f
Commit
a61a260f
authored
6 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Make create_and_save() return a bool
parent
cf1e2906
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/imcflibs/imagej/projections.py
+13
-1
13 additions, 1 deletion
src/imcflibs/imagej/projections.py
with
13 additions
and
1 deletion
src/imcflibs/imagej/projections.py
+
13
−
1
View file @
a61a260f
...
...
@@ -66,10 +66,20 @@ def create_and_save(imp, projections, path, filename, export_format):
The original file name to derive the results name from.
export_format : str
The suffix to be given to Bio-Formats, determining the storage format.
Returns
-------
bool
True in case projections were created, False otherwise (e.g. if the
given ImagePlus is not a Z-stack).
"""
if
not
projections
:
log
.
debug
(
"
No projection type requested, skipping...
"
)
return
False
if
imp
.
getDimensions
()[
3
]
<
2
:
log
.
error
(
"
ImagePlus is not a z-stack, not creating any projections!
"
)
return
return
False
command
=
{
'
Average
'
:
'
avg
'
,
...
...
@@ -85,3 +95,5 @@ def create_and_save(imp, projections, path, filename, export_format):
export_format
,
overwrite
=
True
)
proj
.
close
()
return
True
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