Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
platy-browser-data
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
Container Registry
Model registry
Operate
Environments
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
Christian Tischer
platy-browser-data
Merge requests
!6
Add python scripts to run registration on the cluster
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add python scripts to run registration on the cluster
registration-wrapper
into
master
Overview
12
Commits
7
Pipelines
0
Changes
4
2 unresolved threads
Hide all comments
Merged
Constantin Pape
requested to merge
registration-wrapper
into
master
5 years ago
Overview
12
Commits
7
Pipelines
0
Changes
2
2 unresolved threads
Hide all comments
Expand
0
0
Merge request reports
Compare
version 4
version 6
975cc6b3
5 years ago
version 5
0af98c8a
5 years ago
version 4
38cfadd7
5 years ago
version 3
894c5930
5 years ago
version 2
7fd8291d
5 years ago
version 1
dd0aa99e
5 years ago
master (base)
and
version 6
latest version
e8bec9d1
7 commits,
5 years ago
version 6
975cc6b3
6 commits,
5 years ago
version 5
0af98c8a
5 commits,
5 years ago
version 4
38cfadd7
4 commits,
5 years ago
version 3
894c5930
3 commits,
5 years ago
version 2
7fd8291d
2 commits,
5 years ago
version 1
dd0aa99e
1 commit,
5 years ago
Show latest version
2 files
+
54
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
scripts/extension/registration/apply_registration.py
+
14
−
3
Options
@@ -123,15 +123,26 @@ def apply_for_file(input_path, output_path,
# "elastixDirectory='/g/almf/software/elastix_v4.8', workingDirectory='$TMPDIR',
# inputImageFile='$INPUT_IMAGE',transformationFile='/g/cba/exchange/platy-trafos/linear/TransformParameters.BSpline10-3Channels.0.txt
# outputFile='$OUTPUT_IMAGE',outputModality='Save as BigDataViewer .xml/.h5',numThreads='1'"
# NOTE: I ommit --run here, because fiji throws a warning that it does not recognise the argument
cmd
=
[
fiji_executable
,
"
--ij2
"
,
"
--headless
"
,
"
\"
Transformix
\"
"
,
transformix_argument
]
cmd
=
[
fiji_executable
,
"
--ij2
"
,
"
--headless
"
,
"
--run
"
,
"
\"
Transformix
\"
"
,
transformix_argument
]
cmd_str
=
"
"
.
join
(
cmd
)
fu
.
log
(
"
Calling the following command:
"
)
fu
.
log
(
cmd_str
)
# the elastix wrapper only works properly if we set these as environment variables as well, see
# TODO make issue about this
# os.environ['TMPDIR'] = tmp_folder
os
.
environ
[
'
TRAFO
'
]
=
transformation_file
try
:
check_output
(
cmd
)
# check_output(cmd)
# the CLI parser is very awkward (to put it nicely).
# I could only get it to work by passing the whole command string
# and setting shell to True.
# otherwise, it would parse something wrong, and do nothing but
# throwing a warning:
# [WARNING] Ignoring invalid argument: --run
check_output
([
cmd_str
],
shell
=
True
)
except
CalledProcessError
as
e
:
raise
RuntimeError
(
e
.
output
)
Loading