#pragma once#include"itkParticleSystem.h"#include"ParticleImageDomainWithGradients.h"#include"ParticleImageDomainWithCurvature.h"#include<algorithm>namespaceitk{template<classTGradientNumericType,unsignedintVDimension>classParticleGoodBadAssessment:publicObject{public:typedefParticleGoodBadAssessmentSelf;typedefSmartPointer<Self>Pointer;typedefSmartPointer<constSelf>ConstPointer;typedefWeakPointer<constSelf>ConstWeakPointer;typedefParticleSystemParticleSystemType;typedeftypenameParticleSystemType::PointTypePointType;typedefshapeworks::ParticleImageDomainWithGradients<TGradientNumericType>DomainType;typedeftypenameDomainType::VnlVectorTypeNormalType;typedefParticleMeanCurvatureAttribute<TGradientNumericType,VDimension>MeanCurvatureCacheType;itkNewMacro(Self)voidSetDomainsPerShape(inti){m_DomainsPerShape=i;}intGetDomainsPerShape()const{returnm_DomainsPerShape;}voidSetEpsilon(doublei){epsilon=i;}voidSetCriterionAngle(doublea){m_CriterionAngle=a;}voidSetPerformAssessment(boolb){m_PerformAssessment=b;}std::vector<std::vector<int>>RunAssessment(constParticleSystemType*m_ParticleSystem,MeanCurvatureCacheType*m_MeanCurvatureCache);vnl_matrix<double>computeParticlesNormals(intd,constParticleSystemType*m_ParticleSystem);structIdxCompare{conststd::vector<double>⌖IdxCompare(conststd::vector<double>&target):target(target){}booloperator()(inta,intb)const{returntarget[a]<target[b];}};std::vector<int>sortIdcs(std::vector<double>v){std::vector<int>index(v.size(),0);for(inti=0;i<v.size();i++)index[i]=i;std::sort(index.begin(),index.end(),IdxCompare(v));returnindex;}protected:ParticleGoodBadAssessment():m_DomainsPerShape(1),m_CriterionAngle(90.0),m_PerformAssessment(true){}virtual~ParticleGoodBadAssessment(){}private:ParticleGoodBadAssessment(constSelf&);//purposely not implementedvoidoperator=(constSelf&);//purposely not implementedintm_DomainsPerShape;doublem_CriterionAngle;boolm_PerformAssessment;doubleepsilon;// m_Spacing from ShapeWorksRunApp};}//end namespace#include"itkParticleGoodBadAssessment.txx"