[opengtl-commits] [536] use the "global" kernel with the changed parameters instead of recreating one |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 536
Author: cyrille
Date: 2008-12-10 00:08:53 +0100 (Wed, 10 Dec 2008)
Log Message:
-----------
use the "global" kernel with the changed parameters instead of recreating one
Modified Paths:
--------------
trunk/libQtGTL/examples/QtShiva/QtShiva.cpp
Modified: trunk/libQtGTL/examples/QtShiva/QtShiva.cpp
===================================================================
--- trunk/libQtGTL/examples/QtShiva/QtShiva.cpp 2008-12-09 23:08:24 UTC (rev 535)
+++ trunk/libQtGTL/examples/QtShiva/QtShiva.cpp 2008-12-09 23:08:53 UTC (rev 536)
@@ -91,10 +91,8 @@
void qShiva::apply()
{
GTLCore::PixelDescription pixel( GTLCore::Type::Float, 3 );
- OpenShiva::Kernel p( 4);
- p.setSource( m_mainWindow->ctlCodeEditor->toPlainText().toAscii().data());
- p.compile();
- if(p.isCompiled())
+ m_kernel->compile();
+ if(m_kernel->isCompiled())
{
std::list<GTLCore::AbstractImage*> inputImages;
for( int k = 0; k < m_mainWindow->listImages->count(); ++k)
@@ -111,7 +109,7 @@
inputImages.push_back( iImage );
}
QtGTL::QImageImage image( QImage( 1000, 1000, QImage::Format_RGB32) );
- p.evaluatePixeles( GTLCore::Region(0,0, 1000,1000), inputImages, &image );
+ m_kernel->evaluatePixeles( GTLCore::Region(0,0, 1000,1000), inputImages, &image );
currentImage = image.image();
for( std::list<GTLCore::AbstractImage*>::iterator it = inputImages.begin();
it != inputImages.end(); ++it)
@@ -120,7 +118,7 @@
}
refreshImageViewer();
} else {
- QMessageBox::critical(this, tr("qShiva"), tr("Compilation error: %1").arg( p.compilationErrorsMessage().c_str() ));
+ QMessageBox::critical(this, tr("qShiva"), tr("Compilation error: %1").arg( m_kernel->compilationErrorsMessage().c_str() ));
}
}