| 40 | } |
| 41 | |
| 42 | bool IPProcessScript::processInputData(IPLData* image , int, bool useOpenCV) |
| 43 | { |
| 44 | // delete previous result |
| 45 | /*delete _result; |
| 46 | _result = NULL; |
| 47 | |
| 48 | int width = image->width(); |
| 49 | int height = image->height(); |
| 50 | |
| 51 | QString script("int result = 0; for(int i=0; i < array.length; i++) { array[i] = i } return result;"); |
| 52 | |
| 53 | //QScriptValue image = qScriptValueFromSequence(); |
| 54 | //_scriptEngine->globalObject().setProperty("image", image); |
| 55 | |
| 56 | QScriptValue result = _scriptEngine->evaluate(script, "TestScript"); |
| 57 | |
| 58 | qDebug() << "Result: " << result.toInteger(); |
| 59 | |
| 60 | //for(int i=0; i<array.) |
| 61 | |
| 62 | /*int progress = 0; |
| 63 | int maxProgress = image->height(); |
| 64 | |
| 65 | for(int y=0; y<height; y++) |
| 66 | { |
| 67 | // progress |
| 68 | notifyProgressEventHandler(100*progress++/maxProgress); |
| 69 | |
| 70 | for(int x=0; x<width; x++) |
| 71 | { |
| 72 | newplane->p(x,y) = plane->p(x,y); |
| 73 | } |
| 74 | } */ |
| 75 | |
| 76 | return false; |
| 77 | } |
| 78 | |
| 79 | IPLImage* IPProcessScript::getResultData( int ) |
| 80 | { |