Skip to content

Commit

Permalink
Reseting defaults does not ignore prior arguments in call 2cd185f
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Jun 14, 2018
1 parent 2cd185f commit 1e09238
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion console/main_console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,11 @@ int main(int argc, const char * argv[])
if (invalidParam(i, argv)) return 0;
if ((argv[i][0] == 'y') || (argv[i][0] == 'Y'))
isSaveIni = true;
if ((argv[i][0] == 'i') || (argv[i][0] == 'I')) {
if (((argv[i][0] == 'i') || (argv[i][0] == 'I')) && (!isResetDefaults)) {
isResetDefaults = true;
printf("Defaults reset\n");
setDefaultOpts(&opts, argv);
i = 0; //re-read all settings for this pass, e.g. "dcm2niix -f %p_%s -d o" should save filename as "%p_%s"
}
if (((argv[i][0] == 'o') || (argv[i][0] == 'O')) && (!isResetDefaults)) {
//reset defaults - do not read, but do write defaults
Expand Down
1 change: 0 additions & 1 deletion console/nii_dicom_batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,6 @@ void nii_scale16bitUnsigned(unsigned char *img, struct nifti_1_header *hdr){
if (nVox < 1) return;
uint16_t * img16 = (uint16_t*) img;
uint16_t max16 = img16[0];
//clock_t start = clock();
for (int i=0; i < nVox; i++)
if (img16[i] > max16)
max16 = img16[i];
Expand Down

0 comments on commit 1e09238

Please sign in to comment.