software.scanner
Interface ScannedBallotInterface

All Known Implementing Classes:
ScannedBallot, ScannedBallot

public interface ScannedBallotInterface


Method Summary
 void detect(java.awt.image.BufferedImage img)
          Given a scanned ballot, detects the votes and the serial number
 java.util.TreeMap<java.lang.Integer,java.util.TreeMap<java.lang.Integer,java.util.TreeMap<java.lang.Integer,software.scanner.ScannedBallot.TypeOfVotes>>> getAllContests()
           
 BallotGeometryMap getBallotGeometryMap()
           
 java.lang.String getCompactRepresentation()
          [T|B]serial space separated marked possitions.
 double getDpi()
           
 java.util.Vector<Cluster> getFullVotes()
           
 java.util.Vector<Cluster> getOverVotes()
           
 java.awt.image.BufferedImage getPerfectImage()
           
 Prow.ChosenPage getSelectedPage()
           
 java.lang.String getSerial()
           
 java.util.Vector<Cluster> getUnderVotes()
           
 boolean isMailIn()
           
 void setMailIn(boolean mailIn)
           
 Prow toProw()
           
 byte[] toXMLString()
           
 

Method Detail

getSerial

java.lang.String getSerial()

detect

void detect(java.awt.image.BufferedImage img)
            throws java.lang.Exception
Given a scanned ballot, detects the votes and the serial number

Parameters:
img -
Throws:
java.lang.Exception - - if the serial number cannot be properly read

getFullVotes

java.util.Vector<Cluster> getFullVotes()
Returns:
the correct marks (only) for the contest that are fully votes

getOverVotes

java.util.Vector<Cluster> getOverVotes()
Returns:
the overvotes that appear on the ballot

getUnderVotes

java.util.Vector<Cluster> getUnderVotes()
Returns:
the correct marks (only) for the contest that are undervoted

getAllContests

java.util.TreeMap<java.lang.Integer,java.util.TreeMap<java.lang.Integer,java.util.TreeMap<java.lang.Integer,software.scanner.ScannedBallot.TypeOfVotes>>> getAllContests()

toXMLString

byte[] toXMLString()
Returns:
the scanned ballot in xml format, accepted by the web server for uploading

getPerfectImage

java.awt.image.BufferedImage getPerfectImage()
Returns:
- the streighen image (perfectly aligned)

getDpi

double getDpi()
Returns:
the dpi of the scanned image

getSelectedPage

Prow.ChosenPage getSelectedPage()
Returns:
the scanned page

getBallotGeometryMap

BallotGeometryMap getBallotGeometryMap()

getCompactRepresentation

java.lang.String getCompactRepresentation()
[T|B]serial space separated marked possitions. If a possition is not marked, -1 is used

Returns:
a one line representation of the scanned ballot

setMailIn

void setMailIn(boolean mailIn)
Parameters:
mailIn - if a ballot is mailed in, the other page is marked as scanned (i.e. the the top page is scanned, bottom is recorded). This can be done because only the possitions are retained

isMailIn

boolean isMailIn()
Returns:
if the ballot commes from a mailed in ballot

toProw

Prow toProw()
Returns:
a scanned ballot in Prow representation