With -o option, the result is stored into the folder defined by -o, we cannot add a prefix filename
The -n option add this prefix filename
option "input" i "Input image filename" string no
option "inputDcm" d "Input dicom filename" string no
-option "outputDcm" o "Output dicom filename" string no
+option "outputDcm" o "Output dicom folder" string no
+option "nameDicom" n "Output dicom filename" string no
// Generate the file names
OutputNamesGeneratorType::Pointer outputNames = OutputNamesGeneratorType::New();
std::string seriesFormat(m_ArgsInfo.outputDcm_arg);
- seriesFormat = seriesFormat + "/" + "IM%d.dcm";
+ seriesFormat = seriesFormat + "/";
+ if (m_ArgsInfo.nameDicom_given)
+ seriesFormat = seriesFormat + m_ArgsInfo.nameDicom_arg + "_";
+ seriesFormat = seriesFormat + "IM%d.dcm";
outputNames->SetSeriesFormat(seriesFormat.c_str());
outputNames->SetStartIndex(1);
outputNames->SetEndIndex(outputSize[2]);