Skip to content

Commit

Permalink
Made the default output name explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
dchansen authored Nov 15, 2021
1 parent d1752d3 commit ec51eb5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ int main(int argc, char* argv[]) {

std::string schema_file_name;

std::string ismrmrd_file;
std::string ismrmrd_group;
std::string date_time = get_date_time_string();

Expand Down Expand Up @@ -473,7 +472,7 @@ int main(int argc, char* argv[]) {
("pMapStyle,x", po::value<std::string>(&parammap_xsl), "<Parameter stylesheet XSL file>")
("user-map", po::value<std::string>(&usermap_file), "<Provide a parameter map XML file>")
("user-stylesheet", po::value<std::string>(&usermap_xsl), "<Provide a parameter stylesheet XSL file>")
("output,o", po::value<std::string>(&ismrmrd_file)->default_value(""), "<ISMRMRD output file>")
("output,o", po::value<std::string>(), "<ISMRMRD output file (defaults to the input file name, with .mrd extension)>")
("outputGroup,g", po::value<std::string>(&ismrmrd_group)->default_value("dataset"),
"<ISMRMRD output group>")
("list,l", po::value<bool>(&list)->implicit_value(true), "<List embedded files>")
Expand Down Expand Up @@ -594,11 +593,14 @@ int main(int argc, char* argv[]) {
}
std::cout << "Siemens file is: " << siemens_dat_filename << std::endl;

if (ismrmrd_file.empty())
std::string ismrmrd_file;
if (!vm.count("output"))
{
boost::filesystem::path siemens_dat_path(siemens_dat_filename);
ismrmrd_file = siemens_dat_path.replace_extension(".mrd").string();
std::cout << "Output file not specified -- using " << ismrmrd_file << std::endl;
} else {
ismrmrd_file = vm["output"].as<std::string>();
}

std::string schema_file_name_content = load_embedded("ismrmrd.xsd");
Expand Down

0 comments on commit ec51eb5

Please sign in to comment.