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-2017 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : FEI (oct 2014) 00022 **=======================================================================*/ 00023 #ifndef _SO_ITERATIVE_MORPHO_LUT_PROCESSING_3D_H_ 00024 #define _SO_ITERATIVE_MORPHO_LUT_PROCESSING_3D_H_ 00025 #include <ImageViz/SoImageViz.h> 00026 #include <ImageViz/Engines/SoSubImageVizEngine.h> 00027 #include <ImageViz/Engines/SoImageVizEngineOutput.h> 00028 #include <ImageViz/Engines/SoImageVizEngine.h> 00029 00030 #include <Inventor/fields/SoSFEnum.h> 00031 #include <Inventor/fields/SoSFInt32.h> 00032 #include <ImageViz/Fields/SoSFImageDataAdapter.h> 00033 #include <ImageViz/Fields/SoSFKernel3i32.h> 00034 00035 #include <ImageViz/Nodes/Luts/SoMorphoLut3D.h> 00036 00037 class SoIterativeMorphoLutProcessing3d : public SoEngine 00038 { 00039 SO_IMAGEVIZ_ENGINE_HEADER( SoIterativeMorphoLutProcessing2d ); 00040 00041 public: 00043 SoIterativeMorphoLutProcessing3d(); 00044 00046 SoSFImageDataAdapter inBinaryImage; 00047 00048 enum OperationMode 00049 { 00050 THINNING = 0, 00051 THICKENING = 1, 00052 HIT_OR_MISS = 2, 00053 }; 00054 00055 enum RotationMode 00056 { 00057 NO_ROTATION = 0, // 1 configuration 00058 ROTATE_FACES = 1, // 6 configurations 00059 ROTATE_EDGES = 2, // 18 configurations 00060 ROTATE_VERTICES = 3 // all configurations 00061 }; 00062 00066 SoSFEnum inOperationMode; 00067 00071 SoSFEnum inRotationMode; 00072 00073 SoSFKernel3i32 inKernel3D; 00077 SoSFInt32 inIterations; 00078 00080 SoImageVizEngineOutput<SoSFImageDataAdapter, SoImageDataAdapter*> outBinaryImage; 00081 00082 private: 00084 virtual ~SoIterativeMorphoLutProcessing3d(); 00085 00087 virtual void inputChanged( SoField* ); 00088 00090 virtual void evaluate(); 00091 00092 private: 00093 SoMorphoLut3D* buildInternalMorphoLut(); 00094 00096 bool m_inputsAreChanged; 00097 }; 00098 00099 #endif