project.android.imageprocessing.filter
Class CompositeMultiPixelFilter

java.lang.Object
  extended by project.android.imageprocessing.GLRenderer
      extended by project.android.imageprocessing.input.GLTextureOutputRenderer
          extended by project.android.imageprocessing.filter.BasicFilter
              extended by project.android.imageprocessing.filter.MultiInputFilter
                  extended by project.android.imageprocessing.filter.MultiInputPixelFilter
                      extended by project.android.imageprocessing.filter.CompositeMultiPixelFilter
All Implemented Interfaces:
GLTextureInputRenderer
Direct Known Subclasses:
SobelEdgeDetectionFilter, ThresholdEdgeDetectionFilter

public class CompositeMultiPixelFilter
extends MultiInputPixelFilter

An extension of MultiInputPixelFilter. This class is similar to CompositeFilter except it allows for multi-pixel calculations in the shaders. For information about the extension of this filter, see CompositeFilter.

Author:
Chris Batt

Field Summary
 
Fields inherited from class project.android.imageprocessing.GLRenderer
ATTRIBUTE_POSITION, ATTRIBUTE_TEXCOORD, UNIFORM_TEXTURE0, VARYING_TEXCOORD
 
Constructor Summary
CompositeMultiPixelFilter(int numOfInputs)
          Creates a CompositeMultiPixelFilter with the default BasicFilter shaders that takes in a given number of inputs
 
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.filter.MultiInputFilter
clearRegisteredFilterLocations, registerFilterLocation, registerFilterLocation
 
Methods inherited from class project.android.imageprocessing.input.GLTextureOutputRenderer
addTarget, getLockObject, getTargets, removeTarget
 
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
 

Constructor Detail

CompositeMultiPixelFilter

public CompositeMultiPixelFilter(int numOfInputs)
Creates a CompositeMultiPixelFilter with the default BasicFilter shaders that takes in a given number of inputs

Parameters:
numOfInputs - The number of inputs that this filter expects
Method Detail

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 MultiInputFilter
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.