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, processCount
Fields inherited from class org.ghost4j.AbstractComponent
supportedDocumentClasses
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate InkAnalysisItem
analyzeSinglePage
(Document page) Performs ink analysis on a single page document.static void
Main method used to start the analyzer in standalone 'slave mode'.private double
parseValue
(String value) Parse a comma value to a doubleMethods inherited from class org.ghost4j.analyzer.AbstractRemoteAnalyzer
analyze, startRemoteAnalyzer
Methods inherited from class org.ghost4j.AbstractRemoteComponent
buildJavaFork, getMaxProcessCount, getProcessCount, getRemoteComponent, isStandAloneModeSupported, setMaxProcessCount, startRemoteServer, waitForFreeProcess
Methods inherited from class org.ghost4j.AbstractComponent
assertDeviceSupported, assertDocumentSupported, copySettings, extractSettings, isDeviceSupported
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ghost4j.Component
copySettings, extractSettings
Methods 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:
IOException
AnalyzerException
DocumentException
-
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:
run
in classAbstractRemoteAnalyzer
- Throws:
IOException
AnalyzerException
DocumentException
-