Trispark JDT
2.50.13

com.archimed.dicom.image
Class DicomImage

java.lang.Object
  extended by com.archimed.dicom.GroupList
      extended by com.archimed.dicom.DicomObject
          extended by com.archimed.dicom.image.DicomImage
Direct Known Subclasses:
SCImage

public class DicomImage
extends DicomObject

This class provides methods to construct a Dicom image, only the modules which are common to all DICOM image modalities, can be manipulated with this class.

Note: only required (type 1 & 2) attributes are mentioned, the rest can be set using the different sets provided in DicomObject.

Since:
18/02/1999

Field Summary
protected  JdtLogger log
           
 
Constructor Summary
DicomImage()
           
 
Method Summary
 void generalEquipmentData(java.lang.String manufacturer)
          Method to insert the General Equipment Module data into this DicomImage.
 void generalImageData(java.lang.String imageNumber)
          Method to insert the General Image Module data into this DicomImage.
 void generalSeriesData(java.lang.String modality, java.lang.String instanceUID, java.lang.String seriesNumber)
          Method to insert the General Series Module data into this DicomImage.
 void generalStudyData(java.lang.String instanceUID, java.lang.String date, java.lang.String time, java.lang.String physName, java.lang.String studyID, java.lang.String orderNumber)
          Method to insert the General Study Module data into this DicomImage.
 void imagePixelData(int rows, int cols, byte[] pixelData, byte[] red, byte[] green, byte[] blue)
          Method to insert the Image Pixel Module data into this DicomImage.
 void imagePixelData(int rows, int cols, int planarConf, byte[] pixelData)
          Inserts the Image Pixel Module data into the DICOM data set.
 void imagePixelData(int rows, int cols, int planarConf, int[] pixelData)
          basically does the same as imagePixelData(rows, cols, pc, pixels) but takes an int[] as argument for pixeldata.
 void imagePixelData(int rows, int cols, int bitsAlloc, int bitsStored, int highBit, byte[] pixelData)
          Method to insert the Image Pixel Module data into this DicomImage.
 void imagePixelData(int rows, int cols, int bitsAlloc, int bitsStored, int highBit, int[] pixelData)
          inserts the Image Pixel Module data into this DicomImage.
 void patientData(java.lang.String patientName, java.lang.String patientID, java.lang.String birthDate, java.lang.String sex)
          Method to insert the Patient Module data into this DicomImage.
 void sopCommonData(java.lang.String sopClassUID, java.lang.String sopInstanceUID)
          The method is used to set SOP Common Module Data
 
Methods inherited from class com.archimed.dicom.DicomObject
addATValue_ge, addATValue, addBigDecimal_ge, addBigDecimal, addBytes_ge, addBytes, addDouble_ge, addDouble, addFloat_ge, addFloat, addFloats_ge, addFloats, addInteger_ge, addInteger, addLong_ge, addLong, addPersonName_ge, addPersonName_ge, addPersonName, addPersonName, addSequenceItem_ge, addSequenceItem, addShort_ge, addShort, addString_ge, addString, append_ge, append, calculateOffset, deleteItem_ge, deleteItem_ge, deleteItem, deleteItem, dicomCharsets, dumpVRs, dumpVRs, get_ge, get_ge, get, get, getATValue_ge, getATValue, getBigDecimal_ge, getBigDecimal, getBytes_ge, getBytes, getDataElement, getDataElement, getDouble_ge, getDouble, getFileMetaInformation, getFloat_ge, getFloat, getFloats_ge, getFloats, getI_ge, getI_ge, getI, getI, getInteger_ge, getInteger, getLong_ge, getLong, getOffset, getParent, getPersonName_ge, getPersonName, getPreamble, getS_ge, getS_ge, getS, getS, getSeqItemLenState, getSeqLenState_ge, getSeqLenState, getSequenceItem_ge, getSequenceItem, getShort_ge, getShort, getSize_ge, getSize, getString_ge, getString_ge, getString, getString, getType_ge, getType, newDataElement_ge, newDataElement, read, read, read, remove_ge, remove, set_ge, set_ge, set, set, setATValue_ge, setATValue, setBigDecimal_ge, setBigDecimal, setBytes_ge, setBytes, setDouble_ge, setDouble, setFileMetaInformation, setFloat_ge, setFloat, setFloats_ge, setFloats, setInteger_ge, setInteger, setLong_ge, setLong, setPersonName_ge, setPersonName_ge, setPersonName, setPersonName, setPreamble, setSeqItemLenState, setSeqLenState_ge, setSeqLenState, setSequenceItem_ge, setSequenceItem, setShort_ge, setShort, setString_ge, setString, setType_ge, setType, write, write, write
 
Methods inherited from class com.archimed.dicom.GroupList
addGroups, clear, containsGroup, copyGroup, enumerateVRs, enumerateVRs, isEmpty, numberOfElements, numberOfGroups, removeGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected JdtLogger log
Constructor Detail

DicomImage

public DicomImage()
Method Detail

patientData

public void patientData(java.lang.String patientName,
                        java.lang.String patientID,
                        java.lang.String birthDate,
                        java.lang.String sex)
                 throws DicomException
Method to insert the Patient Module data into this DicomImage.

