com.pixelmed.doseocr
Class OCR

java.lang.Object
  extended by com.pixelmed.doseocr.OCR

public class OCR
extends Object

A class for OCR of GE and Siemens modality dose report screen saves.


Field Summary
static String defaultFileNameOfKnownGlyphs
           
 
Constructor Summary
OCR(AttributeList list)
           
OCR(AttributeList list, int debugLevel)
           
OCR(AttributeList list, String fileNameOfKnownGlyphs, String fileNameToRecordNewGlyphs, int debugLevel)
           
OCR(BufferedImage image, String fileNameOfKnownGlyphs, String fileNameToRecordNewGlyphs, int debugLevel)
           
OCR(List<String> screenFilesPaths)
           
OCR(List<String> screenFilesPaths, int debugLevel)
           
OCR(List<String> screenFilesPaths, String fileNameOfKnownGlyphs, String fileNameToRecordNewGlyphs, int debugLevel)
           
OCR(String screenFilesPath)
           
OCR(String screenFilesPath, String fileNameOfKnownGlyphs, String fileNameToRecordNewGlyphs, int debugLevel)
           
 
Method Summary
protected  void doCommonConstructorStuff(AttributeList list, BufferedImage image, String fileNameOfKnownGlyphs, String fileNameToRecordNewGlyphs, int debugLevel)
           
protected  void doCommonConstructorStuff(AttributeList list, String fileNameOfKnownGlyphs, String fileNameToRecordNewGlyphs, int debugLevel)
           
 AttributeList getCommonAttributeList()
           
static CTDose getCTDoseFromOCROfDoseScreen(OCR ocr, int debugLevel, CTIrradiationEventDataFromImages eventDataFromImages, boolean buildSR)
           
static CTDose getCTDoseFromOCROfGEDoseScreen(OCR ocr, int debugLevel, String startDateTime, String endDateTime, CTIrradiationEventDataFromImages eventDataFromImages, boolean buildSR)
           
static CTDose getCTDoseFromOCROfSiemensDoseScreen(OCR ocr, int debugLevel, String startDateTime, String endDateTime, CTIrradiationEventDataFromImages eventDataFromImages, boolean buildSR)
           
static CTDose getCTDoseFromOCROfToshibaDoseScreen(OCR ocr, int debugLevel, String startDateTime, String endDateTime, CTIrradiationEventDataFromImages eventDataFromImages, boolean buildSR)
           
static BufferedImage getEightBitImageSuitableForThresholding(AttributeList list, int debugLevel)
           
static boolean isDoseScreenInstance(AttributeList list)
           
static boolean isGEDoseScreenInstance(AttributeList list)
           
protected static boolean isGEDoseScreenSeriesNumber(String seriesNumber)
           
static boolean isPossiblyDoseScreenInstance(AttributeList list)
           
static boolean isPossiblyDoseScreenInstance(String manufacturer, String sopClassUID, String imageType)
           
static boolean isPossiblyDoseScreenSeries(AttributeList list)
           
static boolean isPossiblyDoseScreenSeries(String manufacturer, String modality, String seriesNumber, String seriesDescription)
           
static boolean isPossiblyGEDoseScreenInstance(AttributeList list)
           
static boolean isPossiblyGEDoseScreenInstance(String manufacturer, String sopClassUID, String imageType)
           
static boolean isPossiblyGEDoseScreenSeries(AttributeList list)
           
static boolean isPossiblyGEDoseScreenSeries(String manufacturer, String modality, String seriesNumber, String seriesDescription)
           
static boolean isPossiblySiemensDoseScreenInstance(AttributeList list)
           
static boolean isPossiblySiemensDoseScreenInstance(String manufacturer, String sopClassUID, String imageType)
           
static boolean isPossiblySiemensDoseScreenSeries(AttributeList list)
           
static boolean isPossiblySiemensDoseScreenSeries(String manufacturer, String modality, String seriesNumber, String seriesDescription)
           
static boolean isPossiblyToshibaDoseScreenInstance(AttributeList list)
           
static boolean isPossiblyToshibaDoseScreenInstance(String manufacturer, String sopClassUID, String imageType)
           
static boolean isPossiblyToshibaDoseScreenSeries(AttributeList list)
           
static boolean isPossiblyToshibaDoseScreenSeries(String manufacturer, String modality, String seriesNumber, String seriesDescription)
           
