Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
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
24 changes: 24 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,15 @@ jobs:
- name: build
run: cmake --build build

- name: interface tests
run: cd build && ctest -L cli --output-on-failure

- name: unit tests
run: cd build && ctest -L unittest --output-on-failure --parallel 4

- name: compatibility tests
run: cd build && ctest -L compatibility --output-on-failure

- name: binary tests
run: cd build && ctest -L binary --output-on-failure
#
Expand Down Expand Up @@ -116,9 +122,15 @@ jobs:
- name: build
run: cmake --build build

- name: interface tests
run: cd build && ctest -L cli --output-on-failure

- name: unit tests
run: cd build && ctest -L unittest --output-on-failure --parallel 4

- name: compatibility tests
run: cd build && ctest -L compatibility --output-on-failure

- name: binary tests
run: cd build && ctest -L binary --output-on-failure
#
Expand Down Expand Up @@ -171,9 +183,15 @@ jobs:
- name: build
run: cmake --build build

- name: interface tests
run: cd build && ctest -L cli --output-on-failure

- name: unit tests
run: cd build && ctest -L unittest --output-on-failure --parallel 4

- name: compatibility tests
run: cd build && ctest -L compatibility --output-on-failure

- name: binary tests
run: cd build && ctest -L binary --output-on-failure
#
Expand Down Expand Up @@ -243,9 +261,15 @@ jobs:
- name: build
run: cmake --build build

- name: interface tests
run: cd build && ctest -L cli --output-on-failure

- name: unit tests
run: cd build && ctest -L unittest --output-on-failure --parallel 4

- name: compatibility tests
run: cd build && ctest -L compatibility --output-on-failure

