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
dec2f947
Commit
dec2f947
authored
6 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Use fully-qualified calls
parent
710070f7
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
+4
-5
4 additions, 5 deletions
src/imcflibs/imagej/shading.py
with
4 additions
and
5 deletions
src/imcflibs/imagej/shading.py
+
4
−
5
View file @
dec2f947
...
@@ -2,8 +2,7 @@
...
@@ -2,8 +2,7 @@
import
os
import
os
from
ij
import
IJ
import
ij
# pylint: disable-msg=import-error
from
ij.plugin
import
ImageCalculator
,
RGBStackMerge
from
..imagej
import
bioformats
from
..imagej
import
bioformats
from
..imagej
import
projections
from
..imagej
import
projections
...
@@ -39,7 +38,7 @@ def apply_model(imps, model, merge=True):
...
@@ -39,7 +38,7 @@ def apply_model(imps, model, merge=True):
The merged ImagePlus with all channels, or the original list of stacks
The merged ImagePlus with all channels, or the original list of stacks
with the shading-corrected image planes.
with the shading-corrected image planes.
"""
"""
calc
=
ImageCalculator
()
calc
=
ij
.
plugin
.
ImageCalculator
()
for
stack
in
imps
:
for
stack
in
imps
:
# log.debug("Processing channel...")
# log.debug("Processing channel...")
calc
.
run
(
"
Divide stack
"
,
stack
,
model
)
calc
.
run
(
"
Divide stack
"
,
stack
,
model
)
...
@@ -47,7 +46,7 @@ def apply_model(imps, model, merge=True):
...
@@ -47,7 +46,7 @@ def apply_model(imps, model, merge=True):
if
not
merge
:
if
not
merge
:
return
imps
return
imps
merger
=
RGBStackMerge
()
merger
=
ij
.
plugin
.
RGBStackMerge
()
merged_imp
=
merger
.
mergeChannels
(
imps
,
False
)
merged_imp
=
merger
.
mergeChannels
(
imps
,
False
)
return
merged_imp
return
merged_imp
...
@@ -119,9 +118,9 @@ def process_folder(path, suffix, outpath, model_file, fmt):
...
@@ -119,9 +118,9 @@ def process_folder(path, suffix, outpath, model_file, fmt):
fmt : str
fmt : str
The file format suffix for storing the results.
The file format suffix for storing the results.
"""
"""
imp
=
ij
.
IJ
.
openImage
(
model_file
)
matching_files
=
listdir_matching
(
path
,
suffix
)
matching_files
=
listdir_matching
(
path
,
suffix
)
imp
=
IJ
.
openImage
(
model_file
)
imp
.
show
()
# required, otherwise the IJ.run() call will ignore the imp
imp
.
show
()
# required, otherwise the IJ.run() call will ignore the imp
for
orig_file
in
matching_files
:
for
orig_file
in
matching_files
:
in_file
=
os
.
path
.
join
(
path
,
orig_file
)
in_file
=
os
.
path
.
join
(
path
,
orig_file
)
...
...
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