|
From: Gustavo P. B. <gb...@us...> - 2005-06-23 23:20:38
|
Update of /cvsroot/kimageprocess/kimageprocess/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32338/src Modified Files: kimageprocess.cpp kttextureoptions.cpp Log Message: All calculation (features extraction, normalization, etc) are now done in KTCalculation which provides us a better way to add new classifiers Index: kttextureoptions.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/kttextureoptions.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- kttextureoptions.cpp 23 Jun 2005 18:33:49 -0000 1.5 +++ kttextureoptions.cpp 23 Jun 2005 23:19:40 -0000 1.6 @@ -32,7 +32,7 @@ #include <klocale.h> #include <kdebug.h> -#include <ktpatternmanager.h> +#include <ktcalculation.h> #include <ktimage.h> #include <ktmethodmanager.h> #include <ktmethod.h> @@ -63,7 +63,7 @@ { window_size temp; - switch (KTImageManager::self()->windowType()) + switch (KTCalculation::self()->windowType()) { case WIN_SEQ: m_ui->rbnSequential->setChecked(true); @@ -77,7 +77,7 @@ m_ui->rbnSlideIterations->setChecked(true); break; } - temp = KTImageManager::self()->windowSize(); + temp = KTCalculation::self()->windowSize(); if (temp.type) m_ui->rbnCustom->setChecked(true); else @@ -90,14 +90,14 @@ } m_ui->spbX->setValue(temp.width); m_ui->spbY->setValue(temp.height); - if (KTImageManager::self()->numberIterations() == 0) + if (KTCalculation::self()->numberIterations() == 0) { m_ui->rbnSlideAll->setChecked(true); m_ui->spbIterations->setDisabled(true); } else m_ui->rbnSlideIterations->setChecked(true); - m_ui->spbIterations->setValue(KTImageManager::self()->numberIterations()); + m_ui->spbIterations->setValue(KTCalculation::self()->numberIterations()); //List methods and set the active one as selected MethodList methods = KTMethodManager::self()->methods(); @@ -115,17 +115,17 @@ void KTTextureOptions::save() { if (m_ui->rbnSequential->isChecked()) - KTImageManager::self()->setWindowType(WIN_SEQ); + KTCalculation::self()->setWindowType(WIN_SEQ); if (m_ui->rbnCascaded->isChecked()) - KTImageManager::self()->setWindowType(WIN_CASC); + KTCalculation::self()->setWindowType(WIN_CASC); if (m_ui->rbnRandom->isChecked()) - KTImageManager::self()->setWindowType(WIN_RAND); + KTCalculation::self()->setWindowType(WIN_RAND); - KTImageManager::self()->setWindowSize(m_ui->rbnCustom->isChecked(), m_ui->spbY->value(), m_ui->spbX->value()); + KTCalculation::self()->setWindowSize(m_ui->rbnCustom->isChecked(), m_ui->spbY->value(), m_ui->spbX->value()); if (m_ui->rbnSlideAll->isChecked()) - KTImageManager::self()->setNumberIterations(0); + KTCalculation::self()->setNumberIterations(0); else - KTImageManager::self()->setNumberIterations(m_ui->spbIterations->value()); + KTCalculation::self()->setNumberIterations(m_ui->spbIterations->value()); QString method = m_ui->cmbMethod->currentText(); KTMethodManager::self()->setActiveMethod(method.remove(QRegExp(" - .*"))); Index: kimageprocess.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/kimageprocess.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- kimageprocess.cpp 23 Jun 2005 19:39:00 -0000 1.23 +++ kimageprocess.cpp 23 Jun 2005 23:19:39 -0000 1.24 @@ -32,6 +32,7 @@ #include "ktlistview.h" #include "ktprogressbar.h" #include "ktcalculation.h" +#include "ktimage.h" #include <qdragobject.h> #include <qlayout.h> @@ -439,7 +440,7 @@ void KImageProcess::projectCalculateTestData() { - m_progressBar->startAction(5, i18n("Calculating testing data...")); + m_progressBar->startAction(KTImageManager::self()->testingImage()->height(), i18n("Calculating testing data...")); m_progressBar->show(); QTimer::singleShot(0, KTCalculation::self(), SLOT(calculateTestData())); |