// Copyright (c) 2009 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // // $URL: https://github.com/CGAL/cgal/blob/v5.2/Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h $ // $Id: Labeled_image_mesh_domain_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Stephane Tayeb // //****************************************************************************** // File Description : // // //****************************************************************************** #ifndef CGAL_LABELED_IMAGE_MESH_DOMAIN_3_H #define CGAL_LABELED_IMAGE_MESH_DOMAIN_3_H #include #include #include #include #include #include #include namespace CGAL { /** * @class Labeled_image_mesh_domain_3 * * */ template class CGAL_DEPRECATED_MSG ( "The class template `CGAL::Labeled_image_mesh_domain_3` is now deprecated. " "Use the static member function template " "`Labeled_mesh_domain_3::create_labeled_image_mesh_domain` instead.") Labeled_image_mesh_domain_3 : public Labeled_mesh_domain_3 { public: typedef Image_word_type_ Image_word_type; typedef typename Default::Get >::type Wrapper; typedef typename Default::Get::type Null; typedef Labeled_mesh_domain_3 Base; typedef typename Base::Sphere_3 Sphere_3; typedef typename Base::FT FT; typedef BGT Geom_traits; typedef CGAL::Bbox_3 Bbox_3; typedef CGAL::Identity Identity; /// Constructor Labeled_image_mesh_domain_3(const Image& image, const FT& error_bound = FT(1e-3), Subdomain_index value_outside = 0, Null null = Null(), CGAL::Random* p_rng = nullptr) : Base(Wrapper(image, Identity(), value_outside), compute_bounding_box(image), error_bound, parameters::null_subdomain_index = null, parameters::p_rng = p_rng) {} Labeled_image_mesh_domain_3(const Image& image, const FT error_bound, CGAL::Random* p_rng) : Base(Wrapper(image), compute_bounding_box(image), error_bound, p_rng) {} /// Destructor virtual ~Labeled_image_mesh_domain_3() {} using Base::bbox; private: /// Returns a box enclosing image \c im Bbox_3 compute_bounding_box(const Image& im) const { return Bbox_3(-im.vx()+im.tx(), -im.vy()+im.ty(), -im.vz()+im.tz(), double(im.xdim()+1)*im.vx()+im.tx(), double(im.ydim()+1)*im.vy()+im.ty(), double(im.zdim()+1)*im.vz()+im.tz()); } }; // end class Labeled_image_mesh_domain_3 } // end namespace CGAL #include #endif // CGAL_LABELED_IMAGE_MESH_DOMAIN_3_H