Package org.ghost4j.analyzer
Class InkAnalyzer
java.lang.Object
org.ghost4j.AbstractComponent
org.ghost4j.AbstractRemoteComponent
org.ghost4j.analyzer.AbstractRemoteAnalyzer
org.ghost4j.analyzer.InkAnalyzer
- All Implemented Interfaces:
Analyzer,RemoteAnalyzer,Component
Ink analyzer: analyze ink coverage of a document. For some reason, the API
crashed when trying to analyze a document on more than one page. To prevent
the crash, each page of the document is analyzed separately.
-
Field Summary
Fields inherited from class org.ghost4j.AbstractRemoteComponent
maxProcessCount, processCountFields inherited from class org.ghost4j.AbstractComponent
supportedDocumentClasses -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate InkAnalysisItemanalyzeSinglePage(Document page) Performs ink analysis on a single page document.static voidMain method used to start the analyzer in standalone 'slave mode'.private doubleparseValue(String value) Parse a comma value to a doubleMethods inherited from class org.ghost4j.analyzer.AbstractRemoteAnalyzer
analyze, startRemoteAnalyzerMethods inherited from class org.ghost4j.AbstractRemoteComponent
buildJavaFork, getMaxProcessCount, getProcessCount, getRemoteComponent, isStandAloneModeSupported, setMaxProcessCount, startRemoteServer, waitForFreeProcessMethods inherited from class org.ghost4j.AbstractComponent
assertDeviceSupported, assertDocumentSupported, copySettings, extractSettings, isDeviceSupportedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ghost4j.Component
copySettings, extractSettingsMethods inherited from interface org.ghost4j.analyzer.RemoteAnalyzer
setMaxProcessCount
-
Constructor Details
-
InkAnalyzer
public InkAnalyzer()
-
-
Method Details
-
main
Main method used to start the analyzer in standalone 'slave mode'.- Parameters:
args-- Throws:
AnalyzerException
-
analyzeSinglePage
private InkAnalysisItem analyzeSinglePage(Document page) throws IOException, AnalyzerException, DocumentException Performs ink analysis on a single page document.- Parameters:
page- Single page document- Returns:
- An AnalysisItem
- Throws:
IOExceptionAnalyzerExceptionDocumentException
-
parseValue
Parse a comma value to a double- Parameters:
value- Value as String- Returns:
- a double
- Throws:
ParseException
-
run
public List<AnalysisItem> run(Document document) throws IOException, AnalyzerException, DocumentException - Specified by:
runin classAbstractRemoteAnalyzer- Throws:
IOExceptionAnalyzerExceptionDocumentException
-