public class DicomFileReader extends java.lang.Object implements IDicomFileReader
| Constructor and Description |
|---|
DicomFileReader(IDicomStream objIDicomStream_)
This constructor accepts DicomStream in which file is already set .
|
DicomFileReader(java.lang.String strFileNameWithPath)
This constructor creates a DicomFileReader by accepting file name with complete path
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getDataContents()
This method returns the DataSet present in the dicom file.
|
IDicomFileHeader |
getDicomFileHeader()
This method returns the Dicom File Header from the file attached to it, if this
method is called after parsing the file it returns the Dicom File Header read
while parsing the file.
|
int |
getHeaderLength()
This method returns the header length if present otherwise retuns 0.
|
int |
getPreamble(byte[] preamble)
This method checks whether the preamble is present, and if present reads the preamble
from the stream .
|
IDicomFileHeader |
readHeader()
This method returns the DicomFileHeader from the DicomFileReader
When called after parsing the Dicom File having DicomFileHeader, the
user can get the populated DicomFileHeader class object from the reader.
|
public DicomFileReader(java.lang.String strFileNameWithPath)
throws java.io.IOException
strFileNameWithPath - : The file with complete path.java.io.IOException - Signals that an I/O exception of some sort has occurred.public DicomFileReader(IDicomStream objIDicomStream_)
objIDicomStream_ - : The DicomStream in which file is already set.public int getPreamble(byte[] preamble)
throws java.io.IOException
getPreamble in interface IDicomFileReaderpreamble - Preamble in byte array.java.io.IOException - Signals that an I/O exception of some sort has occurred.public IDicomFileHeader readHeader() throws InvalidHeaderException, java.io.IOException
readHeader in interface IDicomFileReaderInvalidHeaderException - Signals that Dicom File Header is Corrupted.java.io.IOException - Signals that an I/O exception of some sort has occurred.public IDicomFileHeader getDicomFileHeader() throws java.io.IOException
getDicomFileHeader in interface IDicomFileReaderjava.io.IOException - Signals that an I/O exception of some sort has occurred.public byte[] getDataContents()
throws java.io.IOException
getDataContents in interface IDicomFileReaderjava.io.IOException - Signals that an I/O exception of some sort has occurred.public int getHeaderLength()
throws java.io.IOException
getHeaderLength in interface IDicomFileReaderjava.io.IOException - Signals that an I/O exception of some sort has occurred.