static boolean isSiemensDoseScreenInstance(AttributeList list)
           
static boolean isToshibaDoseScreenInstance(AttributeList list)
           
static void main(String[] arg)
          Extract the CT dose information in a screen save image using optical character recognition, correlate it with any acquired CT slice images.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

defaultFileNameOfKnownGlyphs

public static String defaultFileNameOfKnownGlyphs
Constructor Detail

OCR

public OCR(String screenFilesPath)
    throws IOException,
           ParserConfigurationException,
           SAXException,
           Exception
Throws:
IOException
ParserConfigurationException
SAXException
Exception

OCR

public OCR(String screenFilesPath,
           String fileNameOfKnownGlyphs,
           String fileNameToRecordNewGlyphs,
           int debugLevel)
    throws IOException,
           ParserConfigurationException,
           SAXException,
           Exception
Throws:
IOException
ParserConfigurationException
SAXException
Exception

OCR

public OCR(List<String> screenFilesPaths,
           String fileNameOfKnownGlyphs,
           String fileNameToRecordNewGlyphs,
           int debugLevel)
    throws IOException,
           ParserConfigurationException,
           SAXException,
           Exception
Throws:
IOException
ParserConfigurationException
SAXException
Exception

OCR

public OCR(List<String> screenFilesPaths)
    throws IOException,
           ParserConfigurationException,
           SAXException,
           Exception
Throws:
IOException
ParserConfigurationException
SAXException
Exception

OCR

public OCR(List<String> screenFilesPaths,
           int debugLevel)
    throws IOException,
           ParserConfigurationException,
           SAXException,
           Exception
Throws:
IOException
ParserConfigurationException
SAXException
Exception

OCR

public OCR(AttributeList list)
    throws IOException,
           ParserConfigurationException,
           SAXException,
           Exception
Throws:
IOException
ParserConfigurationException
SAXException
Exception

OCR

public OCR(AttributeList list,
           int debugLevel)
    throws IOException,
           ParserConfigurationException,
           SAXException,
           Exception
Throws:
IOException
ParserConfigurationException
SAXException
Exception

OCR

public OCR(AttributeList list,
           String fileNameOfKnownGlyphs,
           String fileNameToRecordNewGlyphs,
           int debugLevel)
    throws IOException,
           ParserConfigurationException,
           SAXException,
           Exception
Throws:
IOException
ParserConfigurationException
SAXException
Exception

OCR

public OCR(BufferedImage image,
           String fileNameOfKnownGlyphs,
           String fileNameToRecordNewGlyphs,
           int debugLevel)
    throws IOException,
           ParserConfigurationException,
           SAXException,
           Exception
Throws:
IOException
ParserConfigurationException
SAXException
Exception
Method Detail

getCommonAttributeList

public AttributeList getCommonAttributeList()

getEightBitImageSuitableForThresholding

public static BufferedImage getEightBitImageSuitableForThresholding(AttributeList list,
                                                                    int debugLevel)
                                                             throws DicomException
Throws:
DicomException

doCommonConstructorStuff

protected void doCommonConstructorStuff(AttributeList list,
                                        String fileNameOfKnownGlyphs,
                                        String fileNameToRecordNewGlyphs,
                                        int debugLevel)
                                 throws IOException,
                                        ParserConfigurationException,
                                        SAXException,
                                        Exception
Throws:
IOException
ParserConfigurationException
SAXException
Exception

doCommonConstructorStuff

protected void doCommonConstructorStuff(AttributeList list,
                                        BufferedImage image,
                                        String fileNameOfKnownGlyphs,
                                        String fileNameToRecordNewGlyphs,
                                        int debugLevel)
                                 throws IOException,
                                        ParserConfigurationException,
                                        SAXException,
                                        Exception
Throws:
IOException
ParserConfigurationException
SAXException
Exception

toString

public String toString()
Overrides:
toString in class Object

isGEDoseScreenSeriesNumber

protected static boolean isGEDoseScreenSeriesNumber(String seriesNumber)

isPossiblyGEDoseScreenSeries

public static boolean isPossiblyGEDoseScreenSeries(String manufacturer,
                                                   String modality,
                                                   String seriesNumber,
                                                   String seriesDescription)

isPossiblyGEDoseScreenSeries

public static boolean isPossiblyGEDoseScreenSeries(AttributeList list)

isPossiblyGEDoseScreenInstance

public static boolean isPossiblyGEDoseScreenInstance(String manufacturer,
                                                     String sopClassUID,
                                                     String imageType)

isPossiblyGEDoseScreenInstance

public static boolean isPossiblyGEDoseScreenInstance(AttributeList list)

isGEDoseScreenInstance

public static boolean isGEDoseScreenInstance(AttributeList list)

isPossiblySiemensDoseScreenSeries

public static boolean isPossiblySiemensDoseScreenSeries(String manufacturer,
                                                        String modality,
                                                        String seriesNumber,
                                                        String seriesDescription)

isPossiblySiemensDoseScreenSeries

public static boolean isPossiblySiemensDoseScreenSeries(AttributeList list)

isPossiblySiemensDoseScreenInstance

public static boolean isPossiblySiemensDoseScreenInstance(String manufacturer,
                                                          String sopClassUID,
                                                          String imageType)

isPossiblySiemensDoseScreenInstance

public static boolean isPossiblySiemensDoseScreenInstance(AttributeList list)

isSiemensDoseScreenInstance

public static boolean isSiemensDoseScreenInstance(AttributeList list)

isPossiblyToshibaDoseScreenSeries

public static boolean isPossiblyToshibaDoseScreenSeries(String manufacturer,
                                                        String modality,
                                                        String seriesNumber,
                                                        String seriesDescription)

isPossiblyToshibaDoseScreenSeries

public static boolean isPossiblyToshibaDoseScreenSeries(AttributeList list)

isPossiblyToshibaDoseScreenInstance

public static boolean isPossiblyToshibaDoseScreenInstance(String manufacturer,
                                                          String sopClassUID,
                                                          String imageType)

isPossiblyToshibaDoseScreenInstance

public static boolean isPossiblyToshibaDoseScreenInstance(AttributeList list)

isToshibaDoseScreenInstance

public static boolean isToshibaDoseScreenInstance(AttributeList list)

isPossiblyDoseScreenSeries

public static boolean isPossiblyDoseScreenSeries(String manufacturer,
                                                 String modality,
                                                 String seriesNumber,
                                                 String seriesDescription)

isPossiblyDoseScreenSeries

public static boolean isPossiblyDoseScreenSeries(AttributeList list)

isPossiblyDoseScreenInstance

public static boolean isPossiblyDoseScreenInstance(String manufacturer,
                                                   String sopClassUID,
                                                   String imageType)

isPossiblyDoseScreenInstance

public static boolean isPossiblyDoseScreenInstance(AttributeList list)

isDoseScreenInstance

public static boolean isDoseScreenInstance(AttributeList list)

getCTDoseFromOCROfGEDoseScreen

public static CTDose getCTDoseFromOCROfGEDoseScreen(OCR ocr,
                                                    int debugLevel,
                                                    String startDateTime,
                                                    String endDateTime,
                                                    CTIrradiationEventDataFromImages eventDataFromImages,
                                                    boolean buildSR)
                                             throws IOException
Throws:
IOException

getCTDoseFromOCROfSiemensDoseScreen

public static CTDose getCTDoseFromOCROfSiemensDoseScreen(OCR ocr,
                                                         int debugLevel,
                                                         String startDateTime,
                                                         String endDateTime,
                                                         CTIrradiationEventDataFromImages eventDataFromImages,
                                                         boolean buildSR)
                                                  throws IOException
Throws:
IOException

getCTDoseFromOCROfToshibaDoseScreen

public static CTDose getCTDoseFromOCROfToshibaDoseScreen(OCR ocr,
                                                         int debugLevel,
                                                         String startDateTime,
                                                         String endDateTime,
                                                         CTIrradiationEventDataFromImages eventDataFromImages,
                                                         boolean buildSR)
                                                  throws IOException
Throws:
IOException

getCTDoseFromOCROfDoseScreen

public static CTDose getCTDoseFromOCROfDoseScreen(OCR ocr,
                                                  int debugLevel,
                                                  CTIrradiationEventDataFromImages eventDataFromImages,
                                                  boolean buildSR)
                                           throws IOException
Throws:
IOException

main

public static final void main(String[] arg)

Extract the CT dose information in a screen save image using optical character recognition, correlate it with any acquired CT slice images.

Parameters:
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 to then optionally the debug level