Commit f98376eb authored by Emmanuel Promayon's avatar Emmanuel Promayon

NEW nogui is now a normal/classic CamiTK Application (with no MainWindow)

parent 0abe92e9
......@@ -35,14 +35,16 @@
using namespace camitk;
int main(int argc, char* argv[]) {
// Example of a program that
// Example of a non-gui program that
// - open a MHA image file
// - resample it to half its size using the "Resample" action
// - save the resampled image in the current working directory
//
// note: it still requires a graphics renderer even if nothing is displayed
// even if no event loop are started.
//
Log::getLogger()->setLogLevel(InterfaceLogger::INFO);
QApplication app(argc, argv);
ExtensionManager::autoload();
Application app("nogui", argc, argv);
// open an image volume
ComponentExtension* cp = ExtensionManager::getComponentExtension("mha");
......@@ -56,7 +58,10 @@ int main(int argc, char* argv[]) {
// set the input
resampleAction->setInputComponent(image);
//app.getMainWindow()->setCentralWidget(resampleAction->getWidget());
//app.exec();
// set the parameter
ImageComponent* inputImage = dynamic_cast<ImageComponent*>(image);
// Note: as the Resample action takes ImageComponent as inputs, the dynamic_cast is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment