Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
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
Evan Edmond
fslpy
Commits
1587e85a
Commit
1587e85a
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
RF: Tweaks to x5 scripts
parent
a53e041f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fsl/scripts/fsl_apply_x5.py
+3
-3
3 additions, 3 deletions
fsl/scripts/fsl_apply_x5.py
fsl/scripts/fsl_convert_x5.py
+17
-7
17 additions, 7 deletions
fsl/scripts/fsl_convert_x5.py
with
20 additions
and
10 deletions
fsl/scripts/fsl_apply_x5.py
+
3
−
3
View file @
1587e85a
...
@@ -129,9 +129,9 @@ def main(args=None):
...
@@ -129,9 +129,9 @@ def main(args=None):
args
=
sys
.
argv
[
1
:]
args
=
sys
.
argv
[
1
:]
print
()
print
()
print
(
'
Warning: this version of fsl_apply_x5 is a development release.
'
print
(
'
Warning: this version of fsl_apply_x5 is a development release.
\n
'
'
Interface, behaviour, and input/output formats of future versions
'
'
Interface, behaviour, and input/output formats of future versions
\n
'
'
may differ from this version.
'
)
'
may differ
substantially
from this version.
'
)
print
()
print
()
args
=
parseArgs
(
args
)
args
=
parseArgs
(
args
)
...
...
This diff is collapsed.
Click to expand it.
fsl/scripts/fsl_convert_x5.py
+
17
−
7
View file @
1587e85a
...
@@ -11,6 +11,7 @@ transformation file formats.
...
@@ -11,6 +11,7 @@ transformation file formats.
import
os.path
as
op
import
os.path
as
op
import
functools
as
ft
import
functools
as
ft
import
textwrap
as
tw
import
sys
import
sys
import
shutil
import
shutil
import
logging
import
logging
...
@@ -46,10 +47,15 @@ def parseArgs(args):
...
@@ -46,10 +47,15 @@ def parseArgs(args):
'
name.
'
,
'
name.
'
,
}
}
epilog
=
tw
.
dedent
(
"""
If the input and output file formats are the same, the input file
is simply copied to the output file.
"""
).
strip
()
parser
=
argparse
.
ArgumentParser
(
'
fsl_convert_x5
'
)
parser
=
argparse
.
ArgumentParser
(
'
fsl_convert_x5
'
)
subparsers
=
parser
.
add_subparsers
(
dest
=
'
ctype
'
)
subparsers
=
parser
.
add_subparsers
(
dest
=
'
ctype
'
)
flirt
=
subparsers
.
add_parser
(
'
flirt
'
)
flirt
=
subparsers
.
add_parser
(
'
flirt
'
,
epilog
=
epilog
)
fnirt
=
subparsers
.
add_parser
(
'
fnirt
'
)
fnirt
=
subparsers
.
add_parser
(
'
fnirt
'
,
epilog
=
epilog
)
imgtype
=
ft
.
partial
(
parse_data
.
Image
,
loadData
=
False
)
imgtype
=
ft
.
partial
(
parse_data
.
Image
,
loadData
=
False
)
flirt
.
add_argument
(
'
input
'
,
help
=
helps
[
'
input
'
])
flirt
.
add_argument
(
'
input
'
,
help
=
helps
[
'
input
'
])
...
@@ -79,8 +85,12 @@ def parseArgs(args):
...
@@ -79,8 +85,12 @@ def parseArgs(args):
sys
.
exit
(
0
)
sys
.
exit
(
0
)
if
len
(
args
)
==
1
:
if
len
(
args
)
==
1
:
if
args
[
0
]
==
'
flirt
'
:
flirt
.
print_help
()
if
args
[
0
]
==
'
flirt
'
:
elif
args
[
0
]
==
'
fnirt
'
:
fnirt
.
print_help
()
flirt
.
print_help
()
sys
.
exit
(
0
)
elif
args
[
0
]
==
'
fnirt
'
:
fnirt
.
print_help
()
sys
.
exit
(
0
)
args
=
parser
.
parse_args
(
args
)
args
=
parser
.
parse_args
(
args
)
...
@@ -187,9 +197,9 @@ def main(args=None):
...
@@ -187,9 +197,9 @@ def main(args=None):
args
=
sys
.
argv
[
1
:]
args
=
sys
.
argv
[
1
:]
print
()
print
()
print
(
'
Warning: this version of fsl_convert_x5 is a development release.
'
print
(
'
Warning: this version of fsl_convert_x5 is a development release.
\n
'
'
Interface, behaviour, and input/output formats of future versions
'
'
Interface, behaviour, and input/output formats of future versions
\n
'
'
may differ from this version.
'
)
'
may differ
substantially
from this version.
'
)
print
()
print
()
args
=
parseArgs
(
args
)
args
=
parseArgs
(
args
)
...
...
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