Commit 6cbc48a8 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: use the unique instance of the random generator

parent e010343b
......@@ -233,7 +233,7 @@ void VCAImageFilter<TImage>::GenerateData()
vnl_matrix<PrecisionType> A(m_NumberOfEndmembers, m_NumberOfEndmembers);
A.fill(0);
A(m_NumberOfEndmembers - 1, 0) = 1;
typename RandomVariateGeneratorType::Pointer randomGen = RandomVariateGeneratorType::New();
typename RandomVariateGeneratorType::Pointer randomGen = RandomVariateGeneratorType::GetInstance();
for (unsigned int i = 0; i < m_NumberOfEndmembers; ++i)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment