org.miv.jism.tools.ImageWrapperContext Class Reference

Wrap a buffered image to produce a context. More...

Inheritance diagram for org.miv.jism.tools.ImageWrapperContext:

org.miv.jism.core.JismContext

List of all members.

Public Member Functions

 ImageWrapperContext (BufferedImage in)
 Create a new context from a buffered image.
int getMaxIntensity ()
 Return the max intensity.
int getNeighAt (int p, int id)
 Get the neighbor at the given id.
int getNeighSize (int p)
 Get neighborhood size for a given pixel.
double getNewRandomDouble ()
 Get a new random double using Math.random().
int getPixelIntensity (int p)
 Get the pixel at the given coordinates.
int getWidth ()
 Get width of this context.
int getHeight ()
 Get height of this context.
int getDepth ()
 This will return 1.
int pixelId (int x, int y)
 Get pixel unique id.
int pixelId (int x, int y, int z)
 Get pixel unique id.
int pixelX (int id)
 Get pixel abscissa.
int pixelY (int id)
 Get pixel ordinate.
int pixelZ (int id)
 Get pixel depth.


Detailed Description

Wrap a buffered image to produce a context.

Pixel will search their intensities directly in the buffered image.

Author:
Guilhelm Savin
See also:
org.miv.jism.core.JismContext

Constructor & Destructor Documentation

org.miv.jism.tools.ImageWrapperContext.ImageWrapperContext ( BufferedImage  in  ) 

Create a new context from a buffered image.

Parameters:
in to-wrap image


Member Function Documentation

int org.miv.jism.tools.ImageWrapperContext.getMaxIntensity (  ) 

Return the max intensity.

This will return 256.

Returns:
256

Implements org.miv.jism.core.JismContext.

int org.miv.jism.tools.ImageWrapperContext.getNeighAt ( int  p,
int  id 
)

Get the neighbor at the given id.

Parameters:
x abscissa
y ordinate
id neighbor id
Returns:
neighbor at the given id

Implements org.miv.jism.core.JismContext.

int org.miv.jism.tools.ImageWrapperContext.getNeighSize ( int  p  ) 

Get neighborhood size for a given pixel.

Parameters:
x abscissa
y ordinate
Returns:
neighborhood size of p

Implements org.miv.jism.core.JismContext.

double org.miv.jism.tools.ImageWrapperContext.getNewRandomDouble (  ) 

Get a new random double using Math.random().

Returns:
a random double

Implements org.miv.jism.core.JismContext.

int org.miv.jism.tools.ImageWrapperContext.getPixelIntensity ( int  p  ) 

Get the pixel at the given coordinates.

Parameters:
x abscissa of the pixel
y ordinate of the pixel
Returns:
pixel at (x,y) position

Implements org.miv.jism.core.JismContext.

int org.miv.jism.tools.ImageWrapperContext.getWidth (  ) 

Get width of this context.

Returns:
width

Implements org.miv.jism.core.JismContext.

int org.miv.jism.tools.ImageWrapperContext.getHeight (  ) 

Get height of this context.

Returns:
height

Implements org.miv.jism.core.JismContext.

int org.miv.jism.tools.ImageWrapperContext.getDepth (  ) 

This will return 1.

Returns:
1

Implements org.miv.jism.core.JismContext.

int org.miv.jism.tools.ImageWrapperContext.pixelId ( int  x,
int  y 
)

Get pixel unique id.

Context assumes that pixel id is between 0 and n where n is the total number of pixels.

Parameters:
x abscissa
y ordinate
Returns:
unique pixel id

Implements org.miv.jism.core.JismContext.

int org.miv.jism.tools.ImageWrapperContext.pixelId ( int  x,
int  y,
int  z 
)

Get pixel unique id.

Context assumes that pixel id is between 0 and n where n is the total number of pixels.

Parameters:
x abscissa
y ordinate
z depth
Returns:
unique pixel id

Implements org.miv.jism.core.JismContext.

int org.miv.jism.tools.ImageWrapperContext.pixelX ( int  id  ) 

Get pixel abscissa.

Parameters:
id id of pixel
Returns:
abscissa of pixel id

Implements org.miv.jism.core.JismContext.

int org.miv.jism.tools.ImageWrapperContext.pixelY ( int  id  ) 

Get pixel ordinate.

Parameters:
id id of pixel
Returns:
ordinate of pixel id

Implements org.miv.jism.core.JismContext.

int org.miv.jism.tools.ImageWrapperContext.pixelZ ( int  id  ) 

Get pixel depth.

Parameters:
id id of pixel
Returns:
depth of pixel id

Implements org.miv.jism.core.JismContext.


The documentation for this class was generated from the following file:
Generated on Fri Apr 18 10:49:00 2008 for JisM by  doxygen 1.5.3