void Controller::displayDensityCurves(int x, int y) { SteerableViewMap * svm = _Canvas->getSteerableViewMap(); if (!svm) return; unsigned int i, j; typedef vector<Vec3r> densityCurve; vector<densityCurve> curves(svm->getNumberOfOrientations() + 1); vector<densityCurve> curvesDirection(svm->getNumberOfPyramidLevels()); // collect the curves values unsigned nbCurves = svm->getNumberOfOrientations() + 1; unsigned nbPoints = svm->getNumberOfPyramidLevels(); if (!nbPoints) return; // build the density/nbLevels curves for each orientation for (i = 0; i < nbCurves; ++i) { for (j = 0; j < nbPoints; ++j) { curves[i].push_back(Vec3r(j, svm->readSteerableViewMapPixel(i, j, x, y), 0)); } } // build the density/nbOrientations curves for each level for (i = 0; i < nbPoints; ++i) { for (j = 0; j < nbCurves; ++j) { curvesDirection[i].push_back(Vec3r(j, svm->readSteerableViewMapPixel(j, i, x, y), 0)); } } // display the curves #if 0 for (i = 0; i < nbCurves; ++i) _pDensityCurvesWindow->setOrientationCurve(i, Vec2d(0, 0), Vec2d(nbPoints, 1), curves[i], "scale", "density"); for (i = 1; i <= 8; ++i) _pDensityCurvesWindow->setLevelCurve(i, Vec2d(0, 0), Vec2d(nbCurves, 1), curvesDirection[i], "orientation", "density"); _pDensityCurvesWindow->show(); #endif }
float ReadSteerableViewMapPixelF0D::operator()(Interface0DIterator& iter) { SteerableViewMap *svm = Canvas::getInstance()->getSteerableViewMap(); float v = svm->readSteerableViewMapPixel(_orientation, _level,(int)iter->getProjectedX(), (int)iter->getProjectedY()); return v; }
float ReadDirectionalViewMapPixelCF(int iOrientation, int level, unsigned x, unsigned y) { SteerableViewMap *svm = Canvas::getInstance()->getSteerableViewMap(); return svm->readSteerableViewMapPixel(iOrientation, level, x, y); }