]> Creatis software - clitk.git/commitdiff
Skip last level corrections
authorsrit <srit>
Wed, 22 Sep 2010 09:10:24 +0000 (09:10 +0000)
committersrit <srit>
Wed, 22 Sep 2010 09:10:24 +0000 (09:10 +0000)
registration/clitkBLUTDIRGenericFilter.cxx

index 2e0c756f363c8ac244f8789a94ac9ead17cd64d2..511c598a176d96407b3957cece42eef7da9223bc 100755 (executable)
@@ -206,10 +206,10 @@ void BLUTDIRGenericFilter::InitializeImageType()
 
          // DS : if we want to skip the last pyramid level, force to only 1 iteration
          DD(m_ArgsInfo.skipLastPyramidLevel_flag);
-         if (m_ArgsInfo.skipLastPyramidLevel_flag) {
+         if ((currentLevel == numberOfLevels) && (m_ArgsInfo.skipLastPyramidLevel_flag)) {
            DD(m_ArgsInfo.maxIt_arg);
-           std::cout << "I skip the last pyramid level : set max iteration to 1" << std::endl;
-           m_ArgsInfo.maxIt_arg = 1;
+           std::cout << "I skip the last pyramid level : set max iteration to 0" << std::endl;
+           m_ArgsInfo.maxIt_arg = 0;
            DD(m_ArgsInfo.maxIt_arg);
          }