Skip to content

Commit 0c59adc

Browse files
committed
Add option to not merge complex files
1 parent eb7e841 commit 0c59adc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Source/nanconvert_dicom.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ args::Positional<std::string> input_arg(parser, "INPUT", "Input directory");
3838
args::HelpFlag help(parser, "HELP", "Show this help menu", {'h', "help"});
3939
args::Flag verbose(parser, "VERBOSE", "Print more information", {'v', "verbose"});
4040
args::Flag double_precision(parser, "DOUBLE", "Write out double precision files", {'d', "double"});
41-
args::Flag param_file(parser,
42-
"PARAMS",
43-
"Write out text file with parameters (TE/TR etc.)",
44-
{'p', "params"});
41+
args::Flag
42+
param_file(parser, "PARAMS", "Write out text file with parameters (TE/TR etc.)", {"params"});
43+
args::Flag split_all(parser, "S", "Split all series (do not convert to complex)", {'s', "split"});
4544
args::ValueFlagList<std::string> rename_args(
4645
parser, "RENAME", "Rename using specified header fields (can be multiple)", {'r', "rename"});
4746
args::ValueFlag<std::string>
@@ -215,7 +214,7 @@ int main(int argc, char **argv) {
215214
std::set<int> processed_indices;
216215
for (size_t i = 0; i < all_series.size(); i++) {
217216
std::string const tag = all_series.size() > 1 ? fmt::format("{}", i + 1) : "";
218-
if (all_types[i] == 2) { // Real series
217+
if (!split_all && all_types[i] == 2) { // Real series
219218
if ((i + 1 < all_series.size()) && (all_types[i + 1] == 3) &&
220219
(all_series.at(i)->GetOrigin().GetVnlVector().is_equal(
221220
all_series.at(i + 1)->GetOrigin().GetVnlVector(), 2.e-6))) {

0 commit comments

Comments
 (0)