本文整理汇总了C++中ofx::DoubleParamDescriptor::setEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ DoubleParamDescriptor::setEnabled方法的具体用法?C++ DoubleParamDescriptor::setEnabled怎么用?C++ DoubleParamDescriptor::setEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofx::DoubleParamDescriptor
的用法示例。
在下文中一共展示了DoubleParamDescriptor::setEnabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: describeInContext
void LensCalibrationPluginFactory::describeInContext(OFX::ImageEffectDescriptor& desc, OFX::ContextEnum context)
{
//Input Clip
OFX::ClipDescriptor *srcClip = desc.defineClip(kOfxImageEffectSimpleSourceClipName);
srcClip->addSupportedComponent(OFX::ePixelComponentRGBA);
srcClip->setTemporalClipAccess(false);
srcClip->setSupportsTiles(false);
srcClip->setIsMask(false);
srcClip->setOptional(false);
//Output clip
OFX::ClipDescriptor *dstClip = desc.defineClip(kOfxImageEffectOutputClipName);
dstClip->addSupportedComponent(OFX::ePixelComponentRGBA);
dstClip->setSupportsTiles(false);
//Calibration Group
{
OFX::GroupParamDescriptor *groupCalibration = desc.defineGroupParam(kParamGroupCalibration);
groupCalibration->setLabel("Calibration");
groupCalibration->setAsTab();
{
OFX::Int2DParamDescriptor *param = desc.defineInt2DParam(kParamImageSize);
param->setLabel("Image Size");
param->setHint("Input image size used to calibrate the optics. Obviously, all images should have the same size.");
param->setDefault(0, 0);
param->setDisplayRange(0, 0, 10000, 10000);
param->setAnimates(false);
param->setParent(*groupCalibration);
param->setEnabled(false); // should not be edited by the user
}
{
OFX::BooleanParamDescriptor *param = desc.defineBooleanParam(kParamInputImageIsGray);
param->setLabel("Input image is gray");
param->setHint("Input image is gray");
param->setParent(*groupCalibration);
}
{
OFX::ChoiceParamDescriptor *param = desc.defineChoiceParam(kParamPatternType);
param->setLabel("Pattern Type");
param->setHint("Type of pattern to detect");
param->appendOptions(kStringParamPatternType);
param->setDefault(eParamPatternTypeChessboard);
param->setAnimates(false);
param->setParent(*groupCalibration);
}
{
OFX::Int2DParamDescriptor *param = desc.defineInt2DParam(kParamPatternSize);
param->setLabel("Pattern Size");
param->setHint("Number of inner corners per one of board dimension Width Height");
param->setDefault(10, 7);
param->setRange(2, 2, kOfxFlagInfiniteMax, kOfxFlagInfiniteMax);
param->setDisplayRange(2, 2, 15, 15);
param->setAnimates(false);
param->setParent(*groupCalibration);
}
{
OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamSquareSize);
param->setLabel("Square Size");
param->setHint("Define the size of the grid's square cells (mm)");
param->setDisplayRange(0, 100);
param->setDefault(1);
param->setAnimates(false);
param->setParent(*groupCalibration);
param->setLayoutHint(OFX::eLayoutHintDivider);
}
{
OFX::IntParamDescriptor *param = desc.defineIntParam(kParamNbRadialCoef);
param->setLabel("Nb Radial Coef");
param->setHint("Number of radial coefficient.");
param->setRange(0, 6);
param->setDisplayRange(0, 6);
param->setDefault(3);
param->setAnimates(false);
param->setParent(*groupCalibration);
}
{
OFX::IntParamDescriptor *param = desc.defineIntParam(kParamMaxFrames);
param->setLabel("Max Frames");
param->setHint("Maximal number of frames to extract from the video file.");
param->setRange(0, kOfxFlagInfiniteMax);
param->setDisplayRange(0, 1000);
param->setDefault(0);
param->setAnimates(false);
param->setParent(*groupCalibration);
}
{
OFX::IntParamDescriptor *param = desc.defineIntParam(kParamMaxCalibFrames);
param->setLabel("Max Calibration Frames");
param->setHint("Maximal number of frames to use to calibrate from the selected frames.");
param->setRange(0, kOfxFlagInfiniteMax);
param->setDisplayRange(0, 1000);
param->setDefault(100);
//.........这里部分代码省略.........