Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New commands: peaksconvert, peakscheck #2918

Draft
wants to merge 226 commits into
base: dwi_metadata
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
226 commits
Select commit Hold shift + click to select a range
cd8bbfb
Created custom callables for different datatypes on cmd
ankitasanil Feb 6, 2023
075db52
Used callable types in commands - mrtrix_cleanup and dwicat
ankitasanil Feb 6, 2023
8d91a38
Changes done as instructed in the review
ankitasanil Feb 7, 2023
ebd36cf
Used callable types in few more commands
ankitasanil Feb 7, 2023
2988229
Python API: Integrate argument types across commands
Lestropie Feb 7, 2023
481462f
Changed the syntax as per https://github.com/ankitasanil/mrtrix3/pull…
ankitasanil Feb 7, 2023
54bca48
Python API: Used Python list comprehension as per https://github.com/…
ankitasanil Feb 7, 2023
cd33930
population_template: Refine cmdline interface
Lestropie Feb 7, 2023
9f3d624
Change interfaces for robust linear registration estimators
Lestropie Feb 10, 2023
51ccc67
Python API: Updated class names as per https://github.com/ankitasanil…
ankitasanil Feb 13, 2023
47fec95
Modifications in existing code to handle new argument types
ankitasanil Feb 13, 2023
b72c211
Modifications in existing code to handle new argument types (contd.)
ankitasanil Feb 14, 2023
6dcfe53
Added inheritance for TracksIn checks as per (https://github.com/anki…
ankitasanil Feb 14, 2023
935a8aa
Python API: Ability to handle piped commands
ankitasanil Mar 7, 2023
e749fe9
Changes for output image piping
ankitasanil Mar 14, 2023
a830bf4
Python CLI: Tweaks to custom types
Lestropie Jul 12, 2023
4560880
Python CLI: Code cleanup
Lestropie Jul 13, 2023
2894b1d
Move handling of envvar MRTRIX_PRESERVE_TMPFILE
Lestropie Aug 10, 2023
294ea57
Fix pylint warnings for python_cmd_changes branch
Lestropie Aug 10, 2023
70c154e
Python: Move some functions from path to utils module
Lestropie Aug 10, 2023
e9393d7
First functional version of image piping with Python scripts
Lestropie Aug 10, 2023
913ce00
mrtrix3.app: Terminate if piping image to stdout
Lestropie Aug 10, 2023
2e1efdb
mrtrix3.app: Improvements to __print_full_usage__ behaviour
Lestropie Aug 11, 2023
ff56d40
dwibiascorrect ants: Change command-line options
Lestropie Aug 11, 2023
a847938
mrtrix3.app: Fix __print_full_usage__ for subparser algorithms
Lestropie Aug 11, 2023
94abafa
Docs: Improved metavar usage in Python scripts
Lestropie Aug 11, 2023
dda5db7
Merge branch 'dev' into python_cmd_changes
Lestropie Aug 11, 2023
1a9759e
dwi2mask consensus: Generalise -algorithm interface
Lestropie Aug 11, 2023
a22382f
dwi2mask legacy: Make use of Python command image piping
Lestropie Aug 11, 2023
4208d2e
Initial support for macOS app bundles for GUI apps
bjeurissen Oct 25, 2023
ee13d9d
Clean up app bundle generation
bjeurissen Oct 26, 2023
1f846cf
Add macos icons
bjeurissen Oct 26, 2023
17ce416
This should probably be defined when calling cmake instead
bjeurissen Oct 26, 2023
dc81d10
Fix typo
bjeurissen Oct 26, 2023
659ebbf
Include application icons with app bundle
bjeurissen Oct 27, 2023
15bb65f
Include file association icons with app bundle
bjeurissen Oct 27, 2023
52f8769
Only add app bundle icons on macos
bjeurissen Oct 27, 2023
7f27e89
Python API: Ranged integers and floats
Lestropie Jan 30, 2024
18e6850
Python: Broad fixing of typed command-line argument usage
Lestropie Feb 4, 2024
d511e3d
Python API: Multiple related changes
Lestropie Feb 13, 2024
b31c9d9
New unit test for Python CLI typing
Lestropie Feb 14, 2024
7791a38
Fix Python help pages for bound integers & floats
Lestropie Feb 18, 2024
4da90a0
Python API: Multiple API/CLI changes
Lestropie Feb 18, 2024
4c74759
Testing: Verify piped image support for Python scripts
Lestropie Feb 19, 2024
ff86c44
Python API: Fix __print_full_usage__ for algorithm wrappers
Lestropie Feb 19, 2024
24f1c32
Fix Python issues identified by latest tests
Lestropie Feb 19, 2024
48d8997
Merge branch 'dev' into cmake_app_bundles
bjeurissen Feb 19, 2024
6778522
Merge remote-tracking branch 'origin/dev' into python_cmd_changes
Lestropie Feb 28, 2024
a483d00
Python: Code formatting & documentation regeneration
Lestropie Feb 28, 2024
9822d58
Python CLI: Better metavar handling
Lestropie Feb 28, 2024
d158891
clang-format and clang-tidy fixes for #2678
Lestropie Feb 28, 2024
d5a4596
Add unit testing of Python CLI
Lestropie Feb 28, 2024
4c331e2
Merge remote-tracking branch 'origin/dev' into python_cmd_changes
Lestropie Feb 28, 2024
9cee5ae
dwicat: Use F-strings
Lestropie Feb 28, 2024
d783f8c
population_template: Resolve merge conflicts
Lestropie Feb 28, 2024
55929b0
5ttgen: Algorithms return path of final image to test using 5ttcheck
Lestropie Feb 29, 2024
db3ca00
Resolution of pylint errors for #2678
Lestropie Feb 29, 2024
ff983de
Python CLI: Fixes to typing & alternative typing interface
Lestropie Mar 1, 2024
553a4fb
Python CLI: Move relevant functions / classes into Parser class
Lestropie Mar 1, 2024
e25e977
Fix for population_template for #2678
Lestropie Mar 1, 2024
23f436d
Python API: Fixes to typed CLI
Lestropie Mar 4, 2024
45738a2
Python CLI: Default flags to None
Lestropie Mar 4, 2024
2e6c28a
Merge remote-tracking branch 'origin/dev' into python_cmd_changes
Lestropie Mar 5, 2024
e98ecc6
Testing: Finalise Python CLI testing
Lestropie Mar 5, 2024
40b7a7c
population_template: Syntax fixes
Lestropie Mar 5, 2024
8a0d639
Python CLI: Fix for __print_usage_markdown__
Lestropie Mar 5, 2024
e384c18
Add argument to specify environment for bash tests
daljit46 Mar 5, 2024
7790fd3
testing: Set PYTHONPATH for non-cpp-standalone unit tests
Lestropie Mar 5, 2024
d9587e6
Testing: DO not use sed in Python CLI tests
Lestropie Mar 6, 2024
8065803
Testing: Add C++ CLI evaluation
Lestropie Mar 11, 2024
be75618
CI: Fix PYTHONPATH setting in MSYS2
Lestropie Mar 11, 2024
08bc526
CI: Fix CLI dunder function checks on MSYS2
Lestropie Mar 11, 2024
e014b24
Merge remote-tracking branch 'origin/python_cmd_changes' into fix_pyt…
Lestropie Mar 11, 2024
4c9247b
CI: Fix C++ CLI tests on MSYS2
Lestropie Mar 11, 2024
f57bbd8
Merge pull request #2846 from MRtrix3/fix_python_cli_ci_test
Lestropie Mar 11, 2024
d6a84ba
CI: Final fixes for addition of C++ CLI tests
Lestropie Mar 12, 2024
f458793
Fix compilation of big object files in MINGW debug builds
daljit46 May 9, 2024
9ce93f3
Merge remote-tracking branch 'origin/dev' into python_cmd_changes
Lestropie May 13, 2024
65ba856
Testing: Greater testing of Python image piping support
Lestropie May 13, 2024
99dd927
mask2glass: Ensure input image is 3D
Lestropie May 13, 2024
7115593
Testing: Verify that Python commands handle paths with whitespaces
Lestropie May 13, 2024
4095d76
Testing: Import new test data for new mask2glass tests
Lestropie May 13, 2024
05b68d5
Python: Multiple fixes following merge of split tests & CLI changes
Lestropie May 14, 2024
69d3590
Merge remote-tracking branch 'origin/dev' into python_cmd_changes
Lestropie May 15, 2024
92f9a89
5ttgen hsvs: Fixes to whitespace handling changes
Lestropie May 16, 2024
fc4b798
population_template: Fix handling of output directory paths
Lestropie May 16, 2024
f34730d
dwi2mask consensus: Fix for whitespace in scratch directory path
Lestropie May 16, 2024
2a55a43
Testing: Whitespaces in scratch directory paths
Lestropie May 17, 2024
ef5b8c5
mrtrix3.app: Fix argparse exception on existing output filesystem path
Lestropie May 18, 2024
40fdc8e
Testing: Fix execution of bash unit tests
Lestropie May 18, 2024
b3d98c1
Testing: Add comments to CLI tests
Lestropie May 18, 2024
4d8f766
Python CLI & testing fixes
Lestropie May 18, 2024
de5ebe7
Docs: Auto update for changes to -scratch option
MRtrixBot May 20, 2024
2eefdcd
Add missing windows.h include header
daljit46 May 22, 2024
961eeb2
OpenGL: Minimise what is imported by windows.h
Lestropie May 23, 2024
eac5823
Merge pull request #2914 from MRtrix3/fix_msys2_compilation_minimise_…
Lestropie May 23, 2024
c2b2e76
Merge branch 'dev' into python_cmd_changes
Lestropie May 23, 2024
cda68bd
Merge pull request #2678 from MRtrix3/python_cmd_changes
Lestropie May 23, 2024
a05cef6
Merge remote-tracking branch 'origin/dev' into cmake_app_bundles
daljit46 May 30, 2024
05d4fa5
New option to build non-core code as a static lib
daljit46 May 15, 2024
7b01831
Rename MRTRIX_BUILD_STATIC to MRTRIX_BUILD_NON_CORE_STATIC
daljit46 May 16, 2024
1a015dd
Move cmake/bundle to packaging/macos
daljit46 May 31, 2024
1eafc83
Add MacOSBundle.cmake module
daljit46 May 31, 2024
fc07064
New commands: peaksconvert, peakscheck
Lestropie Jun 5, 2024
dab9d53
Merge pull request #2897 from MRtrix3/fix_mingw_debug
Lestropie Jun 6, 2024
419ab8f
Add warning if cmake generator is not Ninja
daljit46 Jun 6, 2024
a805ef3
Create wrapper scripts for mrview and shview
daljit46 Jun 4, 2024
b053f7c
Set CMAKE_OSX_DEPLOYMENT_TARGET for MacOS
daljit46 Jun 4, 2024
f4bee41
Set copyright year in MacOSBundle.cmake
daljit46 Jun 4, 2024
3c804f6
Set correct icons for mrview
daljit46 Jun 6, 2024
399cf16
Merge pull request #2739 from MRtrix3/cmake_app_bundles
bjeurissen Jun 7, 2024
93f3741
Major changes to Python handling following cmake adoption
Lestropie Jun 9, 2024
71bc07c
update_copyright: Changes to reflect post-cmake refactoring
Lestropie Jun 9, 2024
9b3de4d
population_template: Split source code between files
MRtrixBot Jun 9, 2024
6a65e81
git blame: Ignore splitting of population_template code
Lestropie Jun 9, 2024
9ff374b
Avoid using CMAKE_SOURCE_DIR
daljit46 Jun 13, 2024
9195a11
Merge pull request #2919 from MRtrix3/generator_warning
daljit46 Jun 13, 2024
398cc04
CMakeList.txt: fix very minor typo in warning message
jdtournier Jun 14, 2024
6ca8fd0
Merge pull request #2924 from MRtrix3/cmakelist_typo
daljit46 Jun 14, 2024
4e2bc42
Remove app bundle related files and logic now that cmake takes care i…
bjeurissen Jun 19, 2024
2f8df8d
Remove MRTRIX_USE_QT6 as it is no longer supported
bjeurissen Jun 19, 2024
73e4687
Make sure app bundles can find the bundled qt6 plugins
bjeurissen Jun 19, 2024
96ed3f1
remove TIFF from build system following removal from code
jdtournier Jun 19, 2024
648cc08
Merge pull request #2927 from MRtrix3/macos_binary_fixes
bjeurissen Jun 19, 2024
29c8f8d
Merge pull request #2928 from MRtrix3/remove_tiff_from_build
bjeurissen Jun 19, 2024
94cecc2
Bump up OSX_DEPLOYMENT_TARGET to 11.00
bjeurissen Jun 19, 2024
47915bd
Merge pull request #2930 from MRtrix3/ox-deployment-target
bjeurissen Jun 19, 2024
291a747
Cleanup cmake scripts for Python commands
daljit46 Jun 12, 2024
70fea8d
Add CMake targets for Python files
daljit46 Jun 14, 2024
6f2948a
Change/extend inputs for MakePythonExecutable
daljit46 Jun 20, 2024
1f1fb1d
Fix execution of unit tests
daljit46 Jun 20, 2024
cee8d41
Fix permissions with CMake < 3.19
daljit46 Jun 20, 2024
6424277
Merge pull request #2907 from MRtrix3/build_static
Lestropie Jun 20, 2024
f87bc0e
Merge remote-tracking branch 'origin/dev' into cmake_python_changes
Lestropie Jun 21, 2024
3fce648
Fix Python commands, documentation generation, CLI test
Lestropie Jun 21, 2024
561dd2d
Merge pull request #2920 from MRtrix3/cmake_python_changes
daljit46 Jun 21, 2024
2c76370
Disable PCHs when building macos release
daljit46 Jun 25, 2024
27d377a
Enable MRTRIX_BUILD_NON_CORE_STATIC for releases
daljit46 Jun 25, 2024
225f7d7
Merge pull request #2932 from MRtrix3/packaging_changes
daljit46 Jun 25, 2024
38cc992
Modified FindFFTW to only look for double precision version of fftw3,…
bjeurissen Jun 26, 2024
8266d9f
Merge pull request #2934 from MRtrix3/fftw_double_only
bjeurissen Jun 27, 2024
07c5290
New command: dirrotate
Lestropie Jul 17, 2024
49f7ede
dirmerge: Better selection of first volume
Lestropie Jul 17, 2024
e1f0c99
Add interface library for project-wide compile options
daljit46 Jul 30, 2024
79d4edf
Use string_view in dash detection/removal
daljit46 May 3, 2024
3ab8fd9
Replace union with std::variant for argument choices
daljit46 May 21, 2024
b0f8018
Use std::string for app CLI
daljit46 Jun 7, 2024
6286158
Use std::string in rest of the code
daljit46 Jun 18, 2024
54b9672
Cleanup MRView::Window::parse_arguments
daljit46 May 27, 2024
c21d48d
Store index of args in raw CL input in ParsedArgument
daljit46 Jun 7, 2024
f30a90d
Update copyright script with new APP_CPP_STRING
daljit46 Jun 18, 2024
11421f3
Fix parsing of arguments in mrcalc
daljit46 Jun 19, 2024
4a76d09
Fix command line history string construction
daljit46 Jun 19, 2024
32babf0
Remove unnecessary comment
daljit46 Jun 19, 2024
5495bbe
Update error message in mrview CLI
daljit46 Jun 19, 2024
032fb56
Add further tests for app CLI
daljit46 Jun 19, 2024
a6ab4e1
Skip dash tests on MSYS2
daljit46 Aug 2, 2024
1f394fb
dwi2tensor: Update reference for constrained fit
Lestropie Aug 5, 2024
ac48d3a
Fix warning with GCC14
daljit46 Aug 8, 2024
6da0f39
Python API: Support Python 3.12
Lestropie Aug 9, 2024
1f9d3b4
mrtrix3.app: Pylint fixes for 3.12 compatibility
Lestropie Aug 12, 2024
5b5a0ea
mrtrix3.run: Improved shebang parsing
Lestropie Aug 12, 2024
7b10856
Merge pull request #2957 from MRtrix3/python_support_3_12
Lestropie Aug 12, 2024
1a7c2d9
Merge pull request #2956 from MRtrix3/dwi2tensor_constrained_reference
Lestropie Aug 12, 2024
2104608
mrtrix3.run: Further refinement to _shebang()
Lestropie Aug 12, 2024
9c32534
Merge pull request #2950 from MRtrix3/mrtrix-common-target
daljit46 Aug 12, 2024
eab106d
ZMerge remote-tracking branch 'origin/dev' into python_shebang_parser
Lestropie Aug 12, 2024
d3bb1b4
Merge pull request #2911 from MRtrix3/no_char_arguments
daljit46 Aug 13, 2024
fb7d615
run._shebang(): Fix non-use of determined shebang
Lestropie Aug 14, 2024
129bbf5
mrtrix3.run: Some renaming "shebang" -> "interpreter"
Lestropie Aug 14, 2024
cd0d42f
Merge pull request #2958 from MRtrix3/python_shebang_parser
Lestropie Aug 15, 2024
5193816
Fix drag & drop on Windows for mrview
daljit46 Apr 25, 2024
1f2656d
Parse URLs in GUI drop events using helper function
daljit46 May 30, 2024
bc57d8d
Move external deps in thirdparty
daljit46 Aug 19, 2024
28706ea
Update CI workflows for new handling of external deps
daljit46 Aug 19, 2024
47641c8
Patch Eigen configuration with custom patch
daljit46 Mar 12, 2024
61aa984
Provide option to specify local dependencies folder
daljit46 Aug 20, 2024
fa12bdb
Link pch_cmd against half
daljit46 Jul 10, 2024
a4ef4f0
Change location of FETCHCONTENT_BASE_DIR
daljit46 Jul 11, 2024
0978325
Use compressed release artefacts rather than cloning repos
daljit46 Jul 12, 2024
3014111
Avoid configuring Eigen via FetchContent_MakeAvaiable
daljit46 Jul 12, 2024
6736038
Don't set custom FETCHCONTENT_BASE_DIR
daljit46 Jul 25, 2024
10c4993
Remove core/file/json.h and core/half.hpp
MRtrixBot Aug 19, 2024
d591658
Fix invalid memory access when reading colour maps
daljit46 Aug 21, 2024
ab987ea
clang-format-all: Fix shebang
Lestropie Aug 20, 2024
f53b197
Merge pull request #2975 from MRtrix3/clang-format-all-shebang
Lestropie Aug 23, 2024
a3b583d
Update .git-blame-ignore-devs
MRtrixBot Aug 23, 2024
64e6647
Merge pull request #2976 from MRtrix3/update_git_blame
Lestropie Aug 26, 2024
4f52a59
dirmerge: Code formatting fixes from CI
Lestropie Aug 27, 2024
d9ddbd4
Merge pull request #2886 from MRtrix3/fix_drag_drop_mrview_windows
daljit46 Aug 28, 2024
02c8a76
Fetch NIfTI headers from remote host
daljit46 Aug 29, 2024
b17370c
Remove NIfTI headers from codebase
MRtrixBot Aug 29, 2024
c7638ab
CMake: Add NIfTI headers to documentation list of external dependencies
Lestropie Aug 30, 2024
78c8e4a
Remove duplicate line
daljit46 Aug 30, 2024
f0f4a4c
Merge pull request #2979 from MRtrix3/remote_nifti_headers
daljit46 Aug 30, 2024
f5ec480
5ttgen hsvs: Fix execution where FAST is not available
Lestropie Sep 2, 2024
769a4ca
Merge pull request #2981 from MRtrix3/5ttgen_hsvs_fix
Lestropie Sep 2, 2024
abf0985
dwibiasnormmask: Fix masking algorithm selection
Lestropie Sep 2, 2024
7817fda
Merge pull request #2983 from MRtrix3/dwibiasnormmask_maskalgo_fix
Lestropie Sep 2, 2024
b6f8d65
dirmerge: New option -firstisfirst
Lestropie Sep 2, 2024
a47ed52
New tests for dirmerge command
Lestropie Sep 2, 2024
2a40671
Merge pull request #2944 from MRtrix3/dirmerge_firstvol
Lestropie Sep 2, 2024
1434c49
Fix warnings from new pylint version
Lestropie Sep 2, 2024
025eb0f
Python executables shebang: use env
Lestropie Aug 16, 2024
07693ac
Revisions for new command dirrotate
Lestropie Sep 10, 2024
34f4a83
dirrotate: Reduce default number of rotations evaluated
Lestropie Sep 10, 2024
ba814f1
Add tests for dirrotate
Lestropie Sep 10, 2024
5c1f6ec
Merge remote-tracking branch 'origin/dev' into dirrotate
Lestropie Sep 10, 2024
f30ab69
Merge pull request #2943 from MRtrix3/dirrotate
Lestropie Sep 10, 2024
2f27ac6
Disable the use of LLD by default
daljit46 Sep 10, 2024
153d03c
Use ExternalProject to download test data at build time
daljit46 Aug 27, 2024
5fba417
Remove testing data submodules
daljit46 Aug 28, 2024
3a7d2f7
Update commit hashes for testing data repos
daljit46 Sep 10, 2024
91ac695
Log location of local testing data directories
daljit46 Sep 10, 2024
de81d47
Disable download logs for NIfTI headers to the console
daljit46 Sep 10, 2024
7bd2a1d
dwibiasnormmask minor tweaks
Lestropie Sep 11, 2024
0b27783
responsemean: Fix terminal message for 1 b-value
Lestropie Sep 11, 2024
ad3f5b6
Download NIfTI headers from GitHub
daljit46 Sep 11, 2024
bb38d56
Merge pull request #2993 from MRtrix3/fix_nifti_download
bjeurissen Sep 11, 2024
45e3d96
Merge pull request #2848 from MRtrix3/remove_data_submodule
daljit46 Sep 12, 2024
39d61f8
Merge pull request #2989 from MRtrix3/mrtrix_use_lld_option
daljit46 Sep 12, 2024
81d10ef
peaksconvert: Fix compilation
Lestropie Sep 16, 2024
68aa74b
Merge remote-tracking branch 'origin/dev' into new_peaks_cmds
Lestropie Sep 17, 2024
9939209
peaksconvert: Resolutions following merge
Lestropie Sep 17, 2024
19176e9
mrcalc: Support -config option
Lestropie May 20, 2024
22178a1
peakscheck: Updates following merge
Lestropie Sep 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Python: Broad fixing of typed command-line argument usage
  • Loading branch information
Lestropie committed Feb 4, 2024
commit 18e685014256d2f65d73ae3ed268e6fc90a40090
2 changes: 1 addition & 1 deletion bin/dwibiasnormmask
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def usage(cmdline): #pylint: disable=unused-variable
'set to 0 to proceed until convergence')
internal_options.add_argument('-mask_algo', choices=MASK_ALGOS, metavar='algorithm',
help='The algorithm to use for mask estimation, potentially based on the ODF sum image (see Description); default: ' + MASK_ALGO_DEFAULT)
internal_options.add_argument('-lmax', metavar='values', type=app.Parser.SequenceInt,
internal_options.add_argument('-lmax', metavar='values', type=app.Parser.SequenceInt(),
help='The maximum spherical harmonic degree for the estimated FODs (see Description); '
'defaults are "' + ','.join(str(item) for item in LMAXES_MULTI) + '" for multi-shell and "' + ','.join(str(item) for item in LMAXES_SINGLE) + '" for single-shell data)')
app.add_dwgrad_import_options(cmdline)
Expand Down
40 changes: 20 additions & 20 deletions bin/population_template
Original file line number Diff line number Diff line change
Expand Up @@ -59,43 +59,43 @@ def usage(cmdline): #pylint: disable=unused-variable
'with the pairs corresponding to different contrasts provided sequentially.')

