public class OCR
extends java.lang.Object
A class for OCR of GE and Siemens modality dose report screen saves.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
defaultFileNameOfKnownGlyphs |
Constructor and Description |
---|
OCR(AttributeList list)
Perform OCR on the supplied image AttributeList.
|
OCR(AttributeList list,
java.lang.String fileNameOfKnownGlyphs,
java.lang.String fileNameToRecordNewGlyphs)
Perform OCR on the supplied image AttributeList.
|
OCR(java.awt.image.BufferedImage image,
java.lang.String fileNameOfKnownGlyphs,
java.lang.String fileNameToRecordNewGlyphs)
Perform OCR on the supplied image.
|
OCR(java.util.List<java.lang.String> screenFilesPaths)
Perform OCR on the supplied image files.
|
OCR(java.util.List<java.lang.String> screenFilesPaths,
java.lang.String fileNameOfKnownGlyphs,
java.lang.String fileNameToRecordNewGlyphs)
Perform OCR on the supplied image files.
|
OCR(java.lang.String screenFilesPath) |
OCR(java.lang.String screenFilesPath,
java.lang.String fileNameOfKnownGlyphs,
java.lang.String fileNameToRecordNewGlyphs)
Perform OCR on the supplied image files.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doCommonConstructorStuff(AttributeList list,
java.awt.image.BufferedImage image,
java.lang.String fileNameOfKnownGlyphs,
java.lang.String fileNameToRecordNewGlyphs)
Perform OCR on the supplied image with AttributeList.
|
protected void |
doCommonConstructorStuff(AttributeList list,
java.lang.String fileNameOfKnownGlyphs,
java.lang.String fileNameToRecordNewGlyphs)
Perform OCR on the supplied image AttributeList.
|
AttributeList |
getCommonAttributeList() |
static CTDose |
getCTDoseFromOCROfDoseScreen(OCR ocr,
CTIrradiationEventDataFromImages eventDataFromImages,
boolean buildSR)
Create a CTDose instance from the OCR already performed on a dose screen image.
|
static CTDose |
getCTDoseFromOCROfGEDoseScreen(OCR ocr,
java.lang.String startDateTime,
java.lang.String endDateTime,
CTIrradiationEventDataFromImages eventDataFromImages,
boolean buildSR)
Create a CTDose instance from the OCR already performed on a GE dose screen image.
|
static CTDose |
getCTDoseFromOCROfSiemensDoseScreen(OCR ocr,
java.lang.String startDateTime,
java.lang.String endDateTime,
CTIrradiationEventDataFromImages eventDataFromImages,
boolean buildSR)
Create a CTDose instance from the OCR already performed on a Siemens dose screen image.
|
static CTDose |
getCTDoseFromOCROfToshibaDoseScreen(OCR ocr,
java.lang.String startDateTime,
java.lang.String endDateTime,
CTIrradiationEventDataFromImages eventDataFromImages,
boolean buildSR)
Create a CTDose instance from the OCR already performed on a Toshiba dose screen image.
|
static java.awt.image.BufferedImage |
getEightBitImageSuitableForThresholding(AttributeList list)
Get an 8 bit image suitable for thresholding.
|
static boolean |
isDoseScreenInstance(AttributeList list) |
static boolean |
isGEDoseScreenInstance(AttributeList list) |
protected static boolean |
isGEDoseScreenSeriesNumber(java.lang.String seriesNumber) |
static boolean |
isPossiblyDoseScreenInstance(AttributeList list) |
static boolean |
isPossiblyDoseScreenInstance(java.lang.String manufacturer,
java.lang.String sopClassUID,
java.lang.String imageType) |
static boolean |
isPossiblyDoseScreenSeries(AttributeList list) |
static boolean |
isPossiblyDoseScreenSeries(java.lang.String manufacturer,
java.lang.String modality,
java.lang.String seriesNumber,
java.lang.String seriesDescription) |
static boolean |
isPossiblyGEDoseScreenInstance(AttributeList list) |
static boolean |
isPossiblyGEDoseScreenInstance(java.lang.String manufacturer,
java.lang.String sopClassUID,
java.lang.String imageType) |
static boolean |
isPossiblyGEDoseScreenSeries(AttributeList list) |
static boolean |
isPossiblyGEDoseScreenSeries(java.lang.String manufacturer,
java.lang.String modality,
java.lang.String seriesNumber,
java.lang.String seriesDescription) |
static boolean |
isPossiblySiemensDoseScreenInstance(AttributeList list) |
static boolean |
isPossiblySiemensDoseScreenInstance(java.lang.String manufacturer,
java.lang.String sopClassUID,
java.lang.String imageType) |
static boolean |
isPossiblySiemensDoseScreenSeries(AttributeList list) |
static boolean |
isPossiblySiemensDoseScreenSeries(java.lang.String manufacturer,
java.lang.String modality,
java.lang.String seriesNumber,
java.lang.String seriesDescription) |
static boolean |
isPossiblyToshibaDoseScreenInstance(AttributeList list) |
static boolean |
isPossiblyToshibaDoseScreenInstance(java.lang.String manufacturer,
java.lang.String sopClassUID,
java.lang.String imageType) |
static boolean |
isPossiblyToshibaDoseScreenSeries(AttributeList list) |
static boolean |
isPossiblyToshibaDoseScreenSeries(java.lang.String manufacturer,
java.lang.String modality,
java.lang.String seriesNumber,
java.lang.String seriesDescription) |
static boolean |
isSiemensDoseScreenInstance(AttributeList list) |
static boolean |
isToshibaDoseScreenInstance(AttributeList list) |
static void |
main(java.lang.String[] arg)
Extract the CT dose information in a screen save image using optical character recognition, correlate it with any acquired CT slice images.
|
java.lang.String |
toString() |
public static java.lang.String defaultFileNameOfKnownGlyphs
public OCR(AttributeList list) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.lang.Exception
Perform OCR on the supplied image AttributeList.
list
- the AttributeList of the dose screen image file on which to perform OCRjava.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.lang.Exception
public OCR(AttributeList list, java.lang.String fileNameOfKnownGlyphs, java.lang.String fileNameToRecordNewGlyphs) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.lang.Exception
Perform OCR on the supplied image AttributeList.
list
- the AttributeList of the dose screen image file on which to perform OCRfileNameOfKnownGlyphs
- file of known glyphsfileNameToRecordNewGlyphs
- where to record new glyphsjava.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.lang.Exception
public OCR(java.awt.image.BufferedImage image, java.lang.String fileNameOfKnownGlyphs, java.lang.String fileNameToRecordNewGlyphs) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.lang.Exception
Perform OCR on the supplied image.
image
- the dose screen image on which to perform OCRfileNameOfKnownGlyphs
- file of known glyphsfileNameToRecordNewGlyphs
- where to record new glyphsjava.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.lang.Exception
public OCR(java.util.List<java.lang.String> screenFilesPaths) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.lang.Exception
Perform OCR on the supplied image files.
screenFilesPaths
- the paths to the dose screen image files on which to perform OCRjava.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.lang.Exception
public OCR(java.util.List<java.lang.String> screenFilesPaths, java.lang.String fileNameOfKnownGlyphs, java.lang.String fileNameToRecordNewGlyphs) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.lang.Exception
Perform OCR on the supplied image files.
screenFilesPaths
- the paths to the dose screen image files on which to perform OCRfileNameOfKnownGlyphs
- file of known glyphsfileNameToRecordNewGlyphs
- where to record new glyphsjava.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.lang.Exception
public OCR(java.lang.String screenFilesPath) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.lang.Exception
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.lang.Exception
public OCR(java.lang.String screenFilesPath, java.lang.String fileNameOfKnownGlyphs, java.lang.String fileNameToRecordNewGlyphs) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.lang.Exception
Perform OCR on the supplied image files.
screenFilesPath
- the path to the dose screen image files on which to perform OCRfileNameOfKnownGlyphs
- file of known glyphsfileNameToRecordNewGlyphs
- where to record new glyphsjava.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.lang.Exception
protected void doCommonConstructorStuff(AttributeList list, java.awt.image.BufferedImage image, java.lang.String fileNameOfKnownGlyphs, java.lang.String fileNameToRecordNewGlyphs) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.lang.Exception
Perform OCR on the supplied image with AttributeList.
list
- the AttributeList of the dose screen image file on which to perform OCRimage
- the dose screen image on which to perform OCRfileNameOfKnownGlyphs
- file of known glyphsfileNameToRecordNewGlyphs
- where to record new glyphsjava.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.lang.Exception
protected void doCommonConstructorStuff(AttributeList list, java.lang.String fileNameOfKnownGlyphs, java.lang.String fileNameToRecordNewGlyphs) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.lang.Exception
Perform OCR on the supplied image AttributeList.
list
- the AttributeList of the dose screen image file on which to perform OCRfileNameOfKnownGlyphs
- file of known glyphsfileNameToRecordNewGlyphs
- where to record new glyphsjava.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.lang.Exception
public AttributeList getCommonAttributeList()
public static CTDose getCTDoseFromOCROfDoseScreen(OCR ocr, CTIrradiationEventDataFromImages eventDataFromImages, boolean buildSR) throws java.io.IOException
Create a CTDose instance from the OCR already performed on a dose screen image.
Also extracts start and end date and time and default anatomical information.
ocr
- the object from the OCR performed in the imageeventDataFromImages
- the pre event data from the reconstructed imagesbuildSR
- whether or not to extract composite context from the list for use later to build an RDSRjava.io.IOException
public static CTDose getCTDoseFromOCROfGEDoseScreen(OCR ocr, java.lang.String startDateTime, java.lang.String endDateTime, CTIrradiationEventDataFromImages eventDataFromImages, boolean buildSR) throws java.io.IOException
Create a CTDose instance from the OCR already performed on a GE dose screen image.
ocr
- the object from the OCR performed in the imagestartDateTime
- the acquisition start date and timeendDateTime
- the acquisition end date and timeeventDataFromImages
- the pre event data from the reconstructed imagesbuildSR
- whether or not to extract composite context from the list for use later to build an RDSRjava.io.IOException
public static CTDose getCTDoseFromOCROfSiemensDoseScreen(OCR ocr, java.lang.String startDateTime, java.lang.String endDateTime, CTIrradiationEventDataFromImages eventDataFromImages, boolean buildSR) throws java.io.IOException
Create a CTDose instance from the OCR already performed on a Siemens dose screen image.
ocr
- the object from the OCR performed in the imagestartDateTime
- the acquisition start date and timeendDateTime
- the acquisition end date and timeeventDataFromImages
- the pre event data from the reconstructed imagesbuildSR
- whether or not to extract composite context from the list for use later to build an RDSRjava.io.IOException
public static CTDose getCTDoseFromOCROfToshibaDoseScreen(OCR ocr, java.lang.String startDateTime, java.lang.String endDateTime, CTIrradiationEventDataFromImages eventDataFromImages, boolean buildSR) throws java.io.IOException
Create a CTDose instance from the OCR already performed on a Toshiba dose screen image.
ocr
- the object from the OCR performed in the imagestartDateTime
- the acquisition start date and timeendDateTime
- the acquisition end date and timeeventDataFromImages
- the pre event data from the reconstructed imagesbuildSR
- whether or not to extract composite context from the list for use later to build an RDSRjava.io.IOException
public static java.awt.image.BufferedImage getEightBitImageSuitableForThresholding(AttributeList list) throws DicomException
Get an 8 bit image suitable for thresholding.
list
- the listDicomException
public static boolean isDoseScreenInstance(AttributeList list)
public static boolean isGEDoseScreenInstance(AttributeList list)
protected static boolean isGEDoseScreenSeriesNumber(java.lang.String seriesNumber)
public static boolean isPossiblyDoseScreenInstance(AttributeList list)
public static boolean isPossiblyDoseScreenInstance(java.lang.String manufacturer, java.lang.String sopClassUID, java.lang.String imageType)
public static boolean isPossiblyDoseScreenSeries(AttributeList list)
public static boolean isPossiblyDoseScreenSeries(java.lang.String manufacturer, java.lang.String modality, java.lang.String seriesNumber, java.lang.String seriesDescription)
public static boolean isPossiblyGEDoseScreenInstance(AttributeList list)
public static boolean isPossiblyGEDoseScreenInstance(java.lang.String manufacturer, java.lang.String sopClassUID, java.lang.String imageType)
public static boolean isPossiblyGEDoseScreenSeries(AttributeList list)
public static boolean isPossiblyGEDoseScreenSeries(java.lang.String manufacturer, java.lang.String modality, java.lang.String seriesNumber, java.lang.String seriesDescription)
public static boolean isPossiblySiemensDoseScreenInstance(AttributeList list)
public static boolean isPossiblySiemensDoseScreenInstance(java.lang.String manufacturer, java.lang.String sopClassUID, java.lang.String imageType)
public static boolean isPossiblySiemensDoseScreenSeries(AttributeList list)
public static boolean isPossiblySiemensDoseScreenSeries(java.lang.String manufacturer, java.lang.String modality, java.lang.String seriesNumber, java.lang.String seriesDescription)
public static boolean isPossiblyToshibaDoseScreenInstance(AttributeList list)
public static boolean isPossiblyToshibaDoseScreenInstance(java.lang.String manufacturer, java.lang.String sopClassUID, java.lang.String imageType)
public static boolean isPossiblyToshibaDoseScreenSeries(AttributeList list)
public static boolean isPossiblyToshibaDoseScreenSeries(java.lang.String manufacturer, java.lang.String modality, java.lang.String seriesNumber, java.lang.String seriesDescription)
public static boolean isSiemensDoseScreenInstance(AttributeList list)
public static boolean isToshibaDoseScreenInstance(AttributeList list)
public static final void main(java.lang.String[] arg)
Extract the CT dose information in a screen save image using optical character recognition, correlate it with any acquired CT slice images.
arg
- an array of 1 to 6 strings - the path to a dose screen save image or folder of screens (or "-" if to search for dose screens amongst acquired images),
then optionally the path to a DICOMDIR or folder containing acquired CT slice images (or "-" if none and more arguments)
then optionally the name of Dose SR file to write (or "-" if none and more arguments)
then optionally the file containing the text glyphs to use during recognition rather than the default (or "-" if none and more arguments),
then optionally the name of a file to write any newly trained glyphs topublic java.lang.String toString()
toString
in class java.lang.Object