00001 #include "OutputModule.h"
00002 #include "../framedata/IntegerFrameData.h"
00003 #include "../visualizer/OutputModuleGUI.h"
00004 #include <string>
00005 #include <sstream>
00006 #include <iostream>
00007
00008 OutputModule::OutputModule()
00009 {
00010 setGUI(new OutputModuleGUI(this));
00011 }
00012
00013 void OutputModule::processFrameData(IFrameData *data)
00014 {
00015 assertFramedataType(data, "int", "ClassificationModule::processFrameData");
00016 std::stringstream ss;
00017 ss << static_cast<IntegerFrameData*>(data)->getData();
00018
00019 std::string output("Gesture ID: ");
00020 output += ss.str();
00021 output += "\n";
00022 static_cast<OutputModuleGUI*>(getGUI())->updateText(output.c_str());
00023
00024
00025 delete data;
00026 }
00027