options = cmdline.add_argument_group('Multi-contrast options')
options.add_argument('-mc_weight_initial_alignment', type=app.Parser().SequenceFloat(), help='Weight contribution of each contrast to the initial alignment. Comma separated, default: 1.0')
options.add_argument('-mc_weight_rigid', type=app.Parser().SequenceFloat(), help='Weight contribution of each contrast to the objective of rigid registration. Comma separated, default: 1.0')
options.add_argument('-mc_weight_affine', type=app.Parser().SequenceFloat(), help='Weight contribution of each contrast to the objective of affine registration. Comma separated, default: 1.0')
options.add_argument('-mc_weight_nl', type=app.Parser().SequenceFloat(), help='Weight contribution of each contrast to the objective of nonlinear registration. Comma separated, default: 1.0')
options.add_argument('-mc_weight_initial_alignment', type=app.Parser.SequenceFloat(), help='Weight contribution of each contrast to the initial alignment. Comma separated, default: 1.0')
options.add_argument('-mc_weight_rigid', type=app.Parser.SequenceFloat(), help='Weight contribution of each contrast to the objective of rigid registration. Comma separated, default: 1.0')
options.add_argument('-mc_weight_affine', type=app.Parser.SequenceFloat(), help='Weight contribution of each contrast to the objective of affine registration. Comma separated, default: 1.0')
options.add_argument('-mc_weight_nl', type=app.Parser.SequenceFloat(), help='Weight contribution of each contrast to the objective of nonlinear registration. Comma separated, default: 1.0')

