本文整理汇总了C++中FilterParameterSet::getBool方法的典型用法代码示例。如果您正苦于以下问题:C++ FilterParameterSet::getBool方法的具体用法?C++ FilterParameterSet::getBool怎么用?C++ FilterParameterSet::getBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FilterParameterSet
的用法示例。
在下文中一共展示了FilterParameterSet::getBool方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setAlignmentParameters
void FilterFeatureAlignment::setAlignmentParameters(typename ALIGNER_TYPE::MeshType& mFix, typename ALIGNER_TYPE::MeshType& mMov, FilterParameterSet& par, typename ALIGNER_TYPE::Parameters& param)
{
typedef ALIGNER_TYPE AlignerType;
typedef typename AlignerType::MeshType MeshType;
if(par.hasParameter("samplingStrategy")) param.samplingStrategy = par.getEnum("samplingStrategy");
if(par.hasParameter("numMovFeatureSelected")) param.numMovFeatureSelected = math::Clamp(par.getInt("numMovFeatureSelected"),0,mMov.VertexNumber());
if(par.hasParameter("nBase")){ param.nBase = par.getInt("nBase"); if(param.nBase<4) param.nBase=4; }
if(par.hasParameter("k")){ param.k = par.getInt("k"); if(param.k<1) param.k=1; }
if(par.hasParameter("ransacIter")){ param.ransacIter = par.getInt("ransacIter"); if(param.ransacIter<0) param.ransacIter = 0;}
if(par.hasParameter("fullConsensusSamples")) param.fullConsensusSamples = math::Clamp(par.getInt("fullConsensusSamples"),1,mMov.VertexNumber());
if(par.hasParameter("overlap")) param.overlap = math::Clamp<float>(par.getFloat("overlap"),0.0f,100.0f);
if(par.hasParameter("consensusDist")) param.consensusDist = math::Clamp<float>(par.getFloat("consensusDist"),0.0f,100.0f);
if(par.hasParameter("pickPoints")) param.pickPoints = par.getBool("pickPoints");
if(par.hasParameter("normEq")) param.normalEqualization = par.getBool("normEq");
if(par.hasParameter("paint")) param.paint = par.getBool("paint");
}
示例2: saveDefaultBakeSettings
void PhotoTexturingWidget::saveDefaultBakeSettings(FilterParameterSet pset){
QSettings ptSettings;
ptSettings.setValue(PhotoTexturer::TEXTURE_SIZE_WIDTH,pset.getInt(PhotoTexturer::TEXTURE_SIZE_WIDTH));
ptSettings.setValue(PhotoTexturer::TEXTURE_SIZE_HEIGHT,pset.getInt(PhotoTexturer::TEXTURE_SIZE_HEIGHT));
ptSettings.setValue(PhotoTexturer::UNPROJECT_ENABLE_ANGLE,pset.getBool(PhotoTexturer::UNPROJECT_ENABLE_ANGLE));
ptSettings.setValue(PhotoTexturer::UNPROJECT_ANGLE_WEIGHT,pset.getInt(PhotoTexturer::UNPROJECT_ANGLE_WEIGHT));
ptSettings.setValue(PhotoTexturer::UNPROJECT_ANGLE,pset.getFloat(PhotoTexturer::UNPROJECT_ANGLE));
ptSettings.setValue(PhotoTexturer::UNPROJECT_ANGLE_SHARPNESS,pset.getInt(PhotoTexturer::UNPROJECT_ANGLE_SHARPNESS));
ptSettings.setValue(PhotoTexturer::UNPROJECT_ENABLE_DISTANCE,pset.getBool(PhotoTexturer::UNPROJECT_ENABLE_DISTANCE));
ptSettings.setValue(PhotoTexturer::UNPROJECT_DISTANCE_WEIGHT,pset.getInt(PhotoTexturer::UNPROJECT_DISTANCE_WEIGHT));
ptSettings.setValue(PhotoTexturer::BAKE_SAVE_UNPROJECT,pset.getBool(PhotoTexturer::BAKE_SAVE_UNPROJECT));
ptSettings.setValue(PhotoTexturer::UNPROJECT_ENABLE_EDGE_STRETCHING,pset.getBool(PhotoTexturer::UNPROJECT_ENABLE_EDGE_STRETCHING));
ptSettings.setValue(PhotoTexturer::UNPROJECT_EDGE_STRETCHING_PASS,pset.getInt(PhotoTexturer::UNPROJECT_EDGE_STRETCHING_PASS));
ptSettings.setValue(PhotoTexturer::BAKE_MERGE_TEXTURES,pset.getBool(PhotoTexturer::BAKE_MERGE_TEXTURES));
ptSettings.setValue(PhotoTexturer::BAKE_MERGE_TYPE,pset.getEnum(PhotoTexturer::BAKE_MERGE_TYPE));
ptSettings.setValue(PhotoTexturer::BAKE_SMARTBLEND,pset.getString(PhotoTexturer::BAKE_SMARTBLEND));
}
示例3: applyFilter
// Core Function doing the actual mesh processing.
bool RangeMapPlugin::applyFilter(QAction *filter, MeshDocument &m, FilterParameterSet & par, vcg::CallBackPos *cb)
{
CMeshO::FaceIterator fi;
switch(ID(filter))
{
case FP_SELECTBYANGLE :
{
bool usecam = par.getBool("usecamera");
Point3f viewpoint = par.getPoint3f("viewpoint");
// if usecamera but mesh does not have one
if( usecam && !m.mm()->hasDataMask(MeshModel::MM_CAMERA) )
{
errorMessage = "Mesh has not a camera that can be used to compute view direction. Please set a view direction."; // text
return false;
}
if(usecam)
{
viewpoint = m.mm()->cm.shot.GetViewPoint();
}
// angle threshold in radians
float limit = cos( math::ToRad(par.getDynamicFloat("anglelimit")) );
Point3f viewray;
for(fi=m.mm()->cm.face.begin();fi!=m.mm()->cm.face.end();++fi)
if(!(*fi).IsD())
{
viewray = viewpoint - Barycenter(*fi);
viewray.Normalize();
if((viewray.dot((*fi).N().Normalize())) < limit)
fi->SetS();
}
}
break;
}
return true;
}
示例4: applyFilter
//.........这里部分代码省略.........
case AF_RIGID_TRANSFORMATION :
{
switch(featureType)
{
case 0:{
typedef SmoothCurvatureFeature<MeshType, 6> FeatureType; //define needed typedef FeatureType
typedef FeatureAlignment<MeshType, FeatureType> AlignerType; //define the Aligner class
typedef AlignerType::Result ResultType;
AlignerType::Parameters alignerParam(mFix->cm, mMov->cm);
setAlignmentParameters<AlignerType>(mFix->cm, mMov->cm, par, alignerParam);
ResultType res = RigidTransformationOperation<AlignerType>(*mFix, *mMov, alignerParam, cb);
return logResult<AlignerType>(ID(filter), res, errorMessage);
}
case 1:{
typedef FeatureRGB<MeshType, 3> FeatureType; //define needed typedef FeatureType
typedef FeatureAlignment<MeshType, FeatureType> AlignerType; //define the Aligner class
typedef AlignerType::Result ResultType;
AlignerType::Parameters alignerParam(mFix->cm, mMov->cm);
setAlignmentParameters<AlignerType>(mFix->cm, mMov->cm, par, alignerParam);
ResultType res = RigidTransformationOperation<AlignerType>(*mFix, *mMov, alignerParam, cb);
return logResult<AlignerType>(ID(filter), res, errorMessage);
}
default: assert(0);
} //end switch(ftype)
assert(0);
} //end case AF_RIGID_TRANSFORMATION
case AF_CONSENSUS :
{
typedef OverlapEstimation<CMeshO> ConsensusType;
ConsensusType::Parameters consParam;
//set up params for consensus
consParam.samples = math::Clamp(par.getInt("fullConsensusSamples"),1,mMov->cm.VertexNumber());
consParam.consensusDist=math::Clamp<float>(par.getFloat("consensusDist"),0.0f,100.0f);
consParam.paint = par.getBool("paint");
consParam.normalEqualization = par.getBool("normEq");
consParam.threshold = 0.0f;
consParam.bestScore = 0;
float result = ConsensusOperation<ConsensusType>(*mFix, *mMov, consParam, cb);
if(result<0){
errorMessage = "Consensus Initialization fails.";
return false; }
Log("Consensus of %.2f%%", 100*result);
return true;
}
case AF_RANSAC:
{
switch(featureType){
case 0:{
typedef SmoothCurvatureFeature<MeshType, 6> FeatureType; //define needed typedef FeatureType
typedef FeatureAlignment<MeshType, FeatureType> AlignerType; //define the Aligner class
typedef AlignerType::Result ResultType;
AlignerType::Parameters alignerParam(mFix->cm, mMov->cm);
setAlignmentParameters<AlignerType>(mFix->cm, mMov->cm, par, alignerParam);
ResultType res = RansacOperation<AlignerType>(*mFix, *mMov, alignerParam, cb);
return logResult<AlignerType>(ID(filter), res, errorMessage);
}
case 1:{
typedef APSSCurvatureFeature<MeshType, 3> FeatureType; //define needed typedef FeatureType
typedef FeatureAlignment<MeshType, FeatureType> AlignerType; //define the Aligner class
typedef AlignerType::Result ResultType;
AlignerType::Parameters alignerParam(mFix->cm, mMov->cm);
setAlignmentParameters<AlignerType>(mFix->cm, mMov->cm, par, alignerParam);
ResultType res = RansacOperation<AlignerType>(*mFix, *mMov, alignerParam, cb);
return logResult<AlignerType>(ID(filter), res, errorMessage);
}