net.aerith.misao.image.filter
Class MapFilter

java.lang.Object
  |
  +--net.aerith.misao.image.filter.Filter
        |
        +--net.aerith.misao.image.filter.MapFilter

public class MapFilter
extends Filter

The MapFilter is an image processing filter to map the image based on the specified map function. If the buffer of the new image is set, the result will be stored in that buffer. Otherwise, it creates a new buffer with the same size as the original.

The map function must convert (x,y) on the original image to (x,y) on the new image. The (0,0) represents the center of the image.


Field Summary
protected  MapFunction map_function
          The map function which converts (x,y) on the original image to (x,y) on the new image.
protected  MonoImage new_image
          The new buffer.
 
Fields inherited from class net.aerith.misao.image.filter.Filter
monitor_set
 
Constructor Summary
MapFilter()
          Constructs a filter.
MapFilter(MapFunction initial_mf)
          Constructs a filter with a map function.
 
Method Summary
 MonoImage operate(MonoImage image)
          Operates the image processing filter.
 void setBuffer(MonoImage new_buffer)
          Sets the buffer of the new image.
 void setMapFunction(MapFunction new_mf)
          Sets the new map function.
 
Methods inherited from class net.aerith.misao.image.filter.Filter
addMonitor, setMonitor
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

map_function

protected MapFunction map_function
The map function which converts (x,y) on the original image to (x,y) on the new image.

new_image

protected MonoImage new_image
The new buffer.
Constructor Detail

MapFilter

public MapFilter()
Constructs a filter.

MapFilter

public MapFilter(MapFunction initial_mf)
Constructs a filter with a map function.
Parameters:
initial_mf - the initial map function.
Method Detail

setMapFunction

public void setMapFunction(MapFunction new_mf)
Sets the new map function.
Parameters:
new_mf - the new map function.

setBuffer

public void setBuffer(MonoImage new_buffer)
Sets the buffer of the new image.
Parameters:
new_buffer - the buffer of the new image.

operate

public MonoImage operate(MonoImage image)
Operates the image processing filter. If the buffer of the new image is set, the result will be stored in that buffer. Otherwise, it creates a new buffer with the same size as the original.
Overrides:
operate in class Filter
Parameters:
image - the original image to process.
Returns:
the new image buffer.