Class DICOM_PDUTypeBase

  • Direct Known Subclasses:
    DICOM_PDUItemType, DICOM_PDUType

    public abstract class DICOM_PDUTypeBase
    extends java.lang.Object
    DICOMPDUTypeBase abstract base class that is extended by DICOMPDUType and DICOMPDUItemType.
    This DICOM communication package was originally based on the Java Dicom Package, whose license is below:
     Java Dicom Package (com.zmed.dicom)
     
      Copyright (c) 1996-1997 Z Medical Imaging Systems, Inc.
     
      This software is provided, as is, for non-commercial educational
      purposes only.   Use or incorporation of this software or derivative
      works in commercial applications requires written consent from
      Z Medical Imaging Systems, Inc.
     
      Z MEDICAL IMAGING SYSTEMS MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT
      THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING
      BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
      FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR CONFORMANCE TO ANY
      SPECIFICATION OR STANDARD.  Z MEDICAL IMAGING SYSTEMS SHALL NOT BE
      LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING OR
      MODIFYING THIS SOFTWARE OR ITS DERIVATIVES.
     
      =============================================================================
     
      This software package is implemented similarly to the UC Davis public
      domain C++ DICOM implementation which contains the following copyright
      notice:
     
      Copyright (C) 1995, University of California, Davis
     
      THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND THE UNIVERSITY
      OF CALIFORNIA DOES NOT MAKE ANY WARRANTY ABOUT THE SOFTWARE, ITS
      PERFORMANCE, ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
      USE, FREEDOM FROM ANY COMPUTER DISEASES OR ITS CONFORMITY TO ANY
      SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF
      THE SOFTWARE IS WITH THE USER.
     
      Copyright of the software and supporting documentation is
      owned by the University of California, and free access
      is hereby granted as a license to use this software, copy this
      software and prepare derivative works based upon this software.
      However, any distribution of this software source code or
      supporting documentation or derivative works (source code and
      supporting documentation) must include this copyright notice.
     
      The UC Davis C++ source code is publicly available from the following
      anonymous ftp site:
     
      ftp://imrad.ucdmc.ucdavis.edu/pub/dicom/UCDMC/
     
    • Field Detail

      • PDUTYPE_AAssociateRQ

        public static final byte PDUTYPE_AAssociateRQ
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_AAssociateAC

        public static final byte PDUTYPE_AAssociateAC
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_AAssociateRJ

        public static final byte PDUTYPE_AAssociateRJ
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_AReleaseRQ

        public static final byte PDUTYPE_AReleaseRQ
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_AReleaseRSP

        public static final byte PDUTYPE_AReleaseRSP
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_AAbortRQ

        public static final byte PDUTYPE_AAbortRQ
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_ApplicationContext

        public static final byte PDUTYPE_ApplicationContext
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_PresentationContext

        public static final byte PDUTYPE_PresentationContext
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_PresentationContextAccept

        public static final byte PDUTYPE_PresentationContextAccept
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_AbstractSyntax

        public static final byte PDUTYPE_AbstractSyntax
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_TransferSyntax

        public static final byte PDUTYPE_TransferSyntax
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_UserInformation

        public static final byte PDUTYPE_UserInformation
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_MaximumSubLength

        public static final byte PDUTYPE_MaximumSubLength
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_ImplementationClass

        public static final byte PDUTYPE_ImplementationClass
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_AsyncOpWindowSubItem

        public static final byte PDUTYPE_AsyncOpWindowSubItem
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_SCPSCURoleSelect

        public static final byte PDUTYPE_SCPSCURoleSelect
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • PDUTYPE_ImplementationVersion

        public static final byte PDUTYPE_ImplementationVersion
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • itemType

        protected byte itemType
        DOCUMENT ME!
      • length

        protected int length
        DOCUMENT ME!
      • reserved1

        protected byte reserved1
        DOCUMENT ME!
      • reserved2

        protected byte reserved2
        DOCUMENT ME!
      • reserved3

        protected byte reserved3
        DOCUMENT ME!
      • reserved4

        protected byte reserved4
        DOCUMENT ME!
      • UID

        protected java.lang.String UID
        DOCUMENT ME!
    • Constructor Detail

      • DICOM_PDUTypeBase

        public DICOM_PDUTypeBase()
    • Method Detail

      • calcSize

        public abstract int calcSize()
        These methods must be implemented by each class that extends this class.
        Returns:
        DOCUMENT ME!
      • readHeader

        public abstract byte readHeader​(DICOM_Comms connection)
                                 throws DICOM_Exception
        DOCUMENT ME!
        Parameters:
        connection - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
        Throws:
        DICOM_Exception - DOCUMENT ME!
      • convertItemTypeToString

        public static java.lang.String convertItemTypeToString​(byte itemType)
        Converts item type to a readable string.
        Parameters:
        itemType - type defined above
        Returns:
        readable item type string
      • getUID

        public java.lang.String getUID()
        Gets the UID for a simple PDU type.
        Returns:
        the UID
      • length

        public int length()
        Calculates the PDU item's body size (not including the header).
        Returns:
        the UID's length
      • read

        public void read​(DICOM_Comms connection)
                  throws DICOM_Exception
        Reads the header and body of the PDU message from the connection.
        Parameters:
        connection - the connection where the data is read in
        Throws:
        DICOM_Exception - DOCUMENT ME!
      • setUID

        public void setUID​(java.lang.String UID)
        Sets the UID for a simple PDU type.
        Parameters:
        UID - DOCUMENT ME!
      • write

        public void write​(DICOM_Comms connection)
                   throws DICOM_Exception
        Writes the header and body of the PDU messages.
        Parameters:
        connection - the connection where the data sent out
        Throws:
        DICOM_Exception - DOCUMENT ME!