linoptions = cmdline.add_argument_group('Options for the linear registration')
linoptions.add_argument('-linear_no_pause', action='store_true', help='Do not pause the script if a linear registration seems implausible')
linoptions.add_argument('-linear_no_drift_correction', action='store_true', help='Deactivate correction of template appearance (scale and shear) over iterations')
linoptions.add_argument('-linear_estimator', choices=LINEAR_ESTIMATORS, help='Specify estimator for intensity difference metric. Valid choices are: l1 (least absolute: |x|), l2 (ordinary least squares), lp (least powers: |x|^1.2), none (no robust estimator). Default: none.')
linoptions.add_argument('-rigid_scale', type=app.Parser().SequenceFloat(), help='Specify the multi-resolution pyramid used to build the rigid template, in the form of a list of scale factors (default: %s). This and affine_scale implicitly define the number of template levels' % ','.join([str(x) for x in DEFAULT_RIGID_SCALES]))
linoptions.add_argument('-rigid_lmax', type=app.Parser().SequenceInt(), help='Specify the lmax used for rigid registration for each scale factor, in the form of a list of integers (default: %s). The list must be the same length as the linear_scale factor list' % ','.join([str(x) for x in DEFAULT_RIGID_LMAX]))
linoptions.add_argument('-rigid_niter', type=app.Parser().SequenceInt(), help='Specify the number of registration iterations used within each level before updating the template, in the form of a list of integers (default:50 for each scale). This must be a single number or a list of same length as the linear_scale factor list')
linoptions.add_argument('-affine_scale', type=app.Parser().SequenceFloat(), help='Specify the multi-resolution pyramid used to build the affine template, in the form of a list of scale factors (default: %s). This and rigid_scale implicitly define the number of template levels' % ','.join([str(x) for x in DEFAULT_AFFINE_SCALES]))
linoptions.add_argument('-affine_lmax', type=app.Parser().SequenceInt(), help='Specify the lmax used for affine registration for each scale factor, in the form of a list of integers (default: %s). The list must be the same length as the linear_scale factor list' % ','.join([str(x) for x in DEFAULT_AFFINE_LMAX]))
linoptions.add_argument('-affine_niter', type=app.Parser().SequenceInt(), help='Specify the number of registration iterations used within each level before updating the template, in the form of a list of integers (default:500 for each scale). This must be a single number or a list of same length as the linear_scale factor list')
linoptions.add_argument('-rigid_scale', type=app.Parser.SequenceFloat(), help='Specify the multi-resolution pyramid used to build the rigid template, in the form of a list of scale factors (default: %s). This and affine_scale implicitly define the number of template levels' % ','.join([str(x) for x in DEFAULT_RIGID_SCALES]))
linoptions.add_argument('-rigid_lmax', type=app.Parser.SequenceInt(), help='Specify the lmax used for rigid registration for each scale factor, in the form of a list of integers (default: %s). The list must be the same length as the linear_scale factor list' % ','.join([str(x) for x in DEFAULT_RIGID_LMAX]))
linoptions.add_argument('-rigid_niter', type=app.Parser.SequenceInt(), help='Specify the number of registration iterations used within each level before updating the template, in the form of a list of integers (default:50 for each scale). This must be a single number or a list of same length as the linear_scale factor list')
linoptions.add_argument('-affine_scale', type=app.Parser.SequenceFloat(), help='Specify the multi-resolution pyramid used to build the affine template, in the form of a list of scale factors (default: %s). This and rigid_scale implicitly define the number of template levels' % ','.join([str(x) for x in DEFAULT_AFFINE_SCALES]))
linoptions.add_argument('-affine_lmax', type=app.Parser.SequenceInt(), help='Specify the lmax used for affine registration for each scale factor, in the form of a list of integers (default: %s). The list must be the same length as the linear_scale factor list' % ','.join([str(x) for x in DEFAULT_AFFINE_LMAX]))
linoptions.add_argument('-affine_niter', type=app.Parser.SequenceInt(), help='Specify the number of registration iterations used within each level before updating the template, in the form of a list of integers (default:500 for each scale). This must be a single number or a list of same length as the linear_scale factor list')

