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.
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
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.
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.
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.