Class StorageSOPClassSCUPerformanceTest


  • public class StorageSOPClassSCUPerformanceTest
    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 StorageSOPClassSCUPerformanceTest("theirhost","104","STORESCP","STORESCU","/tmp/testfile.dcm",0,0);
    }
    catch (Exception e) {
        slf4jlogger.error("",e);
    }
     
    • Constructor Detail

      • StorageSOPClassSCUPerformanceTest

        public StorageSOPClassSCUPerformanceTest​(java.lang.String hostname,
                                                 int port,
                                                 java.lang.String calledAETitle,
                                                 java.lang.String callingAETitle,
                                                 int ourMaximumLengthReceived,
                                                 int socketReceiveBufferSize,
                                                 int socketSendBufferSize,
                                                 int repeatCount,
                                                 int assocnCount,
                                                 int syntaxCount,
                                                 int contextCount,
                                                 java.lang.String[] fileNames)
                                          throws DicomNetworkException,
                                                 DicomException,
                                                 java.io.IOException

        Repeatedly establish an association to the specified AE, send the instance contained in the file the number of times specified, and release the association.

        Parameters:
        hostname - their hostname or IP address
        port - their port
        calledAETitle - their AE Title
        callingAETitle - our AE Title
        ourMaximumLengthReceived - the maximum PDU length that we will offer to receive
        socketReceiveBufferSize - the TCP socket receive buffer size to set (if possible), 0 means leave at the default
        socketSendBufferSize - the TCP socket send buffer size to set (if possible), 0 means leave at the default
        repeatCount - the number of times to repeat sending the file on the same association
        assocnCount - the number of times to repeat establishing the association and sending the file
        syntaxCount - the number of transfer syntaxes to propose for each additional presentation context at each association establishment
        contextCount - the number of additional presentation contexts to propose at each association establishment
        fileNames - the names of the file containing the data set to send
        Throws:
        java.io.IOException
        DicomException
        DicomNetworkException
    • Method Detail

      • main

        public static void main​(java.lang.String[] arg)

        For testing, establish an association to the specified AE and repeatedly C-STORE the same instance.

        The total number of times the file is transmitted consists of the number of repetitions per association times the number of association repetitions.

        Parameters:
        arg - array of 12 values - their hostname, their port, their AE Title, our AE Title, the maximum PDU length that we will offer to receive, the TCP socket receive buffer size to set (if possible), 0 means leave at the default, the TCP socket send buffer size to set (if possible), 0 means leave at the default, the number of times to repeat transmission on the same (each) association, the number of times to repeat establishment of the association and sending the file, the number of transfer syntaxes to propose for each additional presentation context at each association establishment, the number of additional presentation contexts to propose at each association establishment, and the directory to be recursively searched or a list of file names to send.