]> Creatis software - clitk.git/commitdiff
Remove bug introduced in previeous patch about initial coeficients
authordelmon <delmon>
Wed, 26 Jan 2011 12:58:23 +0000 (12:58 +0000)
committerdelmon <delmon>
Wed, 26 Jan 2011 12:58:23 +0000 (12:58 +0000)
registration/clitkMultipleBSplineDeformableTransformInitializer.txx

index 1ee4be96f7d42740e6072131c3cde21a103167aa..b6e80564cb740fa55f55c18ee436d10847485354 100644 (file)
@@ -197,6 +197,7 @@ namespace clitk
     typename CoefficientReaderType::Pointer coeffReader = CoefficientReaderType::New();
     std::vector<typename CoefficientImageType::Pointer> coefficientImages;
     unsigned nLabels = m_Transform->GetnLabels();
+    coefficientImages.resize(nLabels);
 
     int dotpos = s.length() - 1;
     while (dotpos >= 0 && s[dotpos] != '.')
@@ -208,7 +209,7 @@ namespace clitk
       osfname << s.substr(0, dotpos) << '_' << i << s.substr(dotpos);
       coeffReader->SetFileName(osfname.str());
       if (m_Verbose)
-        std::cout << "Reading initial coefficients from file: " << osfname << "..." << std::endl;
+        std::cout << "Reading initial coefficients from file: " << osfname.str() << "..." << std::endl;
       coeffReader->Update();
       coefficientImages[i] = coeffReader->GetOutput();
     }