FileDocCategorySizeDatePackage
FilterFunctionEnvironment.javaAPI DocAndroid 5.1 API4026Thu Mar 12 22:22:30 GMT 2015android.filterfw

FilterFunctionEnvironment

public class FilterFunctionEnvironment extends MffEnvironment
A FilterFunctionEnvironment provides a simple functional front-end to manually executing filters. Use this environment if a graph-based approach is not convenient for your case. Typically, a FilterFunctionEnvironment is used as follows: 1. Instantiate a new FilterFunctionEnvironment instance. 2. Perform any configuration, such as setting a GL environment. 3. Wrap Filters into FilterFunctions by calling createFunction(). 4. Execute FilterFunctions individually and use the results for further processing. Additionally, there is a convenience method to execute a number of filters in sequence.
hide

Fields Summary
Constructors Summary
public FilterFunctionEnvironment()
Create a new FilterFunctionEnvironment with the default components.

        super(null);
    
public FilterFunctionEnvironment(android.filterfw.core.FrameManager frameManager)
Create a new FilterFunctionEnvironment with a custom FrameManager. Pass null to auto-create a FrameManager.

param
frameManager The FrameManager to use, or null to auto-create one.

        super(frameManager);
    
Methods Summary
public android.filterfw.core.FilterFunctioncreateFunction(java.lang.Class filterClass, java.lang.Object parameters)
Create a new FilterFunction from a specific filter class. The function is initialized with the given key-value list of parameters. Note, that this function uses the default shared FilterFactory to create the filter instance.

param
filterClass The class of the filter to wrap. This must be a Filter subclass.
param
parameters An argument list of alternating key-value filter parameters.
return
A new FilterFunction instance.

        String filterName = "FilterFunction(" + filterClass.getSimpleName() + ")";
        Filter filter = FilterFactory.sharedFactory().createFilterByClass(filterClass, filterName);
        filter.initWithAssignmentList(parameters);
        return new FilterFunction(getContext(), filter);