Class TestSendingCommandAndDataInOnePDU

java.lang.Object
com.pixelmed.dicom.SOPClass
com.pixelmed.network.StorageSOPClassSCU
com.pixelmed.network.TestSendingCommandAndDataInOnePDU

public class TestSendingCommandAndDataInOnePDU extends StorageSOPClassSCU

This class implements the SCU role of SOP Classes of the Storage Service Class.

The class has no methods other than the constructor (and a main method for testing). The constructor establishes an association, sends the C-STORE request, and releases the association.

Debugging messages with a varying degree of verbosity can be activated.

For example:

try {
    new TestSendingCommandAndDataInOnePDU("theirhost","104","STORESCP","STORESCU","/tmp/testfile.dcm","1.2.840.10008.5.1.4.1.1.7","1.3.6.1.4.1.5962.1.1.0.0.0.1064923879.2077.3232235877",0,0);
}
catch (Exception e) {
    slf4jlogger.error("",e);
}
 
  • Constructor Details

    • TestSendingCommandAndDataInOnePDU

      protected TestSendingCommandAndDataInOnePDU() throws DicomNetworkException, DicomException, IOException

      Dummy constructor allows testing subclasses to use different constructor.

      Throws:
      DicomNetworkException
      DicomException
      IOException
    • TestSendingCommandAndDataInOnePDU

      public TestSendingCommandAndDataInOnePDU(String hostname, int port, String calledAETitle, String callingAETitle, String fileName, String affectedSOPClass, String affectedSOPInstance, int compressionLevel) throws DicomNetworkException, DicomException, IOException

      Establish an association to the specified AE, send the instance contained in the file, and release the association.

      Parameters:
      hostname - their hostname or IP address
      port - their port
      calledAETitle - their AE Title
      callingAETitle - our AE Title
      fileName - the name of the file containing the data set to send
      affectedSOPClass - must be the same as the SOP Class UID contained within the data set
      affectedSOPInstance - must be the same as the SOP Instance UID contained within the data set
      compressionLevel - 0=none,1=propose deflate,2=propose deflate and bzip2
      Throws:
      IOException
      DicomException
      DicomNetworkException
  • Method Details