software.authoring.scantegrity
Class BmpToGeometry

java.lang.Object
  extended by software.authoring.scantegrity.BmpToGeometry
All Implemented Interfaces:
BmpTogeometryInterface

public class BmpToGeometry
extends java.lang.Object
implements BmpTogeometryInterface


Field Summary
 java.util.Vector<Cluster> ScantegrityColors
           
 
Constructor Summary
BmpToGeometry()
           
 
Method Summary
 void createGeometry(java.awt.image.BufferedImage bi, float dpi, int noCols, java.lang.String geometryFile, java.lang.String electionSpecFile)
           
 java.util.Vector<Cluster> getAllColors()
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ScantegrityColors

public java.util.Vector<Cluster> ScantegrityColors
Constructor Detail

BmpToGeometry

public BmpToGeometry()
Method Detail

createGeometry

public void createGeometry(java.awt.image.BufferedImage bi,
                           float dpi,
                           int noCols,
                           java.lang.String geometryFile,
                           java.lang.String electionSpecFile)
                    throws java.lang.Exception
Specified by:
createGeometry in interface BmpTogeometryInterface
Parameters:
bi - - the image to be scanned
dpi - - the dpi of the image (it cannot be infered from the image since some images do not have a dpi)
noCols - - the number of columns the contests are arranged in
geometryFile - - where to write the geometry file
electionSpecFile - - where to write the default Election Specification
Throws:
java.lang.Exception - - an exception is thrown if the number of bullets is different from the number of dunots for one contest (or for the serial number)

getAllColors

public java.util.Vector<Cluster> getAllColors()
Specified by:
getAllColors in interface BmpTogeometryInterface
Returns:
- all the Colors that the image is scanned for

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception