The example shows how to use the operation from the examples BWconversion_direct/BWconversion.hpp and BWconversion_direct/BWconversion.cpp
#include <GraphManager.hpp>
#include <IO/ImageIO.hpp>
#include "BWconversion_direct.hpp"
#include "rootops/RootLoadImage.hpp"
#include <iostream>
int main(int argc, const char* argv[]) {
if (argc != 3) {
std::cerr << "Usage:" << std::endl
<< "input output" << std::endl;
return 1;
}
GraphManager graph;
GraphNode* root = graph.insertOperation(&loaderOp);
GraphNode* op = graph.insertOperation(&description, root, NULL, NULL);
op->confirmOperation();
op->addROI(0, 0, op->getBuffer()->getWidth(), op->getBuffer()->getHeight(), 0);
graph.join();
std::cout << "Time elapsed: " << op->getElapsedTime() << std::endl;
IO::SaveInfo saveInfo(argv[2]);
op->saveBuffer(saveInfo);
return 0;
}