Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SVLT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
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
ALMF
SVLT
Commits
8b3226de
Commit
8b3226de
authored
1 year ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
Updated run_server command with relative path to user profile for mamba prompt
parent
bab29509
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
model_server/clients/examples/example_simple_ilastik.py
+49
-0
49 additions, 0 deletions
model_server/clients/examples/example_simple_ilastik.py
with
49 additions
and
0 deletions
model_server/clients/examples/example_simple_ilastik.py
0 → 100644
+
49
−
0
View file @
8b3226de
import
os
import
sys
from
ij
import
IJ
from
ij.plugin.filter
import
ParticleAnalyzer
from
ij.plugin.frame
import
Recorder
,
RoiManager
sys
.
path
.
append
(
os
.
path
.
join
(
os
.
path
.
expanduser
(
'
~
'
),
'
model_server
'
,
'
source
'
,
'
model_server
'
,
'
clients
'
)
)
from
imagej.adapter
import
run_request_sequence
import
ilastik_map_objects_simple
from
ij
import
IJ
params
=
{
'
pixel_classifier_path
'
:
'
z:/pepperkok/rhodes/projects/proj0011-plankton-seg/exp0019/px-03.ilp
'
,
'
object_classifier_path
'
:
'
z:/pepperkok/rhodes/projects/proj0011-plankton-seg/exp0019/obj-07.ilp
'
,
'
debug
'
:
True
,
'
channel
'
:
4
,
# zero-index
'
object_class
'
:
3
}
IJ
.
run
(
'
Remove Overlay
'
)
imp_czi
=
IJ
.
getImage
()
imp_obmap
=
run_request_sequence
(
imp_czi
,
ilastik_map_objects_simple
.
main
,
params
,
)
# transfer objects of specified class to image's overlay
imp_obmap
.
show
()
IJ
.
run
(
imp_obmap
,
"
glasbey on dark
"
,
""
)
IJ
.
setThreshold
(
imp_obmap
,
params
[
'
object_class
'
],
params
[
'
object_class
'
])
rm
=
RoiManager
.
getRoiManager
()
Recorder
.
setBlackBackground
()
imp_obmap
.
createThresholdMask
()
rm
.
reset
()
IJ
.
run
(
imp_obmap
,
"
Analyze Particles...
"
,
"
display exclude clear include add
"
)
rm
.
run
(
'
Show All
'
)
rm
.
moveRoisToOverlay
(
imp_czi
)
if
not
params
[
'
debug
'
]:
imp_obmap
.
close
()
imp_czi
.
show
()
\ No newline at end of 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