Class MoveSOPClassSCU


  • public class MoveSOPClassSCU
    extends SOPClass

    This class implements the SCU role of C-MOVE SOP Classes.

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

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

    For example, to have MOVESCU command MOVESCP to move a single image instance to STORESCP:

    try {
        AttributeList identifier = new AttributeList();
        { AttributeTag t = TagFromName.QueryRetrieveLevel; Attribute a = new CodeStringAttribute(t); a.addValue("IMAGE"); identifier.put(t,a); }
        { AttributeTag t = TagFromName.StudyInstanceUID; Attribute a = new UniqueIdentifierAttribute(t); a.addValue("1.3.6.1.4.1.5962.1.2.0.1064923879.2077.3232235877"); identifier.put(t,a); }
        { AttributeTag t = TagFromName.SeriesInstanceUID; Attribute a = new UniqueIdentifierAttribute(t); a.addValue("1.3.6.1.4.1.5962.1.3.0.0.1064923879.2077.3232235877"); identifier.put(t,a); }
        { AttributeTag t = TagFromName.SOPInstanceUID; Attribute a = new UniqueIdentifierAttribute(t); a.addValue("1.3.6.1.4.1.5962.1.1.0.0.0.1064923879.2077.3232235877"); identifier.put(t,a); }
        new MoveSOPClassSCU("theirhost","104","MOVESCP","MOVESCU","STORESCP",SOPClass.StudyRootQueryRetrieveInformationModelMove,identifier,0);
    }
    catch (Exception e) {
        e.printStackTrace(System.err);
    }
     
    • Constructor Detail

      • MoveSOPClassSCU

        public MoveSOPClassSCU​(Association association,
                               java.lang.String moveDestination,
                               java.lang.String affectedSOPClass,
                               AttributeList identifier,
                               int debugLevel)
                        throws DicomNetworkException,
                               DicomException,
                               java.io.IOException
        Parameters:
        association - the already established Association to use
        moveDestination - the AE Title of the Storage AE to which the instances are to be sent
        affectedSOPClass - the SOP Class defining which retrieve model, e.g. SOPClass.StudyRootQueryRetrieveInformationModelMove
        identifier - the list of unique keys and move level
        debugLevel - zero for no debugging messages, higher values more verbose messages
        Throws:
        java.io.IOException
        DicomException
        DicomNetworkException
      • MoveSOPClassSCU

        public MoveSOPClassSCU​(java.lang.String hostname,
                               int port,
                               java.lang.String calledAETitle,
                               java.lang.String callingAETitle,
                               java.lang.String moveDestination,
                               java.lang.String affectedSOPClass,
                               AttributeList identifier,
                               int debugLevel)
                        throws DicomNetworkException,
                               DicomException,
                               java.io.IOException
        Parameters:
        hostname - their hostname or IP address
        port - their port
        calledAETitle - their AE Title
        callingAETitle - our AE Title
        moveDestination - the AE Title of the Storage AE to which the instances are to be sent
        affectedSOPClass - the SOP Class defining which retrieve model, e.g. SOPClass.StudyRootQueryRetrieveInformationModelMove
        identifier - the list of unique keys and move level
        debugLevel - zero for no debugging messages, higher values more verbose messages
        Throws:
        java.io.IOException
        DicomException
        DicomNetworkException
    • Method Detail

      • getStatus

        public int getStatus()
      • getSuitableAssociation

        public static Association getSuitableAssociation​(java.lang.String hostname,
                                                         int port,
                                                         java.lang.String calledAETitle,
                                                         java.lang.String callingAETitle,
                                                         java.lang.String affectedSOPClass,
                                                         int debugLevel)
                                                  throws DicomNetworkException,
                                                         DicomException,
                                                         java.io.IOException
        Parameters:
        hostname - their hostname or IP address
        port - their port
        calledAETitle - their AE Title
        callingAETitle - our AE Title
        affectedSOPClass - the SOP Class defining which retrieve model, e.g. SOPClass.StudyRootQueryRetrieveInformationModelMove
        debugLevel - zero for no debugging messages, higher values more verbose messages
        Throws:
        java.io.IOException
        DicomException
        DicomNetworkException
      • main

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

        For testing, establish an association to the specified AE and perform a retrieval using a C-MOVE request.

        Parameters:
        arg - array of seven, eight or nine strings - their hostname, their port, their AE Title, our AE Title, the destination AE, the move level (STUDY, SERIES or IMAGE), then the Study Instance UID, optionally the Series Instance UID (if SERIES) and optionally the SOP Instance UID (if IMAGE)