00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : Delphine Duclap (Sep 2017) 00022 **=======================================================================*/ 00023 #ifndef _SO_SURFACE_FITTING_APPROXIMATION_3D_H 00024 #define _SO_SURFACE_FITTING_APPROXIMATION_3D_H 00025 00026 #include <ImageViz/SoImageViz.h> 00027 #include <ImageViz/Engines/SoSubImageVizEngine.h> 00028 #include <ImageViz/Engines/SoImageVizEngineOutput.h> 00029 #include <ImageViz/Engines/SoImageVizEngine.h> 00030 00031 #include <ImageViz/Fields/SoSFStructuredQuadrilateralMesh.h> 00032 00033 #include <Inventor/fields/SoMFVec3f.h> 00034 #include <Inventor/fields/SoSFVec2d.h> 00035 #include <Inventor/fields/SoSFDouble.h> 00036 #include <Inventor/fields/SoSFFloat.h> 00037 #include <Inventor/fields/SoMFFloat.h> 00038 #include <ImageViz/Fields/SoSFImageDataAdapter.h> 00039 00080 class SoSurfaceFittingApproximation3d : public SoImageVizEngine 00081 { 00082 00083 SO_IMAGEVIZ_ENGINE_HEADER( SoSurfaceFittingApproximation3d ); 00084 00085 public: 00087 SoSurfaceFittingApproximation3d(); 00088 00092 SoSFStructuredQuadrilateralMesh inSurface; 00093 00097 SoSFImageDataAdapter inFeatureImage; 00098 00103 SoSFDouble distance; 00104 00110 SoSFVec2d thresholdLevel; 00111 00120 SoSFFloat smoothing; 00121 00128 SoMFVec3f directions; 00129 00134 SoSFEnum detectionType; 00135 00136 enum DetectionType 00137 { 00141 MAXIMUM, 00145 MINIMUM 00146 }; 00147 00151 enum BoundaryCondition 00152 { 00153 /* 00154 * The displacement is fixed on the involved boundary. See the parameter dirichletValues. 00155 */ 00156 DIRICHLET, 00157 /* 00158 * The derivative of the displacement is null on the involved boundary. 00159 */ 00160 NEUMANN 00161 }; 00162 00166 SoSFEnum leftBoundaryCondition; 00167 00171 SoSFEnum rightBoundaryCondition; 00172 00176 SoSFEnum topBoundaryCondition; 00177 00181 SoSFEnum bottomBoundaryCondition; 00182 00186 enum RegularizationType 00187 { 00188 /* 00189 * The displacement is fixed on the involved boundary. See the parameter dirichletValues. 00190 */ 00191 LAPLACIAN, 00192 /* 00193 * The displacement is fixed on the involved boundary. See the parameter dirichletValues. 00194 */ 00195 LAPLACIAN_2 00196 }; 00197 00201 SoSFEnum regularizationType; 00202 00206 SoMFFloat dirichletValues; 00207 00211 SoImageVizEngineOutput <SoSFStructuredQuadrilateralMesh, SbStructuredQuadrilateralMesh*> outSurface; 00212 00216 SoImageVizEngineMFieldOutput< SoMFVec3f, const SbVec3f*> outDirections; 00217 00221 int getDirectionsSize(); 00222 00223 private: 00225 virtual ~SoSurfaceFittingApproximation3d(); 00226 00227 }; 00228 00229 #endif