nloptions = cmdline.add_argument_group('Options for the non-linear registration')
nloptions.add_argument('-nl_scale', type=app.Parser().SequenceFloat(), help='Specify the multi-resolution pyramid used to build the non-linear template, in the form of a list of scale factors (default: %s). This implicitly defines the number of template levels' % ','.join([str(x) for x in DEFAULT_NL_SCALES]))
nloptions.add_argument('-nl_lmax', type=app.Parser().SequenceInt(), help='Specify the lmax used for non-linear registration for each scale factor, in the form of a list of integers (default: %s). The list must be the same length as the nl_scale factor list' % ','.join([str(x) for x in DEFAULT_NL_LMAX]))
nloptions.add_argument('-nl_niter', type=app.Parser().SequenceInt(), help='Specify the number of registration iterations used within each level before updating the template, in the form of a list of integers (default: %s). The list must be the same length as the nl_scale factor list' % ','.join([str(x) for x in DEFAULT_NL_NITER]))
nloptions.add_argument('-nl_scale', type=app.Parser.SequenceFloat(), help='Specify the multi-resolution pyramid used to build the non-linear template, in the form of a list of scale factors (default: %s). This implicitly defines the number of template levels' % ','.join([str(x) for x in DEFAULT_NL_SCALES]))
nloptions.add_argument('-nl_lmax', type=app.Parser.SequenceInt(), help='Specify the lmax used for non-linear registration for each scale factor, in the form of a list of integers (default: %s). The list must be the same length as the nl_scale factor list' % ','.join([str(x) for x in DEFAULT_NL_LMAX]))
nloptions.add_argument('-nl_niter', type=app.Parser.SequenceInt(), help='Specify the number of registration iterations used within each level before updating the template, in the form of a list of integers (default: %s). The list must be the same length as the nl_scale factor list' % ','.join([str(x) for x in DEFAULT_NL_NITER]))
nloptions.add_argument('-nl_update_smooth', type=app.Parser.Float(0.0), default=DEFAULT_NL_UPDATE_SMOOTH, help='Regularise the gradient update field with Gaussian smoothing (standard deviation in voxel units, Default ' + str(DEFAULT_NL_UPDATE_SMOOTH) + ' x voxel_size)')
nloptions.add_argument('-nl_disp_smooth', type=app.Parser.Float(0.0), default=DEFAULT_NL_DISP_SMOOTH, help='Regularise the displacement field with Gaussian smoothing (standard deviation in voxel units, Default ' + str(DEFAULT_NL_DISP_SMOOTH) + ' x voxel_size)')
nloptions.add_argument('-nl_grad_step', type=app.Parser.Float(0.0), default=DEFAULT_NL_GRAD_STEP, help='The gradient step size for non-linear registration (Default: ' + str(DEFAULT_NL_GRAD_STEP) + ')')

