public class Item extends java.lang.Object implements IItem
| Constructor and Description |
|---|
Item()
This constructor creates SQ with default TransferSyntax
|
Item(IDictionaryReader objDictionaryReader)
This constructor creates SQ with default TransferSyntax and specified DictionaryReader
|
Item(ITransferSyntax objTransferSyntax)
This constructor creates SQ with specified TransferSyntax
|
Item(ITransferSyntax objTransferSyntax,
IDictionaryReader objDictionaryReader)
This constructor creates SQ with specified transferSyntax and specified DictionaryReader
|
| Modifier and Type | Method and Description |
|---|---|
int |
addDataElement(IDataElement objIDataElement)
This method adds DataElement into the Item of SQ
|
void |
changeToUndefined()
This function sets the Value length to -1.
|
java.lang.Object |
clone()
Create similar object of this class.
|
boolean |
contains(int iGroupNumber,
int iElementNumber)
Checks whether the DataElement with the specified Group and Element numbers is present or not
|
void |
dumpDICOMInfo(IDicomStream objIDicomStream)
Dumps the Items of Sequence in readable form.
|
IDataElement |
getDataForTag(int iGroupNumber,
int iElementNumber)
Retrieves the DataElement for the specified Group and Element numbers
|
IDictionaryReader |
getDictionaryReader()
Retrieves the Dictionary reader set in the Item
|
int |
getItemLength()
This method provides a mechanism to set the item length when the item value length is provided.
|
ITransferSyntax |
getTransferSyntax()
Retrieves the TransferSyntax specified by DICO Standard
|
java.lang.Object |
getValue(int iGroupNumber,
int iElementNumber)
This method returns value of DicomValue.
|
int |
getValueLength()
Retrieves the value length of the item.
|
ICollectionIterator<IDataElement> |
iterator()
Provides iterator over the collection of DataElements
|
int |
read(IDicomStream objIDicomStream,
int iItemLength)
Reads the Item from the underlying stream as specified in the DICOM Standard
|
void |
setDictionaryReader(IDictionaryReader objIDictReader)
Sets the DictionaryReader into the Item
|
void |
setTransferSyntax(ITransferSyntax objITransferSyntax)
Sets the TransferSyntax specified by DICOM Standard
|
int |
setValue(IPairedCollection<ITag,IDataElement> objPairedCollection_)
Sets the custom paired collection of tag and DataElement into the Item
|
ICollectionIterator<IDataElement> |
sortedIterator()
Provides sorted iterator over the collection of DataElements
|
boolean |
validate()
Validates the Item for the rules of module.
|
boolean |
validateForModule()
Validates the Item for the rules of module.
|
int |
write(IDicomStream objIDicomStream)
Get the DataElements from the HashMap and call serialize on each
dataelement individually.
|
public Item()
public Item(ITransferSyntax objTransferSyntax)
objTransferSyntax - TransferSyntax specified by DICOM Standardpublic Item(IDictionaryReader objDictionaryReader)
objDictionaryReader - DictionaryReader specifies the reader specified by user
which will read from dictionarypublic Item(ITransferSyntax objTransferSyntax, IDictionaryReader objDictionaryReader)
objTransferSyntax - TransferSyntax specified by DICOM StandardobjDictionaryReader - DictionaryReader specifies the reader specified by user
which will read from dictionarypublic int getItemLength()
getItemLength in interface IItemiItemValueLength - length of the value of the item which excludes the Item major and minor tagspublic int getValueLength()
getValueLength in interface IItempublic void setTransferSyntax(ITransferSyntax objITransferSyntax)
setTransferSyntax in interface IItemobjITransferSyntax - TransferSyntax specified by DICOM Standardpublic ITransferSyntax getTransferSyntax()
getTransferSyntax in interface IItempublic int addDataElement(IDataElement objIDataElement)
addDataElement in interface IItemobjIDataElement - Object of dataelement to addpublic void setDictionaryReader(IDictionaryReader objIDictReader)
setDictionaryReader in interface IItemobjIDictReader - object of Dictionary Reader to be used by the Itempublic IDictionaryReader getDictionaryReader()
getDictionaryReader in interface IItempublic int read(IDicomStream objIDicomStream, int iItemLength) throws InvalidItemException, java.io.IOException
read in interface IItemobjIDicomStream - stream from which the Item is to be writteniItemLength - length of the DicomValue to be read from the streamInvalidItemException - Signals Item Validation is failed.java.io.IOException - Signals that an I/O exception of some sort has occurred.public int write(IDicomStream objIDicomStream) throws java.io.IOException
public ICollectionIterator<IDataElement> iterator()
iterator in interface ICollectionIterable<IDataElement>iterator in interface java.lang.Iterable<IDataElement>public ICollectionIterator<IDataElement> sortedIterator()
public IDataElement getDataForTag(int iGroupNumber, int iElementNumber)
getDataForTag in interface IItemiGroupNumber - specifies the Group Number.iElementNumber - specifies the Element Number.public boolean contains(int iGroupNumber,
int iElementNumber)
public boolean validateForModule()
throws InvalidItemException
validateForModule in interface IItemInvalidItemException - Signals Item Validation is failed.public boolean validate()
throws InvalidItemException
validate in interface IItemInvalidItemException - Signals Item Validation is failed.public int setValue(IPairedCollection<ITag,IDataElement> objPairedCollection_) throws InvalidItemException
setValue in interface IItemobjPairedCollection_ - paired collection of Tag and DataElement representing the collection of DataElementsInvalidItemException - Signals Item Validation is failed.public java.lang.Object getValue(int iGroupNumber,
int iElementNumber)
public java.lang.Object clone()
public void dumpDICOMInfo(IDicomStream objIDicomStream) throws java.io.IOException
dumpDICOMInfo in interface IItemobjIDicomStream - - the Stream on which the Data is to be written.java.io.IOException - - Exception is thrown indicating runtime failure of writing operation.public void changeToUndefined()