|
From: Gustavo P. B. <gb...@us...> - 2005-06-23 03:18:59
|
Update of /cvsroot/kimageprocess/kimageprocess/src/plugins/snns In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17877/src/plugins/snns Modified Files: snns.cpp Log Message: All managers classes now use self() (global instance), which is much better than being passing pointers all around Index: snns.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/plugins/snns/snns.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- snns.cpp 19 Jun 2005 02:03:55 -0000 1.4 +++ snns.cpp 23 Jun 2005 03:18:49 -0000 1.5 @@ -70,8 +70,8 @@ m_tempFile = new KTempFile(); m_tempFile->setAutoDelete(false); - m_input = imageManager()->activeFeaturesCount(); - m_output = imageManager()->sampleCount(); + m_input = KTImageManager::self()->activeFeaturesCount(); + m_output = KTImageManager::self()->sampleCount(); if (tmpHeaderFile.file()->isOpen() && m_tempFile->file()->isOpen()) { @@ -86,7 +86,7 @@ m_contents += "No. of output units : " + QString::number( m_output ); m_contents += "\n\n"; - QStringList names = imageManager()->activeFeatureNames(); + QStringList names = KTImageManager::self()->activeFeatureNames(); QString features; for ( QStringList::Iterator it = names.begin(); it != names.end(); ++it ) { @@ -100,7 +100,7 @@ m_patterns.clear(); m_max.resize(m_input, 0); m_min.resize(m_input, 0); - imageManager()->generatePatternFile(0, this); + KTImageManager::self()->calculateSampleData(0, this); QValueList<pattern>::iterator end = m_patterns.end(); @@ -165,8 +165,8 @@ if (!dest.isEmpty()) { - m_input = imageManager()->activeFeaturesCount(); - m_output = imageManager()->sampleCount(); + m_input = KTImageManager::self()->activeFeaturesCount(); + m_output = KTImageManager::self()->sampleCount(); m_sampleImage = dest; m_patternCount = 0; @@ -183,12 +183,12 @@ m_contents += "generated at " + QDateTime::currentDateTime().toString(); m_contents += "\n\n\n"; m_contents += "No. of patterns : %1\n"; - m_contents += "No. of input units : " + QString::number( imageManager()->activeFeaturesCount() ); + m_contents += "No. of input units : " + QString::number( KTImageManager::self()->activeFeaturesCount() ); m_contents += "\n"; m_contents += "No. of output units : 0\n"; m_contents += "\n\n"; - QStringList names = imageManager()->activeFeatureNames(); + QStringList names = KTImageManager::self()->activeFeatureNames(); QString features; for ( QStringList::Iterator it = names.begin(); it != names.end(); ++it ) { @@ -202,7 +202,7 @@ m_max.resize(m_input, 0); m_min.resize(m_input, 0); m_first = true; - imageManager()->generateTestPatFile(0, this); + KTImageManager::self()->calculateTestData(0, this); float dif[m_input]; for (int i=0; i < m_input; ++i) |