public class OWImageObject extends DicomValue
| Constructor and Description |
|---|
OWImageObject()
Default constructor initializes VR Type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFrame(byte[] arrByte)
This function will add the frame of the image data.
|
void |
addFrame(Frame objFrame)
This function will add the frame of the image data.
|
void |
addFrames(IDicomStream objIDicomStream,
int[] iArrSize)
This function will add all the frames of the image data present in the Dicom Stream.
|
void |
addFrames(ISingleCollection<byte[]> objFrameCollection)
This function will add all the frames of the image data.
|
void |
changeToUndefined()
This function sets the Value length to -1.
|
void |
dispose()
This function disposes OW Image Object.
|
void |
dumpDICOMInfo(IDicomStream objIDicomStream)
Dumps the value of OW Image Object as Hidden to the specified Stream.
|
byte[] |
getBytes(int iNumberOfBytes)
The implementation of this method Reads iNumberOfByte bytes from the file stream and returns byte array of iNumberOfByte.
|
byte[] |
getFrame(int index)
This method Retrieves the frame specified by the index.
|
boolean |
getFrame(int index,
IDicomStream objDicomStream)
This function retirves the Frame specified by the index in the Dicom Stream Provided by the User.
|
int |
getImageDataLength()
The implementation of this method gets the length of the image data.
|
long |
getMaxLength()
Retrieves the max length for OB DataType
|
int |
getNumberOfFrame()
The implementation of this method gets number of frames of a image.
|
java.lang.Object |
getValue()
This function returns the Image data in vector of byte array.
|
int[] |
getValue(IDicomStream objIDicomStream)
This function retirves the Image data in the Dicom Stream Provided by the User.
|
int |
getValueLength()
Retrieves Value length of OWImageObject.
|
boolean |
isAvailable()
This method gives information if OB image Object data is avalilabe.
|
boolean |
read(IDicomStream objIDicomStream,
int iOWLength)
This method reads OW in the structure -> OW Basic Offset Table with NO Item Value(Tag and Length)
then Item Tag, length and value for each frame specified in the offset table3.
|
void |
setValue(ISingleCollection<byte[]> objFrameCollection)
This function set the value of image data provided in vector of byte array.
|
boolean |
validate()
Validates OB DataType
|
boolean |
validate(java.lang.Object objValue)
Validates OB DataType
|
int |
write(IDicomStream objIDicomStream)
This method writes the series of byte buffers present in the OW datatype.
|
clone, getIVRType, getValueMultiplicity, setIVRType, setValuepublic int getNumberOfFrame()
public int getImageDataLength()
public int getValueLength()
getValueLength in interface IDicomValuegetValueLength in class DicomValuepublic java.lang.Object getValue()
getValue in interface IDicomValuegetValue in class DicomValuepublic int[] getValue(IDicomStream objIDicomStream)
objIDicomStream - Dicom Stream in which Image Data should be written and given to the user.public byte[] getFrame(int index)
throws java.io.IOException
index - index number of the frame. This should be between 1 and the no of frame present in the image.java.io.IOException - Signals IOException if IO Operation fails.public boolean getFrame(int index,
IDicomStream objDicomStream)
throws java.io.IOException
index - index number of the frame. This should be between 1 and the no of frame present in the image.objDicomStream - Dicom Stream provided by the user.java.io.IOException - Signals IOException if IO Operation fails.public void addFrame(byte[] arrByte)
throws java.io.IOException
arrByte - Byte array contianing the image data.java.io.IOException - throws IOException if the IO Operation fails.public void addFrame(Frame objFrame) throws java.io.IOException
objFrame - Object of Frame representing one frame of a image.java.io.IOException - throws IOException if the IO Operation fails.public void addFrames(ISingleCollection<byte[]> objFrameCollection) throws java.io.IOException
objFrameCollection - Vector of byte array containing the image data.java.io.IOException - throws IOException if the IO Operation fails.public void addFrames(IDicomStream objIDicomStream, int[] iArrSize) throws java.io.IOException
objIDicomStream - Dicom Stream provided by the user.iArrSize - Integer array containing the Size of each frame.java.io.IOException - throws IOException if the IO Operation fails.public void setValue(ISingleCollection<byte[]> objFrameCollection) throws java.io.IOException
objFrameCollection - Vector of byte array containing the image data.java.io.IOException - throws IOException if the IO Operation fails.public boolean read(IDicomStream objIDicomStream, int iOWLength) throws InvalidDataTypeException, java.io.IOException
read in interface IDicomValueread in class DicomValueobjIDicomStream - stream from which the Item is to be writteniOBLength - length of the DicomValue to be read from the streamInvalidDataTypeException - If data type validation fails.java.io.IOException - If Input/Output operation fails.public int write(IDicomStream objIDicomStream) throws java.io.IOException
write in interface IDicomValuewrite in class DicomValueobjIDicomStream - stream on which to write the DataElementsjava.io.IOException - If Input/Output operation fails.public byte[] getBytes(int iNumberOfBytes)
throws java.io.IOException
iNumberOfBytes - iNumberOfByte integer value of number of bytes required.java.io.IOException - If IO operation failspublic boolean isAvailable()
throws java.io.IOException
java.io.IOException - if IO operation failspublic boolean validate(java.lang.Object objValue)
throws ValidationException
validate in interface IDicomValuevalidate in class DicomValueobjValue - value of OB to be validatedValidationException - If validation of DataType fails.public boolean validate()
throws ValidationException
validate in interface IDicomValuevalidate in class DicomValueValidationException - If validation of DataType fails.public long getMaxLength()
public void dispose()
throws java.io.IOException
java.io.IOException - Signals if IO Operation fails.public void dumpDICOMInfo(IDicomStream objIDicomStream) throws java.io.IOException
objIDicomStream - - 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()