public abstract class ReceivedObjectHandler
extends java.lang.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);; } } } }
StorageSOPClassSCP
,
StorageSOPClassSCPDispatcher
Constructor and Description |
---|
ReceivedObjectHandler() |
Modifier and Type | Method and Description |
---|---|
abstract void |
sendReceivedObjectIndication(java.lang.String fileName,
java.lang.String transferSyntax,
java.lang.String callingAETitle)
Do something with the received data set stored in the specified file name.
|
public abstract void sendReceivedObjectIndication(java.lang.String fileName, java.lang.String transferSyntax, java.lang.String callingAETitle) throws DicomNetworkException, DicomException, java.io.IOException
Do something with the received data set stored in the specified file name.
fileName
- where the received data set has been storedtransferSyntax
- the transfer syntax in which the data set was received and is storedcallingAETitle
- the AE title of the caller who sent the data setjava.io.IOException
DicomException
DicomNetworkException