From: delmon Date: Wed, 26 Jan 2011 12:58:23 +0000 (+0000) Subject: Remove bug introduced in previeous patch about initial coeficients X-Git-Tag: v1.2.0~266 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=26a433cebcf5a921ac2974631190c47fb63f4a21;p=clitk.git Remove bug introduced in previeous patch about initial coeficients --- diff --git a/registration/clitkMultipleBSplineDeformableTransformInitializer.txx b/registration/clitkMultipleBSplineDeformableTransformInitializer.txx index 1ee4be9..b6e8056 100644 --- a/registration/clitkMultipleBSplineDeformableTransformInitializer.txx +++ b/registration/clitkMultipleBSplineDeformableTransformInitializer.txx @@ -197,6 +197,7 @@ namespace clitk typename CoefficientReaderType::Pointer coeffReader = CoefficientReaderType::New(); std::vector 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(); }