Skip to content
Snippets Groups Projects
Commit bca52463 authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

ENH : clear the coefficient vector at each sample iteration

parent 0eac0402
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,10 @@ GaussianAdditiveNoiseSampleListFilter<TInputSampleList,TOutputSampleList> ...@@ -41,6 +41,10 @@ GaussianAdditiveNoiseSampleListFilter<TInputSampleList,TOutputSampleList>
typedef itk::Statistics::MersenneTwisterRandomVariateGenerator GeneratorType; typedef itk::Statistics::MersenneTwisterRandomVariateGenerator GeneratorType;
GeneratorType::Pointer generator = GeneratorType::New(); GeneratorType::Pointer generator = GeneratorType::New();
// Clear the coefficients vector first
m_WhiteGaussianNoiseCoefficients.clear();
// Get the size of the measurement vectors
unsigned int size = this->GetInput()->Get()->GetMeasurementVectorSize(); unsigned int size = this->GetInput()->Get()->GetMeasurementVectorSize();
if(size == 0) if(size == 0)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment