Class ReceivedObjectHandler

java.lang.Object
com.pixelmed.network.ReceivedObjectHandler
Direct Known Subclasses:
DicomCleaner.OurReceivedObjectHandler, DoseReporterWithLegacyOCRAndAutoSendToRegistry.OurReceivedObjectHandler, DoseUtility.OurReceivedObjectHandler, DownloadOrTransmit.OurReceivedObjectHandler, InstanceReceiver.OurReceivedObjectHandler, LegacyRadiationDoseOCRDicomForwardingService.OurReceivedObjectHandler, StudyReceiver.OurReceivedObjectHandler, TestCleanerReceiveAndClean.OurReceivedObjectHandler, TestCMove.OurReceivedObjectHandler, TestCStore_AETs.OurReceivedObjectHandler, TestCStore_ConvertTransferSyntaxes.OurReceivedObjectHandler, TestCStore.OurReceivedObjectHandler

public abstract class ReceivedObjectHandler extends Object

This abstract class provides a mechanism for performing processing on a DICOM data set that has been completely received and stored in a file.

Typically a private sub-class would be declared and instantiated in an implementation using StorageSOPClassSCPDispatcher.

For example:

private class OurReceivedObjectHandler extends ReceivedObjectHandler {
    public void sendReceivedObjectIndication(String dicomFileName,String transferSyntax,String callingAETitle) throws DicomNetworkException, DicomException, IOException {
        if (dicomFileName != null) {
            System.err.println("Received: "+dicomFileName+" from "+callingAETitle+" in "+transferSyntax);
            try {
                DicomInputStream i = new DicomInputStream(new BufferedInputStream(new FileInputStream(dicomFileName)));
                AttributeList list = new AttributeList();
                list.read(i,TagFromName.PixelData);             // no need to read pixel data (much faster if one does not)
                                i.close();
                databaseInformationModel.insertObject(list,dicomFileName);
            } catch (Exception e) {
                slf4jlogger.error("", e);;
            }
        }
    }
}
 
See Also:
  • Constructor Details

    • ReceivedObjectHandler

      public ReceivedObjectHandler()
  • Method Details

    • sendReceivedObjectIndication

      public abstract void sendReceivedObjectIndication(String fileName, String transferSyntax, String callingAETitle) throws DicomNetworkException, DicomException, IOException

      Do something with the received data set stored in the specified file name.

      Parameters:
      fileName - where the received data set has been stored
      transferSyntax - the transfer syntax in which the data set was received and is stored
      callingAETitle - the AE title of the caller who sent the data set
      Throws:
      IOException
      DicomException
      DicomNetworkException