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
ab1d6ed7
"modules/bindings/pymod/hhblits2.py" did not exist on "f6995e5d65dd16b79a83e0819acea43c0ab52e9c"
Commit
ab1d6ed7
authored
6 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Allow model file to be '-' or 'None' to disable shading correction
parent
25b8746f
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/shading.py
+13
-5
13 additions, 5 deletions
src/imcflibs/imagej/shading.py
with
13 additions
and
5 deletions
src/imcflibs/imagej/shading.py
+
13
−
5
View file @
ab1d6ed7
...
...
@@ -116,15 +116,23 @@ def process_folder(path, suffix, outpath, model_file, fmt):
The output folder where results will be stored. Existing files will be
overwritten.
model_file : str
The full path to a normalized 32-bit shading model image.
The full path to a normalized 32-bit shading model image. If set to
'
-
'
or
'
NONE
'
, no shading correction will be applied.
fmt : str
The file format suffix for storing the results.
"""
imp
=
ij
.
IJ
.
openImage
(
model_file
)
if
model_file
in
[
"
-
"
,
"
NONE
"
]:
model
=
None
else
:
model
=
ij
.
IJ
.
openImage
(
model_file
)
model
.
show
()
# required, otherwise the IJ.run() call ignores the model
matching_files
=
listdir_matching
(
path
,
suffix
)
log
.
info
(
"
Running shading correction and projections on %s files...
"
,
len
(
matching_files
))
imp
.
show
()
# required, otherwise the IJ.run() call will ignore the imp
for
orig_file
in
matching_files
:
in_file
=
os
.
path
.
join
(
path
,
orig_file
)
correct_and_project
(
in_file
,
outpath
,
imp
,
'
ALL
'
,
fmt
)
imp
.
close
()
correct_and_project
(
in_file
,
outpath
,
model
,
'
ALL
'
,
fmt
)
if
model
:
model
.
close
()
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