project.android.imageprocessing.filter
Class GroupFilter
java.lang.Object
project.android.imageprocessing.GLRenderer
project.android.imageprocessing.input.GLTextureOutputRenderer
project.android.imageprocessing.filter.BasicFilter
project.android.imageprocessing.filter.GroupFilter
- All Implemented Interfaces:
- GLTextureInputRenderer
- Direct Known Subclasses:
- CannyEdgeDetectionFilter, ClosingFilter, ClosingRGBFilter, LanczosResamplingFilter, OpeningFilter, OpeningRGBFilter, SmoothToonFilter, SoftEleganceFilter
public abstract class GroupFilter
- extends BasicFilter
A multiple filter renderer extension of the BasicFilter.
This class allows for a filter that contains multiple filters to create the output.
This class can be used as the base for a filter which is made up of multiple filters.
Similar to the CompositeFilter, the GroupFilter consists of multiple filters.
The difference is that the CompositeFilter has its own shaders whereas the GroupFilter does not.
This class is simply a wrapper for a small pipeline of filters. Like the CompositeFilter, all filters
must be registered. The filters that begin the internal pipeline of this filter should be registered as
initial filters. The filters that end the pipeline and produce output for the next filter in the external chain
should be registered as terminal filters. All other filters that are internal to this class should be
registered using registerFilter(BasicFilter filter). In most cases there should only be one terminalFilter because
there is no way to separate the outputs into different streams.
- Author:
- Chris Batt
Constructor Summary |
GroupFilter()
Creates a GroupFilter with any number of initial filters or filter graphs. |
Method Summary |
void |
destroy()
Cleans up the opengl objects for this renderer. |
void |
newTextureReady(int texture,
GLTextureOutputRenderer source)
Signals that a new texture is available and the image should be reprocessed. |
void |
setRenderSize(int width,
int height)
Sets the render size of the renderer to the given width and height. |
Methods inherited from class project.android.imageprocessing.GLRenderer |
getBackgroundAlpha, getBackgroundBlue, getBackgroundGreen, getBackgroundRed, getHeight, getWidth, onDrawFrame, reInitialize, rotateClockwise90Degrees, rotateCounterClockwise90Degrees, setBackgroundAlpha, setBackgroundBlue, setBackgroundColour, setBackgroundGreen, setBackgroundRed |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroupFilter
public GroupFilter()
- Creates a GroupFilter with any number of initial filters or filter graphs.
destroy
public void destroy()
- Description copied from class:
GLRenderer
- Cleans up the opengl objects for this renderer. Must be called with opengl context.
Normally called by
FastImageProcessingPipeline
.
- Overrides:
destroy
in class GLTextureOutputRenderer
newTextureReady
public void newTextureReady(int texture,
GLTextureOutputRenderer source)
- Description copied from interface:
GLTextureInputRenderer
- Signals that a new texture is available and the image should be reprocessed.
- Specified by:
newTextureReady
in interface GLTextureInputRenderer
- Overrides:
newTextureReady
in class BasicFilter
- Parameters:
texture
- The texture id to be used as input.source
- The GLTextureOutputRenderer which produced the texture.
setRenderSize
public void setRenderSize(int width,
int height)
- Description copied from class:
GLRenderer
- Sets the render size of the renderer to the given width and height.
This also prevents the size of the renderer from changing automatically
when one of the source(s) of the renderer has a size change. If the renderer
has been rotated an odd number of times, the width and height will be swapped.
- Overrides:
setRenderSize
in class GLRenderer
- Parameters:
width
- The width at which the renderer should draw at.height
- The height at which the renderer should draw at.