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-2019 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : ImageViz-Generator (Sep 2013) 00022 ** Modified by : ImageViz-Generator 00023 **=======================================================================*/ 00024 #ifndef _SO_STATISTICS_IMAGE_FILTER_H_ 00025 #define _SO_STATISTICS_IMAGE_FILTER_H_ 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 <Inventor/fields/SoSFEnum.h> 00032 #include <Inventor/fields/SoSFVec2i32.h> 00033 #include <ImageViz/Fields/SoSFImageDataAdapter.h> 00034 #include <ImageViz/Engines/SoImageVizEngineAnalysisOutput.h> 00035 00036 00083 class SoIntensityStatisticsQuantification : public SoImageVizEngine 00084 { 00085 00086 SO_IMAGEVIZ_ENGINE_HEADER(SoIntensityStatisticsQuantification); 00087 00088 public: 00090 SoIntensityStatisticsQuantification(); 00091 00095 SoSFEnum computeMode; 00096 00100 class SbStatisticsDetail 00101 { 00102 public: 00103 00104 SbStatisticsDetail(SoImageAnalysisResult* analysis, int sequenceIndex=0); 00105 00107 inline unsigned long getPixelNumber() const 00108 { return m_pixelNumber; } 00109 00111 inline float getMinimum() const 00112 { return m_minimum; } 00113 00115 inline float getMaximum() const 00116 { return m_maximum; } 00117 00119 inline float getIntensityRange() const 00120 { return m_intensityRange; } 00121 00123 inline float getMean() const 00124 { return m_mean; } 00125 00127 inline float getStandardDeviation() const 00128 { return m_standardDeviation; } 00129 00131 inline float getSkewness() const 00132 { return m_skewness; } 00133 00135 inline float getKurtosis() const 00136 { return m_kurtosis; } 00137 00138 private: 00139 00140 SbStatisticsDetail(){}; 00141 00142 unsigned long m_pixelNumber; 00143 float m_minimum; 00144 float m_maximum; 00145 float m_intensityRange; 00146 float m_mean; 00147 float m_standardDeviation; 00148 float m_skewness; 00149 float m_kurtosis; 00150 }; 00151 00153 SoSFImageDataAdapter inImage; 00154 00158 enum RangeMode{ 00164 MIN_MAX = 0, 00171 OTHER = 1 00172 }; 00173 00177 SoSFEnum rangeMode; 00178 00180 SoSFVec2i32 intensityRangeInput; 00181 00183 SoImageVizEngineAnalysisOutput<SbStatisticsDetail> outResult; 00184 00185 00186 private: 00188 virtual ~SoIntensityStatisticsQuantification(); 00189 00190 }; 00191 00192 #endif