lib
Class Compressor

java.lang.Object
  extended by java.util.Observable
      extended by lib.Compressor

public class Compressor
extends java.util.Observable

fractal compressor instance. combines the tiler and comparator classes to create a fractal image model


Constructor Summary
Compressor(ScaleTransform scaleTransform, Tiler<java.awt.image.BufferedImage> tiler, Distanceator<java.awt.image.BufferedImage> comparator, java.util.Set<ImageTransform> transforms, java.util.Observer observer)
           
Compressor(ScaleTransform scaleTransform, Tiler<java.awt.image.BufferedImage> tiler, Distanceator<java.awt.image.BufferedImage> comparator, java.util.Set<ImageTransform> transforms, java.util.Set<java.awt.image.BufferedImageOp> filters, java.util.Observer observer)
           
 
Method Summary
 FractalModel compress(java.awt.image.BufferedImage image)
          Compress a given image.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Compressor

public Compressor(ScaleTransform scaleTransform,
                  Tiler<java.awt.image.BufferedImage> tiler,
                  Distanceator<java.awt.image.BufferedImage> comparator,
                  java.util.Set<ImageTransform> transforms,
                  java.util.Observer observer)
           throws java.lang.NullPointerException
Parameters:
scaleTransform - the scale difference between the ranges and the domains
tiler - the tiler used to tile the image
comparator - the comparator used to compare the tiles of the image
transforms - a list of transform to apply to the tiles of the image
observer - an observer receiving progress results for the compression - allowed to be null
Throws:
java.lang.NullPointerException - if any field is null
See Also:
compress(java.awt.image.BufferedImage), Observable, Observer.update(java.util.Observable, java.lang.Object)

Compressor

public Compressor(ScaleTransform scaleTransform,
                  Tiler<java.awt.image.BufferedImage> tiler,
                  Distanceator<java.awt.image.BufferedImage> comparator,
                  java.util.Set<ImageTransform> transforms,
                  java.util.Set<java.awt.image.BufferedImageOp> filters,
                  java.util.Observer observer)
           throws java.lang.NullPointerException
Parameters:
scaleTransform - the scale difference between the ranges and the domains
tiler - the tiler used to tile the image
comparator - the comparator used to compare the tiles of the image
transforms - a set of transform to apply to the tiles of the image
filters - a set of filters to apply to the image for normalization
observer - an observer receiving progress results from compress - allowed to be null
Throws:
java.lang.NullPointerException - if any field is null
See Also:
compress(java.awt.image.BufferedImage), Observable, Observer.update(java.util.Observable, java.lang.Object)
Method Detail

compress

public FractalModel compress(java.awt.image.BufferedImage image)
Compress a given image. Compressions takes place as a mapping of small images and transforms to points. Applying the transforms to the images and placing the resulted transformed images to the mapped points, the original image is reassembled.

Parameters:
image - the image to compress
Returns:
a mapping of points to images and transforms.