virtual void go() {
        release();
        param *p = param::instance();
        update_values(p);

        Iso_rectangle_2 bbox = get_bbox(p);
        std::string ndvi_file = p->get<boost::filesystem::path>("ndvi").string();
        std::string  dsm_file = p->get<boost::filesystem::path>("dsm" ).string();
        clip_bbox(bbox,ndvi_file);
        clip_bbox(bbox,dsm_file );

        gradient_functor gf(p->get<double>("sigmaD"));
        oriented_gradient_view grad_view(dsm_file,  bbox, gf);
        oriented_ndvi_view     ndvi_view(ndvi_file, bbox);

        m_confg_visitor->add_layer(ndvi_file);
        m_confg_visitor->add_layer(dsm_file);
        set_bbox(p,bbox);
        wxPoint p0(wxCoord(bbox.min().x()),wxCoord(bbox.min().y()));
        wxPoint p1(wxCoord(bbox.max().x()),wxCoord(bbox.max().y()));
        m_confg_visitor->set_bbox(wxRect(p0,p1));

        init_visitor        (p,*m_visitor);
        create_configuration(p,grad_view,ndvi_view,m_config);
        create_sampler      (p,m_sampler);
        create_schedule     (p,m_schedule);
        create_end_test     (p,m_end_test);

        m_thread = new boost::thread(
                simulated_annealing::optimize<configuration,sampler,schedule,end_test,visitor>,
                boost::ref(*m_config), boost::ref(*m_sampler),
                boost::ref(*m_schedule), boost::ref(*m_end_test),
                boost::ref(*m_visitor) );
    }
Esempio n. 2
0
	surface_mobius::surface_mobius(double radius_, double half_width_) {
		radius = radius_;
		half_width = half_width_;

		double xy = radius + half_width;
		double z = half_width;

		set_bbox(point3D(-xy, -xy, -z), point3D(xy, xy, z));
	}