Skip to content

Commit 9b36d4d

Browse files
added --linear option and license
1 parent 7e63f95 commit 9b36d4d

File tree

6 files changed

+255
-87
lines changed

6 files changed

+255
-87
lines changed

LICENSE

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
GNU GENERAL PUBLIC LICENSE
2+
Version 3, 29 June 2007
3+
4+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5+
Everyone is permitted to copy and distribute verbatim copies
6+
of this license document, but changing it is not allowed.
7+
8+
Preamble
9+
10+
The GNU General Public License is a free, copyleft license for
11+
software and other kinds of works.
12+
13+
The licenses for most software and other practical works are designed
14+
to take away your freedom to share and change the works. By contrast,
15+
the GNU General Public License is intended to guarantee your freedom to
16+
share and change all versions of a program--to make sure it remains free
17+
software for all its users. We, the Free Software Foundation, use the
18+
GNU General Public License for most of our software; it applies also to
19+
any other work released this way by its authors. You can apply it to
20+
your programs, too.
21+
22+
When we speak of free software, we are referring to freedom, not
23+
price. Our General Public Licenses are designed to make sure that you
24+
have the freedom to distribute copies of free software (and charge for
25+
them if you wish), that you receive source code or can get it if you
26+
want it, that you can change the software or use pieces of it in new
27+
free programs, and that you know you can do these things.
28+
29+
To protect your rights, we need to prevent others from denying you
30+
these rights or asking you to surrender the rights. Therefore, you have
31+
certain responsibilities if you distribute copies of the software, or if
32+
you modify it: responsibilities to respect the freedom of others.
33+
34+
For example, if you distribute copies of such a program, whether
35+
gratis or for a fee, you must pass on to the recipients the same
36+
freedoms that you received. You must make sure that they, too, receive
37+
or can get the source code. And you must show them these terms so they
38+
know their rights.
39+
40+
Developers that use the GNU GPL protect your rights with two steps:
41+
(1) assert copyright on the software, and (2) offer you this License
42+
giving you legal permission to copy, distribute and/or modify it.
43+
44+
For the developers' and authors' protection, the GPL clearly explains
45+
that there is no warranty for this free software. For both users' and
46+
authors' sake, the GPL requires that modified versions be marked as
47+
changed, so that their problems will not be attributed erroneously to
48+
authors of previous versions.
49+
50+
Some devices are designed to deny users access to install or run
51+
modified versions of the software inside them, although the manufacturer
52+
can do so. This is fundamentally incompatible with the aim of
53+
protecting users' freedom to change the software. The systematic
54+
pattern of such abuse occurs in the area of products for individuals to
55+
use, which is precisely where it is most unacceptable. Therefore, we
56+
have designed this version of the GPL to prohibit the practice for those
57+
products. If such problems arise substantially in other domains, we
58+
stand ready to extend this provision to those domains in future versions
59+
of the GPL, as needed to protect the freedom of users.
60+
61+
Finally, every program is threatened constantly by software patents.
62+
States should not allow patents to restrict development and use of
63+
software on general-purpose computers, but in those that do, we wish to
64+
avoid the special danger that patents applied to a free program could
65+
make it effectively proprietary. To prevent this, the GPL assures that
66+
patents cannot be used to render the program non-free.
67+
68+
The precise terms and conditions for copying, distribution and
69+
modification follow.
70+
71+
TERMS AND CONDITIONS
72+
73+
0. Definitions.
74+
75+
"This License" refers to version 3 of the GNU General Public License.
76+
77+
"Copyright" also means copyright-like laws that apply to other kinds of
78+
works, such as semiconductor masks.
79+
80+
"The Program" refers to any copyrightable work licensed under this
81+
License. Each licensee is addressed as "you". "Licensees" and
82+
"recipients" may be individuals or organizations.
83+
84+
To "modify" a work means to copy from or adapt all or part of the work
85+
in a fashion requiring copyright permission, other than the making of an
86+
exact copy. The resulting work is called a "modified version" of the
87+
earlier work or a work "based on" the earlier work.
88+
89+
A "covered work" means either the unmodified Program or a work based
90+
on the Program.
91+
92+
To "propagate" a work means to do anything with it that, without
93+
permission, would make you directly or secondarily liable for
94+
infringement under applicable copyright law, except executing it on a
95+
computer or modifying a private copy. Propagation includes copying,
96+
distribution (with or without modification), making available to the
97+
public, and in some countries other activities as well.
98+
99+
To "convey" a work means any kind of propagation that enables other
100+
parties to make or receive copies. Mere interaction with a user through
101+
a computer network, with no transfer of a copy, is not conveying.
102+
103+
An interactive user interface displays "Appropriate Legal Notices"
104+
to the extent that it includes a convenient and prominently visible
105+
feature that (1)

examples/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ python synthseg_registration.py --input <input_image.nii.gz> --reference <refere
3232
- `--reference`: Reference/target image (any contrast)
3333
- `--output`: Path where the registered image will be saved
3434
- `--workdir`: (Optional) Directory for intermediate files (default: current directory)
35+
- `--linear`: (Optional) Perform linear-only registration (affine only). Skips the non-linear warping step to increase speed when deformation fields are not needed.
3536

3637
### Example
3738

micaflow/cli.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ def print_extended_help():
218218
{YELLOW}--rm-cerebellum{RESET} Remove cerebellum from brain extraction outputs
219219
{YELLOW}--PED{RESET} Phase encoding direction of DWI, options are: 'ap', 'pa', 'lr', 'rl', 'si', 'is' (default: 'pa')
220220
{YELLOW}--shell-dimension{RESET} Dimension of the DWI image referring to shells (default: 3)
221+
{YELLOW}--linear{RESET} Use linear-only registration to MNI space (faster, no nonlinear warping), default is False
221222
{YELLOW}Remaining arguments are passed to Snakemake for workflow management{RESET}
222223
223224
{CYAN}{BOLD}────────────────── EXAMPLE PIPELINE USAGE ───────────────{RESET}
@@ -477,6 +478,9 @@ def format_help(self):
477478
pipeline_parser.add_argument(
478479
"--shell-dimension", type=int, default=3, help="Dimension of the DWI image referring to shells"
479480
)
481+
pipeline_parser.add_argument(
482+
"--linear", action="store_true", help="Use linear-only registration to MNI space (faster, no nonlinear warping)"
483+
)
480484

481485
# SynthSeg command
482486
synthseg_parser = subparsers.add_parser(
@@ -1053,6 +1057,7 @@ def format_help(self):
10531057
"extract_brain",
10541058
"shell_dimension",
10551059
"PED",
1060+
"linear",
10561061
]:
10571062
if getattr(args, param.replace("-", "_"), None):
10581063
config[param] = getattr(args, param.replace("-", "_"))

0 commit comments

Comments
 (0)