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_COOCCURRENCE_IMAGE_FILTER_H_ 00025 #define _SO_COOCCURRENCE_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/SoSFInt32.h> 00032 #include <ImageViz/Fields/SoSFImageDataAdapter.h> 00033 #include <ImageViz/Engines/SoImageVizEngineAnalysisOutput.h> 00034 00035 00120 class SoCooccurrenceQuantification2d : public SoImageVizEngine 00121 { 00122 00123 SO_IMAGEVIZ_ENGINE_HEADER(SoCooccurrenceQuantification2d); 00124 00125 public: 00127 SoCooccurrenceQuantification2d(); 00128 00132 class SbCoocurrrenceDetail 00133 { 00134 public: 00135 00136 SbCoocurrrenceDetail(SoImageAnalysisResult* analysis, int sequenceIndex=0); 00137 00139 inline unsigned long getPixelNumber() const 00140 { return m_pixelNumber; } 00141 00143 inline float getASM() const 00144 { return m_ASM; } 00145 00147 inline float getContrast() const 00148 { return m_contrast; } 00149 00151 inline float getCorrelation() const 00152 { return m_correlation; } 00153 00155 inline float getSSV() const 00156 { return m_SSV; } 00157 00159 inline float getIDM() const 00160 { return m_IDM; } 00161 00163 inline float getSumAverage() const 00164 { return m_sumAverage; } 00165 00167 inline float getSumVariance() const 00168 { return m_sumVariance; } 00169 00171 inline float getSumEntropy() const 00172 { return m_sumEntropy; } 00173 00175 inline float getEntropy() const 00176 { return m_entropy; } 00177 00179 inline float getDifferenceVariance() const 00180 { return m_differenceVariance; } 00181 00183 inline float getDifferenceEntropy() const 00184 { return m_differenceEntropy; } 00185 00187 inline float getCorrelationInfo1() const 00188 { return m_correlationInfo1; } 00189 00191 inline float getCorrelationInfo2() const 00192 { return m_correlationInfo2; } 00193 00194 private: 00195 00196 SbCoocurrrenceDetail(){}; 00197 00198 unsigned long m_pixelNumber; 00199 float m_ASM; 00200 float m_contrast; 00201 float m_correlation; 00202 float m_SSV; 00203 float m_IDM; 00204 float m_sumAverage; 00205 float m_sumVariance; 00206 float m_sumEntropy; 00207 float m_entropy; 00208 float m_differenceVariance; 00209 float m_differenceEntropy; 00210 float m_correlationInfo1; 00211 float m_correlationInfo2; 00212 }; 00213 00215 SoSFImageDataAdapter inImage; 00216 00218 SoSFImageDataAdapter inMaskImage; 00219 00221 SoSFInt32 offsetX; 00222 00224 SoSFInt32 offsetY; 00225 00227 SoImageVizEngineAnalysisOutput<SbCoocurrrenceDetail> outResult; 00228 00229 00230 private: 00232 virtual ~SoCooccurrenceQuantification2d(); 00233 00234 }; 00235 00236 #endif