本文整理汇总了C++中ofx::ImageEffectDescriptor类的典型用法代码示例。如果您正苦于以下问题:C++ ImageEffectDescriptor类的具体用法?C++ ImageEffectDescriptor怎么用?C++ ImageEffectDescriptor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ImageEffectDescriptor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: describeInContext
void NoiseExamplePluginFactory::describeInContext(OFX::ImageEffectDescriptor &desc, ContextEnum context)
{
ClipDescriptor *dstClip = desc.defineClip("Output");
dstClip->addSupportedComponent(ePixelComponentRGBA);
dstClip->addSupportedComponent(ePixelComponentAlpha);
dstClip->setSupportsTiles(true);
dstClip->setFieldExtraction(eFieldExtractSingle);
DoubleParamDescriptor *param = desc.defineDoubleParam("Noise");
param->setLabels("noise", "noise", "noise");
param->setScriptName("noise");
param->setHint("How much noise to make.");
param->setDefault(0.2);
param->setRange(0, 10);
param->setIncrement(0.1);
param->setDisplayRange(0, 1);
param->setAnimates(true); // can animate
param->setDoubleType(eDoubleTypeScale);
PageParamDescriptor *page = desc.definePageParam("Controls");
page->addChild(*param);
}
示例2: describeReaderParamsInContext
/**
* @brief Function called to describe the plugin controls and features.
* @param[in, out] desc Effect descriptor
* @param[in] context Application context
*/
void Jpeg2000ReaderPluginFactory::describeInContext( OFX::ImageEffectDescriptor &desc,
OFX::EContext context )
{
OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
dstClip->addSupportedComponent( OFX::ePixelComponentRGB );
dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
dstClip->setSupportsTiles( kSupportTiles );
describeReaderParamsInContext( desc, context );
}
示例3: describe
/**
* @brief Function called to describe the plugin main features.
* @param[in, out] desc Effect descriptor
*/
void TextPluginFactory::describe( OFX::ImageEffectDescriptor& desc )
{
desc.setLabels( "TuttleText", "Text",
"Text" );
desc.setPluginGrouping( "tuttle/image/generator" );
// add the supported contexts
desc.addSupportedContext( OFX::eContextFilter );
desc.addSupportedContext( OFX::eContextGeneral );
// add supported pixel depths
desc.addSupportedBitDepth( OFX::eBitDepthUByte );
desc.addSupportedBitDepth( OFX::eBitDepthUShort );
desc.addSupportedBitDepth( OFX::eBitDepthFloat );
// plugin flags
desc.setRenderThreadSafety( OFX::eRenderFullySafe );
desc.setSupportsTiles( kSupportTiles );
desc.setSupportsMultiResolution( false );
}
示例4: describe
/**
* @brief Function called to describe the plugin main features.
* @param[in, out] desc Effect descriptor
*/
void TimeShiftPluginFactory::describe( OFX::ImageEffectDescriptor& desc )
{
desc.setLabels( "TuttleTimeShift", "TimeShift",
"TimeShift" );
desc.setPluginGrouping( "tuttle/image/process/time" );
// add the supported contexts
desc.addSupportedContext( OFX::eContextFilter );
desc.addSupportedContext( OFX::eContextGeneral );
// add supported pixel depths
desc.addSupportedBitDepth( OFX::eBitDepthUByte );
desc.addSupportedBitDepth( OFX::eBitDepthUShort );
desc.addSupportedBitDepth( OFX::eBitDepthFloat );
// plugin flags
desc.setTemporalClipAccess( true );
desc.setSupportsTiles( true );
desc.setRenderThreadSafety( OFX::eRenderFullySafe );
}
示例5: describe
/**
* @brief Function called to describe the plugin main features.
* @param[in, out] desc Effect descriptor
*/
void ViewerPluginFactory::describe( OFX::ImageEffectDescriptor& desc )
{
desc.setLabels( "TuttleViewer", "Viewer", "Viewer" );
desc.setPluginGrouping( "tuttle/image/io" );
desc.setDescription( kViewerHelp );
// add the supported contexts, only filter at the moment
desc.addSupportedContext( OFX::eContextFilter );
desc.addSupportedContext( OFX::eContextGeneral );
// add supported pixel depths
desc.addSupportedBitDepth( OFX::eBitDepthUByte );
desc.addSupportedBitDepth( OFX::eBitDepthUShort );
desc.addSupportedBitDepth( OFX::eBitDepthFloat );
// plugin flags
desc.setSupportsTiles( kSupportTiles );
desc.setRenderThreadSafety( OFX::eRenderFullySafe );
}
示例6: describeInContext
/**
* @brief Function called to describe the plugin controls and features.
* @param[in, out] desc Effect descriptor
* @param[in] context Application context
*/
void ConvolutionPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
OFX::EContext context )
{
OFX::ClipDescriptor* srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName );
srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );
srcClip->addSupportedComponent( OFX::ePixelComponentRGB );
srcClip->addSupportedComponent( OFX::ePixelComponentAlpha );
srcClip->setSupportsTiles( kSupportTiles );
// Create the mandated output clip
OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
dstClip->addSupportedComponent( OFX::ePixelComponentRGB );
dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
dstClip->setSupportsTiles( kSupportTiles );
OFX::Int2DParamDescriptor* size = desc.defineInt2DParam( kParamSize );
size->setLabel( "Size" );
size->setDefault( 3, 3 );
// size->setIncrement( 2, 2 );
size->setRange( 3, 3, kParamSizeMax, kParamSizeMax );
OFX::ChoiceParamDescriptor* border = desc.defineChoiceParam( kParamBorder );
border->setLabel( "Border" );
border->appendOption( kParamBorderMirror );
border->appendOption( kParamBorderConstant );
border->appendOption( kParamBorderBlack );
border->appendOption( kParamBorderPadded );
for( unsigned int y = 0; y < kParamSizeMax; ++y )
{
for( unsigned int x = 0; x < kParamSizeMax; ++x )
{
const std::string name( getCoefName( y, x ) );
OFX::DoubleParamDescriptor* coef = desc.defineDoubleParam( name );
coef->setLabel( name );
coef->setDisplayRange( -10.0, 10.0 );
coef->setDefault( 0.0 );
}
}
}
示例7: describe
/**
* @brief Function called to describe the plugin main features.
* @param[in, out] desc Effect descriptor
*/
void ColorTransferPluginFactory::describe( OFX::ImageEffectDescriptor& desc )
{
desc.setLabels(
"TuttleColorTransfer",
"ColorTransfer",
"ColorTransfer" );
desc.setPluginGrouping( "tuttle/image/process/color" );
desc.setDescription(
"ColorTransfer\n"
"\n"
"The standard usage of this node is to impose one image's color characteristics to another.\n"
"If srcRef input clip is not the same as the source clip, "
"it applies the tranformation from srcRef to dstRef on the source clip.\n"
"\n"
"Warning: pixel values <= 0.0001 will be clamp, because these values "
"are undefined in the colorspace used for the transformation.\n"
"\n"
"Technically, the node modify the statistics of the image in a particular colorspace lambda-alpha-beta.\n"
"This colorspace, created by Rederman and al., is closed to the human perception and minimizes "
"the correlation between channels for many natural scenes.\n"
"However, a choice parameter allows the user to choose in which colorspace the color transfer should be processed: "
"LMS, lambda-alpha-beta or original/source colorspace. \n"
"According to the chosen colorspace, result varies (more or less colorfull, or dense...).\n\n"
"For more details see the article:\n"
"'Color Transfert between images' by Erik Reinhard, Michael Ashikhmin, Bruce Gooch and Peter Shirley. University of Utah.\n"
);
// add the supported contexts, only filter at the moment
desc.addSupportedContext( OFX::eContextFilter );
desc.addSupportedContext( OFX::eContextGeneral );
// add supported pixel depths
desc.addSupportedBitDepth( OFX::eBitDepthUByte );
desc.addSupportedBitDepth( OFX::eBitDepthUShort );
desc.addSupportedBitDepth( OFX::eBitDepthFloat );
// plugin flags
desc.setSupportsTiles( true );
desc.setRenderThreadSafety( OFX::eRenderInstanceSafe );
}
示例8:
/**
* @brief Function called to describe the plugin controls and features.
* @param[in, out] desc Effect descriptor
* @param[in] context Application context
*/
void Move2DPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
OFX::EContext context )
{
OFX::ClipDescriptor* srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName );
srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );
srcClip->addSupportedComponent( OFX::ePixelComponentRGB );
srcClip->addSupportedComponent( OFX::ePixelComponentAlpha );
srcClip->setSupportsTiles( kSupportTiles );
// Create the mandated output clip
OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
dstClip->addSupportedComponent( OFX::ePixelComponentRGB );
dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
dstClip->setSupportsTiles( kSupportTiles );
OFX::Double2DParamDescriptor* translation = desc.defineDouble2DParam( kParamTranslation );
translation->setLabel( "Translation" );
translation->setDefault( 0, 0 );
}
示例9: describe
/**
* @brief Function called to describe the plugin main features.
* @param[in, out] desc Effect descriptor
*/
void ImageStatisticsPluginFactory::describe( OFX::ImageEffectDescriptor& desc )
{
desc.setLabels( "TuttleImageStatistics", "ImageStatistics",
"Image statistics" );
desc.setPluginGrouping( "tuttle/param/analysis" );
// add the supported contexts
desc.addSupportedContext( OFX::eContextGeneral );
desc.addSupportedContext( OFX::eContextFilter );
// add supported pixel depths
desc.addSupportedBitDepth( OFX::eBitDepthUByte );
desc.addSupportedBitDepth( OFX::eBitDepthUShort );
desc.addSupportedBitDepth( OFX::eBitDepthFloat );
// plugin flags
desc.setSupportsMultiResolution( false );
desc.setSupportsTiles( kSupportTiles );
desc.setOverlayInteractDescriptor( new OFX::DefaultEffectOverlayWrap<ImageStatisticsEffectOverlayDescriptor>() );
}
示例10: describe
/**
* @brief Function called to describe the plugin main features.
* @param[in, out] desc Effect descriptor
*/
void CropPluginFactory::describe( OFX::ImageEffectDescriptor& desc )
{
desc.setLabels( "TuttleCrop", "Crop",
"Image crop" );
desc.setPluginGrouping( "tuttle/image/process/geometry" );
// add the supported contexts
desc.addSupportedContext( OFX::eContextFilter );
desc.addSupportedContext( OFX::eContextGeneral );
// add supported pixel depths
desc.addSupportedBitDepth( OFX::eBitDepthUByte );
desc.addSupportedBitDepth( OFX::eBitDepthUShort );
desc.addSupportedBitDepth( OFX::eBitDepthFloat );
// plugin flags
desc.setSupportsTiles( kSupportTiles );
desc.setRenderThreadSafety( OFX::eRenderFullySafe );
desc.setOverlayInteractDescriptor( new OFX::DefaultEffectOverlayWrap<CropMarginOverlay>() );
}
示例11: describe
/**
* @brief Function called to describe the plugin main features.
* @param[in, out] desc Effect descriptor
*/
void ColorSpacePluginFactory::describe(OFX::ImageEffectDescriptor& desc)
{
desc.setLabels("TuttleColorSpace", "ColorSpace", "Color convertions");
desc.setPluginGrouping("tuttle/image/process/color");
desc.setDescription("ColorSpace\n"
"Plugin is used to apply colorspace transformations on images.");
// add the supported contexts
desc.addSupportedContext(OFX::eContextFilter);
desc.addSupportedContext(OFX::eContextGeneral);
// add supported pixel depths
desc.addSupportedBitDepth(OFX::eBitDepthUByte);
desc.addSupportedBitDepth(OFX::eBitDepthUShort);
desc.addSupportedBitDepth(OFX::eBitDepthFloat);
// plugin flags
desc.setSupportsTiles(kSupportTiles);
desc.setRenderThreadSafety(OFX::eRenderFullySafe);
}
示例12: describe
/**
* @brief Function called to describe the plugin main features.
* @param[in, out] desc Effect descriptor
*/
void ColorTransformPluginFactory::describe( OFX::ImageEffectDescriptor& desc )
{
desc.setLabels( "TuttleColorTransform", "ColorTransform",
"ColorTransform" );
desc.setPluginGrouping( "tuttle/image/process/color" );
desc.setDescription( "Plugin under early development." );
// add the supported contexts, only filter at the moment
desc.addSupportedContext( OFX::eContextFilter );
desc.addSupportedContext( OFX::eContextGeneral );
// add supported pixel depths
desc.addSupportedBitDepth( OFX::eBitDepthUByte );
desc.addSupportedBitDepth( OFX::eBitDepthUShort );
desc.addSupportedBitDepth( OFX::eBitDepthFloat );
// plugin flags
desc.setSupportsTiles( kSupportTiles );
desc.setRenderThreadSafety( OFX::eRenderFullySafe );
}
示例13: describeInContext
/**
* @brief Function called to describe the plugin controls and features.
* @param[in, out] desc Effect descriptor
* @param[in] context Application context
*/
void ColorBarsPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
OFX::EContext context )
{
describeGeneratorParamsInContext( desc, context );
OFX::ChoiceParamDescriptor* levels = desc.defineChoiceParam( kColorBarsLevels );
levels->setLabel( "Levels" );
levels->appendOption( kColorBarsLevels100 );
levels->appendOption( kColorBarsLevels75 );
levels->setDefault( eColorBarsLevels75 );
}
示例14:
/**
* @brief Function called to describe the plugin controls and features.
* @param[in, out] desc Effect descriptor
* @param[in] context Application context
*/
void Jpeg2000WriterPluginFactory::describeInContext( OFX::ImageEffectDescriptor &desc,
OFX::EContext context )
{
OFX::ClipDescriptor *srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName );
srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );
srcClip->addSupportedComponent( OFX::ePixelComponentRGB );
srcClip->addSupportedComponent( OFX::ePixelComponentAlpha );
srcClip->setSupportsTiles( kSupportTiles );
OFX::ClipDescriptor *dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
dstClip->addSupportedComponent( OFX::ePixelComponentRGB );
dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
dstClip->setSupportsTiles( kSupportTiles );
describeWriterParamsInContext( desc, context );
OFX::ChoiceParamDescriptor* bitDepth = static_cast<OFX::ChoiceParamDescriptor*>( desc.getParamDescriptor( kTuttlePluginBitDepth ) );
bitDepth->resetOptions();
bitDepth->appendOption( kTuttlePluginBitDepth8 );
bitDepth->appendOption( kTuttlePluginBitDepth12 );
bitDepth->appendOption( kTuttlePluginBitDepth16 );
#ifndef TUTTLE_PRODUCTION
bitDepth->appendOption( kTuttlePluginBitDepth32 );
#endif
bitDepth->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
bitDepth->setDefault( eTuttlePluginBitDepth8 );
OFX::BooleanParamDescriptor* lossless = desc.defineBooleanParam( kParamLossless );
lossless->setLabel( "lossless" );
lossless->setHint("When no cinema profile is selected, set compression to lossless.");
lossless->setDefault( false );
OFX::ChoiceParamDescriptor* cineProfil = desc.defineChoiceParam( kParamCinemaProfil );
cineProfil->appendOption( kParamCinemaProfilNoDigit );
cineProfil->appendOption( kParamCinemaProfil2k24fps );
cineProfil->appendOption( kParamCinemaProfil2k48fps );
cineProfil->appendOption( kParamCinemaProfil4k24fps );
cineProfil->setDefault( 0 );
}
示例15: describe
/**
* @brief Function called to describe the plugin main features.
* @param[in, out] desc Effect descriptor
*/
void PrintPluginFactory::describe( OFX::ImageEffectDescriptor& desc )
{
desc.setLabels( "TuttlePrint", "TuttlePrint",
"TuttlePrint" );
desc.setPluginGrouping( "tuttle/image/process/color" );
desc.setDescription( "TuttlePrint\n"
"Allows to print a part of the image." );
// add the supported contexts, only filter at the moment
desc.addSupportedContext( OFX::eContextFilter );
desc.addSupportedContext( OFX::eContextGeneral );
// add supported pixel depths
desc.addSupportedBitDepth( OFX::eBitDepthUByte );
desc.addSupportedBitDepth( OFX::eBitDepthUShort );
desc.addSupportedBitDepth( OFX::eBitDepthFloat );
// plugin flags
desc.setSupportsTiles( kSupportTiles );
desc.setRenderThreadSafety( OFX::eRenderFullySafe );
}