Package gov.nih.mipav.model.dicomcomm
Class DICOM_PDUItemType
java.lang.Object
gov.nih.mipav.model.dicomcomm.DICOM_PDUTypeBase
gov.nih.mipav.model.dicomcomm.DICOM_PDUItemType
- Direct Known Subclasses:
DICOM_AsyncOpWindowSubItem,DICOM_MaximumSubLength,DICOM_PresentationContext,DICOM_PresentationContextAccept,DICOM_SCPSCURoleSelect,DICOM_UserInformation
This class implements a 2 byte item length (DICOM_PDUType implements 4 byte item length. See DICOM_PDUTypeBase for
the methods that are required for new classes that extend this class.
This DICOM communication package was originally based on the Java Dicom Package, whose license is below:
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 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, reserved2, reserved3, reserved4, UID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcalcSize()Calculates the PDU item type size.voidreadBody(DICOM_Comms connection) Reads the body (i.e.bytereadHeader(DICOM_Comms connection) Reads the PDU item header.voidwriteBody(DICOM_Comms connection) Writes the body of the item type.voidwriteHeader(DICOM_Comms connection) Writes the header of the item type.Methods inherited from class gov.nih.mipav.model.dicomcomm.DICOM_PDUTypeBase
convertItemTypeToString, getUID, length, read, setUID, write
-
Constructor Details
-
DICOM_PDUItemType
public DICOM_PDUItemType(byte itemType) Creates a new DICOM_PDUItemType object.- Parameters:
itemType- The PDU item type.
-
-
Method Details
-
calcSize
public int calcSize()Calculates the PDU item type size.- Specified by:
calcSizein classDICOM_PDUTypeBase- Returns:
- The size = type + reserved + item length + (length)
-
readBody
Reads the body (i.e. UID) of the item type- Specified by:
readBodyin classDICOM_PDUTypeBase- Parameters:
connection- DOCUMENT ME!Connection- to read from- Throws:
DICOM_Exception- DOCUMENT ME!
-
readHeader
Reads the PDU item header.- Specified by:
readHeaderin classDICOM_PDUTypeBase- Parameters:
connection- DOCUMENT ME!Connection- the connection to read from- Returns:
- The PDU item type
- Throws:
DICOM_Exception- DOCUMENT ME!
-
writeBody
Writes the body of the item type.- Specified by:
writeBodyin classDICOM_PDUTypeBase- Parameters:
connection- to write to- Throws:
DICOM_Exception- DOCUMENT ME!
-
writeHeader
Writes the header of the item type.- Specified by:
writeHeaderin classDICOM_PDUTypeBase- Parameters:
connection- to write to
-