Package gov.nih.mipav.model.dicomcomm
Class DICOM_Object
- java.lang.Object
-
- gov.nih.mipav.model.dicomcomm.DICOM_Object
-
public class DICOM_Object extends java.lang.Object
The DICOM data object for storing DICOM tags (i.e. groups, elements).
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/
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
DICOM_Object.GroupElements
Simple extension of the Hastable for use a GroupElements object.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Hashtable
groups
A hash table of the DICOM groupsprivate boolean
popGroupLength
Flag used to support processing of GroupLength tags (XXXX, 0000)
-
Constructor Summary
Constructors Constructor Description DICOM_Object()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Removes all VRs from hash table.DICOM_Object
copy()
Makes a deep copy of the DICOM_DataObject.void
finalize()
int
getInt16(int ddType)
Retrieves an integer (16 bit) value from a DICOM object.java.lang.String
getStr(int ddType)
Retrieves a string value from a DICOM object.private DICOM_VR
getVR(int grp, int elem)
Gets the value representation.java.lang.String
getVRString(int group, int element)
Returns the string representation of the VR.static int
makeEven(int length)
Makes length even.DICOM_VR
pop()
Pops a VR of the list.void
push(DICOM_VR vr)
Adds DICOM_VR to this list (object).void
setInt16(int ddType, int val)
Sets an integer (16 bit) value in a DICOM object.void
setStr(int ddType, java.lang.String s)
Sets a string value in a DICOM object.java.lang.String
toString()
Used for DICOM data objects.java.lang.String
toString(java.lang.String s)
Creates a description of the entire DICOM_VR list.
-
-
-
Method Detail
-
makeEven
public static final int makeEven(int length)
Makes length even.- Parameters:
length
- Value to make even- Returns:
- The even value
-
finalize
public void finalize()
- Overrides:
finalize
in classjava.lang.Object
-
clear
public final void clear()
Removes all VRs from hash table.
-
copy
public DICOM_Object copy()
Makes a deep copy of the DICOM_DataObject.- Returns:
- A deep copy of the DICOM_DataObject.
-
getInt16
public final int getInt16(int ddType)
Retrieves an integer (16 bit) value from a DICOM object.- Parameters:
ddType
- The DICOM data type to get.- Returns:
- the 16 bit integer value
-
getStr
public final java.lang.String getStr(int ddType)
Retrieves a string value from a DICOM object.- Parameters:
ddType
- The DICOM data type to get.- Returns:
- the string value
-
getVRString
public final java.lang.String getVRString(int group, int element)
Returns the string representation of the VR.- Parameters:
group
- Group valueelement
- Element value- Returns:
- The string representation VR for the group and element
-
pop
public DICOM_VR pop()
Pops a VR of the list.- Returns:
- vr The VR pop of the list.
-
push
public void push(DICOM_VR vr)
Adds DICOM_VR to this list (object).- Parameters:
vr
- the vr to be added to the list
-
setInt16
public final void setInt16(int ddType, int val)
Sets an integer (16 bit) value in a DICOM object.- Parameters:
ddType
- DOCUMENT ME!val
- the 16 bit integer value
-
setStr
public final void setStr(int ddType, java.lang.String s)
Sets a string value in a DICOM object.- Parameters:
ddType
- DOCUMENT ME!s
- the string value
-
toString
public java.lang.String toString()
Used for DICOM data objects.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String of important aspects of the data object
-
toString
public java.lang.String toString(java.lang.String s)
Creates a description of the entire DICOM_VR list.- Parameters:
s
- The str to append the debug string- Returns:
- The debug string
-
getVR
private DICOM_VR getVR(int grp, int elem)
Gets the value representation.- Parameters:
grp
- Group valueelem
- Element value- Returns:
- the VR for the group and element
-
-