org.jzy3d.plot3d.builder.concrete
Class BufferedImageMapper

java.lang.Object
  extended by org.jzy3d.plot3d.builder.Mapper
      extended by org.jzy3d.plot3d.builder.concrete.BufferedImageMapper

public class BufferedImageMapper
extends Mapper

Mapper which reads height information from the grayscale values of a BufferedImage, normalized to range [0..1].

Author:
Nils Hoffmann

Constructor Summary
BufferedImageMapper(BufferedImage bi)
           
 
Method Summary
 double f(double x, double y)
           
 Rectangle getClippedViewport(Rectangle roi)
          Returns the intersection of this BufferedImage's dimensions with those passed in in Rectangle roi, if there is one.
 
Methods inherited from class org.jzy3d.plot3d.builder.Mapper
f, f, fAsFloat, fAsFloat, fAsFloat, fAsFloat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferedImageMapper

public BufferedImageMapper(BufferedImage bi)
Method Detail

getClippedViewport

public Rectangle getClippedViewport(Rectangle roi)
Returns the intersection of this BufferedImage's dimensions with those passed in in Rectangle roi, if there is one. Otherwise, the returned rectangle may be empty.

Parameters:
roi -
Returns:

f

public double f(double x,
                double y)
Specified by:
f in class Mapper