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);;
}
}
}
}
StorageSOPClassSCP,
StorageSOPClassSCPDispatcher| Constructor and Description |
|---|
ReceivedObjectHandler() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
sendReceivedObjectIndication(String fileName,
String transferSyntax,
String callingAETitle)
Do something with the received data set stored in the specified file name.
|
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.
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 setIOExceptionDicomExceptionDicomNetworkException