options = cmdline.add_argument_group('Input, output and general options')
options.add_argument('-type', choices=REGISTRATION_MODES, help='Specify the types of registration stages to perform. Options are "rigid" (perform rigid registration only which might be useful for intra-subject registration in longitudinal analysis), "affine" (perform affine registration) and "nonlinear" as well as cominations of registration types: %s. Default: rigid_affine_nonlinear' % ', '.join('"' + x + '"' for x in REGISTRATION_MODES if "_" in x), default='rigid_affine_nonlinear')
options.add_argument('-voxel_size', type=app.Parser().SequenceFloat(), help='Define the template voxel size in mm. Use either a single value for isotropic voxels or 3 comma-separated values.')
options.add_argument('-voxel_size', type=app.Parser.SequenceFloat(), help='Define the template voxel size in mm. Use either a single value for isotropic voxels or 3 comma-separated values.')
options.add_argument('-initial_alignment', choices=INITIAL_ALIGNMENT, default='mass', help='Method of alignment to form the initial template. Options are "mass" (default), "robust_mass" (requires masks), "geometric" and "none".')
options.add_argument('-mask_dir', type=app.Parser().DirectoryIn(), help='Optionally input a set of masks inside a single directory, one per input image (with the same file name prefix). Using masks will speed up registration significantly. Note that masks are used for registration, not for aggregation. To exclude areas from aggregation, NaN-mask your input images.')
options.add_argument('-warp_dir', type=app.Parser().DirectoryOut(), help='Output a directory containing warps from each input to the template. If the folder does not exist it will be created')
options.add_argument('-transformed_dir', type=app.Parser().DirectoryOut(), help='Output a directory containing the input images transformed to the template. If the folder does not exist it will be created. For multi-contrast registration, provide comma separated list of directories.')
options.add_argument('-linear_transformations_dir', type=app.Parser().DirectoryOut(), help='Output a directory containing the linear transformations used to generate the template. If the folder does not exist it will be created')
options.add_argument('-template_mask', type=app.Parser().ImageOut(), help='Output a template mask. Only works if -mask_dir has been input. The template mask is computed as the intersection of all subject masks in template space.')
options.add_argument('-mask_dir', type=app.Parser.DirectoryIn(), help='Optionally input a set of masks inside a single directory, one per input image (with the same file name prefix). Using masks will speed up registration significantly. Note that masks are used for registration, not for aggregation. To exclude areas from aggregation, NaN-mask your input images.')
options.add_argument('-warp_dir', type=app.Parser.DirectoryOut(), help='Output a directory containing warps from each input to the template. If the folder does not exist it will be created')
options.add_argument('-transformed_dir', type=app.Parser.DirectoryOut(), help='Output a directory containing the input images transformed to the template. If the folder does not exist it will be created. For multi-contrast registration, provide comma separated list of directories.')
options.add_argument('-linear_transformations_dir', type=app.Parser.DirectoryOut(), help='Output a directory containing the linear transformations used to generate the template. If the folder does not exist it will be created')
options.add_argument('-template_mask', type=app.Parser.ImageOut(), help='Output a template mask. Only works if -mask_dir has been input. The template mask is computed as the intersection of all subject masks in template space.')
options.add_argument('-noreorientation', action='store_true', help='Turn off FOD reorientation in mrregister. Reorientation is on by default if the number of volumes in the 4th dimension corresponds to the number of coefficients in an antipodally symmetric spherical harmonic series (i.e. 6, 15, 28, 45, 66 etc)')
options.add_argument('-leave_one_out', choices=LEAVE_ONE_OUT, default='auto', help='Register each input image to a template that does not contain that image. Valid choices: ' + ', '.join(LEAVE_ONE_OUT) + '. (Default: auto (true if n_subjects larger than 2 and smaller than 15)) ')
options.add_argument('-aggregate', choices=AGGREGATION_MODES, help='Measure used to aggregate information from transformed images to the template image. Valid choices: %s. Default: mean' % ', '.join(AGGREGATION_MODES))
options.add_argument('-aggregation_weights', type=app.Parser().FileIn(), help='Comma-separated file containing weights used for weighted image aggregation. Each row must contain the identifiers of the input image and its weight. Note that this weighs intensity values not transformations (shape).')
options.add_argument('-aggregation_weights', type=app.Parser.FileIn(), help='Comma-separated file containing weights used for weighted image aggregation. Each row must contain the identifiers of the input image and its weight. Note that this weighs intensity values not transformations (shape).')
options.add_argument('-nanmask', action='store_true', help='Optionally apply masks to (transformed) input images using NaN values to specify include areas for registration and aggregation. Only works if -mask_dir has been input.')
options.add_argument('-copy_input', action='store_true', help='Copy input images and masks into local scratch directory.')
options.add_argument('-delete_temporary_files', action='store_true', help='Delete temporary files from scratch directory during template creation.')
Expand Down
8 changes: 4 additions & 4 deletions docs/reference/commands/dwi2mask.rst
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ Options specific to the "mtnorm" algorithm
Options for importing the diffusion gradient table
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- **-grad** Provide the diffusion gradient table in MRtrix format
- **-grad file** Provide the diffusion gradient table in MRtrix format

