public class DataSet extends java.lang.Object implements IDataSet
| Constructor and Description |
|---|
DataSet()
This constructor constructs the data set with default transfer syntax and dictionary reader.
|
DataSet(IDictionaryReader objIDictionaryReader_)
This constructor creates DataSet with Dictionary Reader specified by the user .
|
DataSet(ITransferSyntax objITransferSyntax_)
This constructor creates DataSet with TransferSyntax specified by the user .
|
DataSet(ITransferSyntax objITransferSyntax_,
IDictionaryReader objIDictionaryReader_)
This constructor creates data set with given transfer syntax and dictionary reader.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addDataElement(IDataElement objIDataElement)
This method adds the DataElement to the DataSet
|
java.lang.Object |
clone()
Create similar object of this class.
|
void |
dispose()
This function disposes the Data Set.
|
void |
dumpDICOMInfo(IDicomStream objIDicomStream)
Dumps the contents of Data Set in readable form to the specified stream.
|
boolean |
equals(java.lang.Object objObject)
This method compares the DataElemnts of two DataSets.
|
byte[] |
getBytes(int iNumberOfBytes)
The implementation of this function gets the iNumberOfBytes of data set and returns byte array containing iNumberOfBytes.
|
IDataElement |
getDataForTag(int iGroupNumber,
int iElementNumber)
This method returns the DataElement for the specified tag
|
IDictionaryReader |
getDictionaryReader()
This method returns the DictionaryReader set in the DataSet
|
ImageElement |
getImageElement()
Retrieves the Image Element.
|
ISingleCollection<IDataElement> |
getInvalidDataElements()
Retrieves collection of invalid DataElements from DataSet.
|
java.lang.String |
getSOPClassUID()
This method returns the SOP Class UID which specifies the type of IOD related to the DataSet
|
ITransferSyntax |
getTransferSyntax()
This method returns the TransferSyntax set in the DataSet
|
java.lang.Object |
getValue(int iGroupNumber,
int iElementNumber)
This method returns value of DicomValue.
|
boolean |
isAvailable()
The implementation of this method returns iNumberOfBytes in a byte array.
|
boolean |
isEmpty()
The implementation of this method checks that dataset is empty or not.
|
boolean |
isPresent(int iGroupNumber,
int iElementNumber)
The implementation of this method checks that element is present in dataset or not.
|
ICollectionIterator<IDataElement> |
iterator()
Provides iterator over the collection of DataElements
|
void |
removeDataElement(IDataElement objIDataElement)
This method removes the data element from the data set.
|
void |
removeDataElement(ITag objITag)
This method removes the data element from the data set.
|
boolean |
validate()
validates the DataSet
|
public DataSet()
throws InvalidDataSetException
InvalidDataSetExceptionpublic DataSet(ITransferSyntax objITransferSyntax_)
objITransferSyntax_ - Transfer syntax of the Data set.public DataSet(IDictionaryReader objIDictionaryReader_)
objIDictionaryReader_ - Dictionary reader used by the data set.public DataSet(ITransferSyntax objITransferSyntax_, IDictionaryReader objIDictionaryReader_)
objITransferSyntax_ - Transfer syntax of the Data set.objIDictionaryReader_ - Dictionary reader used by the data set.public IDictionaryReader getDictionaryReader()
getDictionaryReader in interface IDataSetpublic IDataElement getDataForTag(int iGroupNumber, int iElementNumber)
getDataForTag in interface IDataSetiGroupNumber - - Group Number of the DataElementiElementNumber - - Element Number of the DataElementpublic ITransferSyntax getTransferSyntax()
getTransferSyntax in interface IDataSetpublic java.lang.String getSOPClassUID()
getSOPClassUID in interface IDataSetpublic int addDataElement(IDataElement objIDataElement) throws InvalidDataElementException
addDataElement in interface IDataSetobjIDataElement - instance of DataElement.InvalidDataElementExceptionpublic void removeDataElement(IDataElement objIDataElement)
removeDataElement in interface IDataSetobjIDataElement - Object of Data Element which is to be removed.public void removeDataElement(ITag objITag)
removeDataElement in interface IDataSetobjITag - Tag of data element which is to be removed.public ICollectionIterator<IDataElement> iterator()
iterator in interface ICollectionIterable<IDataElement>iterator in interface java.lang.Iterable<IDataElement>public boolean isPresent(int iGroupNumber,
int iElementNumber)
public boolean isEmpty()
public boolean validate()
throws InvalidDataSetException
validate in interface IDataSetInvalidDataSetException - - throws when the DataElements are not in proper orderpublic ISingleCollection<IDataElement> getInvalidDataElements()
getInvalidDataElements in interface IDataSetpublic boolean equals(java.lang.Object objObject)
public byte[] getBytes(int iNumberOfBytes)
throws java.io.IOException
public boolean isAvailable()
throws java.io.IOException
isAvailable in interface IDataSetiNumberOfBytes - No of bytes required.java.io.IOException - if IOException occurs.public java.lang.Object getValue(int iGroupNumber,
int iElementNumber)
public ImageElement getImageElement()
public void dispose()
throws java.io.IOException
public java.lang.Object clone()
public void dumpDICOMInfo(IDicomStream objIDicomStream) throws java.io.IOException
dumpDICOMInfo in interface IDataSetobjIDicomStream - - the Stream on which the Data is to be written.java.io.IOException - - Exception is thrown indicating runtime failure of writing operation.