io.visualize
Class SkeletonToBufferedImage

java.lang.Object
  extended by io.visualize.SkeletonToBufferedImage

public class SkeletonToBufferedImage
extends java.lang.Object

create a buffered image for a specified skeleton object


Field Summary
private static int backgroundColor
          define background color
private static int objectColor
          define contour color
private static int skeletonColor
          define skeleton color
 
Constructor Summary
SkeletonToBufferedImage()
           
 
Method Summary
private static void initImage(java.awt.image.BufferedImage bimg)
          set image completely to background color.
private static void setContourPixel(java.awt.image.BufferedImage bimg, SkeletonObject o)
          set the contour pixel.
private static void setSkeletonPixel(java.awt.image.BufferedImage bimg, SkeletonObject o)
          set the skeleton pixel.
static java.awt.image.BufferedImage skeletonToImage(SkeletonObject o)
          create a nice image for the specified skeleton.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

backgroundColor

private static final int backgroundColor
define background color


skeletonColor

private static final int skeletonColor
define skeleton color


objectColor

private static final int objectColor
define contour color

Constructor Detail

SkeletonToBufferedImage

public SkeletonToBufferedImage()
Method Detail

skeletonToImage

public static java.awt.image.BufferedImage skeletonToImage(SkeletonObject o)
                                                    throws InvalidSkeletonException
create a nice image for the specified skeleton.

Parameters:
o - the skeleton object to be visualized
Returns:
a bufferedimage displaying the skeleton object
Throws:
InvalidSkeletonException - if the skeleton is invalid

initImage

private static void initImage(java.awt.image.BufferedImage bimg)
set image completely to background color.


setContourPixel

private static void setContourPixel(java.awt.image.BufferedImage bimg,
                                    SkeletonObject o)
set the contour pixel.

Parameters:
bimg - the bufferedimage to be filled
o - the skeleton object to be displayed.

setSkeletonPixel

private static void setSkeletonPixel(java.awt.image.BufferedImage bimg,
                                     SkeletonObject o)
set the skeleton pixel.

Parameters:
bimg - the bufferedimage to be filled
o - the skeleton object to be displayed.