Package gov.nih.mipav.model.dicomcomm
Class DICOM_AAssociateRQ
- java.lang.Object
-
- gov.nih.mipav.model.dicomcomm.DICOM_PDUTypeBase
-
- gov.nih.mipav.model.dicomcomm.DICOM_PDUType
-
- gov.nih.mipav.model.dicomcomm.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 Summary
Fields Modifier and Type Field Description protected DICOM_PDUItemType
appContext
Application context PDU type.protected byte[]
calledAppTitle
The called application entity name, must be 16 or less characters.protected byte[]
callingAppTitle
The calling application entity name, must be 16 or less characters.protected java.util.Vector<DICOM_PresentationContext>
presContexts
A list of presentation context objects.protected int
protocolVersion
Protocol version identifier.protected byte[]
reserved2
Reserved by array.protected byte[]
reserved3
Reserved by array.protected DICOM_UserInformation
userInfo
User information structure.-
Fields inherited from class gov.nih.mipav.model.dicomcomm.DICOM_PDUTypeBase
itemType, length, PDUTYPE_AAbortRQ, PDUTYPE_AAssociateAC, PDUTYPE_AAssociateRJ, PDUTYPE_AAssociateRQ, PDUTYPE_AbstractSyntax, PDUTYPE_ApplicationContext, PDUTYPE_AReleaseRQ, PDUTYPE_AReleaseRSP, PDUTYPE_AsyncOpWindowSubItem, PDUTYPE_ImplementationClass, PDUTYPE_ImplementationVersion, PDUTYPE_MaximumSubLength, PDUTYPE_PDataTF, PDUTYPE_PresentationContext, PDUTYPE_PresentationContextAccept, PDUTYPE_SCPSCURoleSelect, PDUTYPE_TransferSyntax, PDUTYPE_UNKNOWN, PDUTYPE_UserInformation, RESERVED, reserved1, reserved4, UID
-
-
Constructor Summary
Constructors Constructor Description DICOM_AAssociateRQ()
Creates a new DICOM_AAssociateRQ object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPresentationContext(DICOM_PresentationContext pc)
Adds a presentation object to a vector list of presentation contexts.void
clearPresentationContexts()
Removes all elements from the presentation contexts vector list.DICOM_PDUItemType
getApplicationContext()
Accessor to return the application context.byte[]
getCalledAppTitle()
Accessor to return the called application entity title.byte[]
getCallingAppTitle()
Accessor to return the calling application entity title.java.lang.String
getPresentationContextFromID(int ID)
Gets a presentation context ID for a given abstrax syntax.byte
getPresentationContextID(java.lang.String absUID)
Gets a presentation context ID for a given abstrax syntax.byte
getPresentationContextID(java.lang.String transferSyntax, java.lang.String absUID)
Gets a presentation context ID for a given abstrax syntax.java.util.Vector<DICOM_PresentationContext>
getPresentationContexts()
Accessor to return the presentation context.DICOM_UserInformation
getUserInformation()
Accessor to return User Information.int
length()
Calculates length of message.void
readBody(DICOM_Comms connection)
Reads the body of an association request.void
setApplicationContext(DICOM_PDUItemType appContext)
Sets the application context.void
setApplicationContextUID(java.lang.String UID)
Sets the application context's UID.void
setCalledAppTitle(byte[] calledApp)
Sets the called application entity title.void
setCallingAppTitle(byte[] callingApp)
Sets the calling application entity title.void
setUserInformation(DICOM_UserInformation userInformation)
Sets the user information.void
writeBody(DICOM_Comms connection)
Writes the body of the association request.-
Methods inherited from class gov.nih.mipav.model.dicomcomm.DICOM_PDUType
calcSize, readHeader, writeHeader
-
Methods inherited from class gov.nih.mipav.model.dicomcomm.DICOM_PDUTypeBase
convertItemTypeToString, getUID, read, setUID, write
-
-
-
-
Field Detail
-
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 java.util.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.
-
-
Method Detail
-
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 (<= 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 (<= 16)
-
getPresentationContextFromID
public java.lang.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(java.lang.String transferSyntax, java.lang.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(java.lang.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 java.util.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 classDICOM_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 classDICOM_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(java.lang.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 classDICOM_PDUTypeBase
- Parameters:
connection
- the I/O Buffer to write to- Throws:
DICOM_Exception
- problem with writing association request
-
-