// Includes, project. #include "VislabComponent.hpp" #include "VislabCamera.hpp" // Includes, pacpus. #include #include #include #include #include //#include <20150310_lib3dv-1.2.0/src/display.h> // Includes, qt. #include #include // Includes, standard. #include #include #include #include #include using namespace pacpus; // Declare the logger and register the new component. //DECLARE_STATIC_LOGGER("pacpus.component.vislabCamera") //REGISTER_COMPONENT(VislabComponent, "Camera"); ComponentFactory sFactory("VislabComponent"); VislabComponent::VislabComponent(QString const& name) :ComponentBase(name), camera(name) { } VislabComponent::~VislabComponent() { } void VislabComponent::stopActivity() { camera.close(); } void VislabComponent::startActivity() { camera.open(); try { camera.setVideoOutput(getTypedOutput("image")); camera.setDispariteOutput(getTypedOutput("disparity")); } catch (std::exception const& e) { LOG_ERROR(e.what()); } } ComponentBase::COMPONENT_CONFIGURATION VislabComponent::configureComponent(XmlComponentConfig config) { return ComponentBase::CONFIGURED_OK; } void VislabComponent::addOutputs() { addOutput("image"); addOutput("disparity"); }