DirectionFilter::DirectionFilter(){ // This is where you set up the filter. Any variables that need to be allocated should be done here. // Load title and description title = "Orientation"; desc = loadDesc("orientation"); color.set(255, 0, 0); colorImage.allocate(vWidth, vHeight); grayImage.allocate(vWidth, vHeight); displayGray.allocate(vWidth, vHeight, OF_IMAGE_GRAYSCALE); };
void Layout::loadLayout(QString path) { // Check if we have already a opened file if(fin.isOpen()) fin.close(); // Open the given layout file fin.setFileName(path); fin.open(QIODevice::ReadOnly); QByteArray data = fin.readAll(); // Load Layout(Json) file QJsonDocument json(QJsonDocument::fromJson(data)); lf = json.object(); // Load it's Description loadDesc(); // Set typing method setMethod(); // Send changed layout to typing method mth->setLayout(sendLayout()); }
TextureFilter::TextureFilter(){ // This is where you set up the filter. Any variables that need to be allocated should be done here. // Load title and description title = "Texture"; desc = loadDesc("texture"); color.set(255, 206, 13); grayscale.allocate(vWidth, vHeight); blur.allocate(vWidth, vHeight); blur.setRadius(10); blur.setPasses(20); normals.allocate(vWidth, vHeight); disp.allocate(vWidth, vHeight); bDrawVideo = false; bDrawField = false; bDrawNormals = true; bCapture = true; };