- name: binary tests
run: cd build && ctest -L binary --output-on-failure
#
Expand Down
4 changes: 2 additions & 2 deletions cpp/cmd/connectomeedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ void usage() {
SYNOPSIS = "Perform basic operations on a connectome";

ARGUMENTS
+ Argument ("input", "the input connectome.").type_text ()
+ Argument ("input", "the input connectome.").type_file_in()

+ Argument ("operation", "the operation to apply,"
" one of: " + join(operations, ", ") + ".").type_choice (operations)

+ Argument ("output", "the output connectome.").type_text();
+ Argument ("output", "the output connectome.").type_file_out();

}
// clang-format on
Expand Down
3 changes: 2 additions & 1 deletion cpp/cmd/dirstat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ void usage() {
+ Argument ("dirs", "the text file or image containing the directions.").type_file_in();

OPTIONS
// TODO This could be a different command-line argument type
+ Option ("output", "output selected metrics as a space-delimited list,"
"suitable for use in scripts."
" This will produce one line of values per selected shell."
" Valid metrics are as specified in the description above.")
+ Argument ("list")
+ Argument ("list").type_text()
+ DWI::ShellsOption
+ DWI::GradImportOptions();

Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/dwi2fod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void usage() {
+ Argument ("algorithm", "the algorithm to use for FOD estimation. "
"(options are: " + join(algorithms, ",") + ")").type_choice (algorithms)
+ Argument ("dwi", "the input diffusion-weighted image").type_image_in()
+ Argument ("response odf", "pairs of input tissue response and output ODF images").allow_multiple();
+ Argument ("response odf", "pairs of input tissue response and output ODF images").type_file_in().type_image_out().allow_multiple();

OPTIONS
+ DWI::GradImportOptions()
Expand Down
4 changes: 2 additions & 2 deletions cpp/cmd/fixel2peaks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ void usage() {
+ Fixel::format_description;

ARGUMENTS
+ Argument ("in", "the input fixel information").type_various ()
+ Argument ("out", "the output peaks image").type_image_out ();
+ Argument ("in", "the input fixel information").type_directory_in().type_image_in()
+ Argument ("out", "the output peaks image").type_image_out();

OPTIONS
+ Option ("number", "maximum number of fixels in each voxel"
Expand Down
10 changes: 1 addition & 9 deletions cpp/cmd/fixelcfestats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ void usage() {
+ Argument ("contrast", "the contrast matrix,"
" specified as rows of weights").type_file_in ()

// .type_various() rather than .type_directory_in() to catch people trying to
// pass a track file, and give a more informative error message
+ Argument ("connectivity", "the fixel-fixel connectivity matrix").type_various ()
+ Argument ("connectivity", "the fixel-fixel connectivity matrix").type_directory_in()

+ Argument ("out_fixel_directory", "the output directory where results will be saved."
" Will be created if it does not exist").type_text();
Expand Down Expand Up @@ -173,12 +171,6 @@ class SubjectFixelImport : public Math::Stats::SubjectDataImportBase {
};

void run() {
if (Path::has_suffix(argument[4], ".tck"))
throw Exception("This version of fixelcfestats requires as input not a track file, but a "
"pre-calculated fixel-fixel connectivity matrix; in addition, input fixel "
"data must be pre-smoothed. Please check command / pipeline documentation "
"specific to this software version.");

const value_type cfe_dh = get_option_value("cfe_dh", Fixel::Filter::cfe_default_dh);
const value_type cfe_e = get_option_value("cfe_e", Fixel::Filter::cfe_default_e);
const value_type cfe_h = get_option_value("cfe_h", Fixel::Filter::cfe_default_h);
Expand Down
4 changes: 2 additions & 2 deletions cpp/cmd/fixelfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ void usage() {
+ Fixel::format_description;

ARGUMENTS
+ Argument ("input", "the input: either a fixel data file, or a fixel directory (see Description)").type_various()
+ Argument ("input", "the input: either a fixel data file, or a fixel directory (see Description)").type_image_in().type_directory_in()
+ Argument ("filter", "the filtering operation to perform;"
" options are: " + join (filters, ", ")).type_choice (filters)
+ Argument ("output", "the output: either a fixel data file, or a fixel directory (see Description)").type_various();
+ Argument ("output", "the output: either a fixel data file, or a fixel directory (see Description)").type_image_out().type_directory_out();

OPTIONS
+ Option ("matrix", "provide a fixel-fixel connectivity matrix"
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/mrcalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ ARGUMENTS
+ Argument ("operand", "an input image,"
" intensity value,"
" or special keyword"
" (see Description)").type_various().allow_multiple();
" (see Description)").type_image_in().type_image_out().type_float().type_text().allow_multiple();

OPTIONS

Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/mrconvert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ void usage() {
+ Option ("copy_properties",
"clear all generic properties"
" and replace with the properties from the image / file specified.")
+ Argument ("source").type_various()
+ Argument ("source").type_image_in().type_file_in()

+ Stride::Options

Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/mtnormalise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void usage() {

ARGUMENTS
+ Argument("input output", "list of all input and output tissue compartment files"
" (see example usage).").type_various().allow_multiple();
" (see example usage).").type_image_in().type_image_out().allow_multiple();

OPTIONS
+ Option("mask", "the mask defines the data used to compute the intensity normalisation."
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/shconv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void usage() {
+ Math::SH::encoding_description;

ARGUMENTS
+ Argument ("odf response", "pairs of input ODF image and corresponding responses").allow_multiple()
+ Argument ("odf response", "pairs of input ODF image and corresponding responses").type_image_in().type_file_in().allow_multiple()
+ Argument ("SH_out", "the output spherical harmonics coefficients image.").type_image_out();

OPTIONS
Expand Down
4 changes: 2 additions & 2 deletions cpp/cmd/tckconvert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ void usage() {
" output-0000.txt, output-0001.txt, output-0002.txt, ...");

ARGUMENTS
+ Argument ("input", "the input track file.").type_various()
+ Argument ("output", "the output track file.").type_file_out();
+ Argument ("input", "the input track file.").type_tracks_in().type_file_in().type_text()
+ Argument ("output", "the output track file.").type_tracks_out().type_file_out();

OPTIONS
+ Option ("scanner2voxel",
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/tckmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const OptionGroup OutputDimOption = OptionGroup ("Options for the dimensionality
"(references an internal direction set),"
" or a path to a text file containing a set of directions"
" stored as azimuth/elevation pairs")
+ Argument ("path").type_various()
+ Argument ("path").type_file_in().type_integer()
+ Option ("tod",
"generate a Track Orientation Distribution (TOD) in each voxel;"
" need to specify the maximum spherical harmonic degree lmax to use"
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/transformcalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void usage() {
SYNOPSIS = "Perform calculations on linear transformation matrices";

ARGUMENTS
+ Argument ("inputs", "the input(s) for the specified operation").allow_multiple()
+ Argument ("inputs", "the input(s) for the specified operation").type_image_in().type_file_in().allow_multiple()
+ Argument ("operation", "the operation to perform;"
" one of: " + join(operations, ", ") +
" (see description section for details).").type_choice (operations)
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/transformcompose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void usage() {
+ Argument ("output", "the output file"
" (may be a linear transformation text file,"
" or a deformation warp field image,"
" depending on usage)").type_various();
" depending on usage)").type_file_out().type_image_out();

OPTIONS
+ Option ("template", "define the output grid defined by a template image")
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/transformconvert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void usage() {
"");

ARGUMENTS
+ Argument ("input", "the input(s) for the specified operation").allow_multiple()
+ Argument ("input", "the input(s) for the specified operation").type_file_in().type_image_in().allow_multiple()
+ Argument ("operation", "the operation to perform;"
" one of: " + join(operations, ", ")).type_choice (operations)
+ Argument ("output", "the output transformation matrix.").type_file_out ();
Expand Down
Loading
Loading