Parameters:
patientID - Primary hospital identification number or code for the patient
sex - Patient's sex. Allowed values: M (male), F (female), O (other)
Throws:
DicomException - is thrown when one of the given parameters has an invalid format.

generalStudyData

public void generalStudyData(java.lang.String instanceUID,
                             java.lang.String date,
                             java.lang.String time,
                             java.lang.String physName,
                             java.lang.String studyID,
                             java.lang.String orderNumber)
                      throws DicomException
Method to insert the General Study Module data into this DicomImage.

Parameters:
instanceUID - Unique identifier for the study
date - Date the study started
time - Time the study started
physName - Patient's referring Physician
studyID - User or equipment generated Study identifier
orderNumber - A RIS generated number which identifies the order for the Study
Throws:
DicomException - is thrown when one of the given parameters has an invalid format.

generalSeriesData

public void generalSeriesData(java.lang.String modality,
                              java.lang.String instanceUID,
                              java.lang.String seriesNumber)
                       throws DicomException
Method to insert the General Series Module data into this DicomImage.

Parameters:
modality - Type of equipment that originally acquired the data used to create the images in this Series. Two letter abbreviation e.g.: NM (nuclear medicine)
instanceUID - Unique identifier of the Series
seriesNumber - A number that identifies this Series
Throws:
DicomException - is thrown when one of the given parameters has an invalid format.

generalEquipmentData

public void generalEquipmentData(java.lang.String manufacturer)
Method to insert the General Equipment Module data into this DicomImage.

Parameters:
manufacturer - Manufacturer of the equipment that produced the image.

generalImageData

public void generalImageData(java.lang.String imageNumber)
                      throws DicomException
Method to insert the General Image Module data into this DicomImage.

Parameters:
imageNumber - A number that identifies this Image
Throws:
DicomException - is thrown when imageNumber does not represent an integer

imagePixelData

public void imagePixelData(int rows,
                           int cols,
                           int bitsAlloc,
                           int bitsStored,
                           int highBit,
                           byte[] pixelData)
                    throws DicomException
Method to insert the Image Pixel Module data into this DicomImage.
This method is intended for use with monochrome images

Parameters:
bitsAlloc - Number of bits allocated for each pixel sample. Only 8, 16, 24 and 32 bits are allowed
bitsStored - Number of bits stored for each pixel sample
highBit - Most significant bit for pixel sample data
pixelData - A byte array of the pixel data. All pixels have to be stored as unsigned integers (little endian encoding)
rows - height
cols - width
Throws:
DicomException - is thrown if one/some of the parameters are inconsistent

imagePixelData

public void imagePixelData(int rows,
                           int cols,
                           int bitsAlloc,
                           int bitsStored,
                           int highBit,
                           int[] pixelData)
                    throws DicomException
inserts the Image Pixel Module data into this DicomImage. Essentialy does the same as imagePixelData(int, int, int, int, int, byte[]) but takes an int[] as parameter for pixeldata.

Parameters:
rows - height
cols - width
Throws:
DicomException

imagePixelData

public void imagePixelData(int rows,
                           int cols,
                           int planarConf,
                           byte[] pixelData)
                    throws DicomException
Inserts the Image Pixel Module data into the DICOM data set.
This method is intended for use with RGB images.

Parameters:
rows - height
cols - width
planarConf - Planar Configuration, indicates in what order the R,G and B bytes are:
  • 0: R1,G1,B1,R2,G2,B2,....,Rn,Gn,Bn
  • 1: R1,R2,...,Rn,G1,G2,...,Gn,B1,B2,...,Bn
Throws:
DicomException

imagePixelData

public void imagePixelData(int rows,
                           int cols,
                           int planarConf,
                           int[] pixelData)
                    throws DicomException
basically does the same as imagePixelData(rows, cols, pc, pixels) but takes an int[] as argument for pixeldata.

Parameters:
rows - height
cols - width
planarConf -
pixelData -
Throws:
DicomException

imagePixelData

public void imagePixelData(int rows,
                           int cols,
                           byte[] pixelData,
                           byte[] red,
                           byte[] green,
                           byte[] blue)
                    throws DicomException
Method to insert the Image Pixel Module data into this DicomImage.
This method is intended for use with palette color images. It pads the LUTs to length 256, because otherwise most DICOM-viewers can't display the image properly. For Palette Color images of depth > 8, you'll have to use specific set methods.

Parameters:
pixelData - A byte array of the pixel data.
red - Red palette color LUT data
green - Green palette color LUT data
blue - Blue palette color LUT data
rows - height
cols - width
Throws:
DicomException - is thrown if one/some of the parameters are inconsistent

sopCommonData

public void sopCommonData(java.lang.String sopClassUID,
                          java.lang.String sopInstanceUID)
The method is used to set SOP Common Module Data

Parameters:
sopClassUID - Uniquely identifies the SOP Class if 'null' is given, the method uses 1.2.840.10008.5.1.4.1.1.7 which is the UID for Secondary Capture Image Storage.
sopInstanceUID - Uniquely identifies the SOP Instance.

Trispark JDT
2.50.13

Copyright © 1999-2008 Trispark. All Rights Reserved.