Class DICOM_AAssociateRQ

Direct Known Subclasses:
DICOM_AAssociateAC

public class DICOM_AAssociateRQ extends DICOM_PDUType
DICOM Association Request PDU Type class.
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 Details

    • appContext

      protected DICOM_PDUItemType appContext
      Application context PDU type.
    • calledAppTitle

      protected byte[] calledAppTitle
      The called application entity name, must be 16 or less characters.
    • callingAppTitle

      protected byte[] callingAppTitle
      The calling application entity name, must be 16 or less characters.
    • presContexts

      protected Vector<DICOM_PresentationContext> presContexts
      A list of presentation context objects.
    • protocolVersion

      protected int protocolVersion
      Protocol version identifier.
    • reserved2

      protected byte[] reserved2
      Reserved by array.
    • reserved3

      protected byte[] reserved3
      Reserved by array.
    • userInfo

      protected DICOM_UserInformation userInfo
      User information structure.
  • Constructor Details

    • DICOM_AAssociateRQ

      public DICOM_AAssociateRQ()
      Creates a new DICOM_AAssociateRQ object.
  • Method Details

    • addPresentationContext

      public void addPresentationContext(DICOM_PresentationContext pc)
      Adds a presentation object to a vector list of presentation contexts.
      Parameters:
      pc - presentation context object to be added
    • clearPresentationContexts

      public void clearPresentationContexts()
      Removes all elements from the presentation contexts vector list.
    • getApplicationContext

      public DICOM_PDUItemType getApplicationContext()
      Accessor to return the application context.
      Returns:
      the application context
    • getCalledAppTitle

      public byte[] getCalledAppTitle()
      Accessor to return the called application entity title.
      Returns:
      the called application's entity title in an array of bytes (invalid input: '<'= 16)
    • getCallingAppTitle

      public byte[] getCallingAppTitle()
      Accessor to return the calling application entity title.
      Returns:
      the calling application's entity title in an array of bytes (invalid input: '<'= 16)
    • getPresentationContextFromID

      public String getPresentationContextFromID(int ID)
      Gets a presentation context ID for a given abstrax syntax.
      Parameters:
      ID - the abstract syntax UID
      Returns:
      the presentation context ID
    • getPresentationContextID

      public byte getPresentationContextID(String transferSyntax, String absUID) throws DICOM_Exception
      Gets a presentation context ID for a given abstrax syntax.
      Parameters:
      absUID - the abstract syntax UID
      Returns:
      the presentation context ID
      Throws:
      DICOM_Exception - unknown presentation context ID
    • getPresentationContextID

      public byte getPresentationContextID(String absUID) throws DICOM_Exception
      Gets a presentation context ID for a given abstrax syntax.
      Parameters:
      absUID - the abstract syntax UID
      Returns:
      the presentation context ID
      Throws:
      DICOM_Exception - unknown presentation context ID
    • getPresentationContexts

      public Vector<DICOM_PresentationContext> getPresentationContexts()
      Accessor to return the presentation context.
      Returns:
      the application context
    • getUserInformation

      public DICOM_UserInformation getUserInformation()
      Accessor to return User Information.
      Returns:
      the user information for this PDU type
    • length

      public int length()
      Calculates length of message.
      Overrides:
      length in class DICOM_PDUTypeBase
      Returns:
      the length of the message including application context + presentation context(s) + userInfo
    • readBody

      public void readBody(DICOM_Comms connection) throws DICOM_Exception
      Reads the body of an association request.
      Specified by:
      readBody in class DICOM_PDUTypeBase
      Parameters:
      connection - the I/O Buffer to read from
      Throws:
      DICOM_Exception - unknown PDUType
    • setApplicationContext

      public void setApplicationContext(DICOM_PDUItemType appContext)
      Sets the application context.
      Parameters:
      appContext - the application context
    • setApplicationContextUID

      public void setApplicationContextUID(String UID)
      Sets the application context's UID.
      Parameters:
      UID - the application context's UID
    • setCalledAppTitle

      public void setCalledAppTitle(byte[] calledApp)
      Sets the called application entity title.
      Parameters:
      calledApp - the called application entity title
    • setCallingAppTitle

      public void setCallingAppTitle(byte[] callingApp)
      Sets the calling application entity title.
      Parameters:
      callingApp - the calling application entity title
    • setUserInformation

      public void setUserInformation(DICOM_UserInformation userInformation)
      Sets the user information.
      Parameters:
      userInformation - the user information
    • writeBody

      public void writeBody(DICOM_Comms connection) throws DICOM_Exception
      Writes the body of the association request.
      Specified by:
      writeBody in class DICOM_PDUTypeBase
      Parameters:
      connection - the I/O Buffer to write to
      Throws:
      DICOM_Exception - problem with writing association request