- **-fslgrad bvecs bvals** Provide the diffusion gradient table in FSL bvecs/bvals format

Expand All @@ -924,7 +924,7 @@ Additional standard options for Python scripts

- **-scratch /path/to/scratch/** manually specify the path in which to generate the scratch directory.

- **-continue <ScratchDir> <LastFile>** continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.
- **-continue ScratchDir LastFile** continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options
^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -1019,7 +1019,7 @@ Options specific to the 'Synthstrip' algorithm
Options for importing the diffusion gradient table
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- **-grad** Provide the diffusion gradient table in MRtrix format
- **-grad file** Provide the diffusion gradient table in MRtrix format

- **-fslgrad bvecs bvals** Provide the diffusion gradient table in FSL bvecs/bvals format

Expand All @@ -1030,7 +1030,7 @@ Additional standard options for Python scripts

- **-scratch /path/to/scratch/** manually specify the path in which to generate the scratch directory.

- **-continue <ScratchDir> <LastFile>** continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.
- **-continue ScratchDir LastFile** continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options
^^^^^^^^^^^^^^^^
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/commands/dwi2response.rst
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ Options specific to the 'tax' algorithm

- **-peak_ratio value** Second-to-first-peak amplitude ratio threshold

- **-max_iters iterations** Maximum number of iterations
- **-max_iters iterations** Maximum number of iterations (set to 0 to force convergence)

- **-convergence percentage** Percentile change in any RF coefficient required to continue iterating

Expand Down Expand Up @@ -683,7 +683,7 @@ Options specific to the 'tournier' algorithm

- **-dilate passes** Number of mask dilation steps to apply when deriving voxel mask to test in the next iteration

- **-max_iters iterations** Maximum number of iterations
- **-max_iters iterations** Maximum number of iterations (set to 0 to force convergence)

Options for importing the diffusion gradient table
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
8 changes: 4 additions & 4 deletions docs/reference/commands/dwibiascorrect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -336,16 +336,16 @@ Options specific to the "mtnorm" algorithm
Options for importing the diffusion gradient table
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- **-grad** Provide the diffusion gradient table in MRtrix format
- **-grad file** Provide the diffusion gradient table in MRtrix format

- **-fslgrad bvecs bvals** Provide the diffusion gradient table in FSL bvecs/bvals format

Options common to all dwibiascorrect algorithms
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- **-mask image** Manually provide a mask image for bias field estimation
- **-mask image** Manually provide an input mask image for bias field estimation

- **-bias image** Output the estimated bias field
- **-bias image** Output an image containing the estimated bias field

Additional standard options for Python scripts
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -354,7 +354,7 @@ Additional standard options for Python scripts

- **-scratch /path/to/scratch/** manually specify the path in which to generate the scratch directory.

- **-continue <ScratchDir> <LastFile>** continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.
- **-continue ScratchDir LastFile** continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options
^^^^^^^^^^^^^^^^
Expand Down
Loading