public class DicomInputStream extends FilterInputStream implements DicomInputHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
DicomInputStream.IncludeBulkData |
in| Constructor and Description |
|---|
DicomInputStream(File file) |
DicomInputStream(InputStream in) |
DicomInputStream(InputStream in,
String tsuid) |
available, markSupportedpublic DicomInputStream(InputStream in, String tsuid) throws IOException
IOExceptionpublic DicomInputStream(InputStream in) throws IOException
IOExceptionpublic DicomInputStream(File file) throws IOException
IOExceptionpublic final String getTransferSyntax()
public final int getAllocateLimit()
setAllocateLimit(int)public final void setAllocateLimit(int allocateLimit)
DicomInputStream, the byte array is reallocated with
twice the previous length and filled again. That continues until
the twice of the previous length exceeds the actual value length. Then
the byte array is reallocated with actual value length and filled with
the remaining bytes for the value from this DicomInputStream.
The rational of the incrementing allocation of byte arrays is to avoid
OutOfMemoryErrors on parsing corrupted DICOM streams.
By default, the limit is set to 67108864 (64 MiB).allocateLimit - limit of initial allocated memory or -1 for no limitpublic final String getURI()
public final void setURI(String uri)
public final DicomInputStream.IncludeBulkData getIncludeBulkData()
public final void setIncludeBulkData(DicomInputStream.IncludeBulkData includeBulkData)
public final BulkDataDescriptor getBulkDataDescriptor()
public final void setBulkDataDescriptor(BulkDataDescriptor bulkDataDescriptor)
public final String getBulkDataFilePrefix()
public final void setBulkDataFilePrefix(String blkFilePrefix)
public final String getBulkDataFileSuffix()
public final void setBulkDataFileSuffix(String blkFileSuffix)
public final File getBulkDataDirectory()
public final void setBulkDataDirectory(File blkDirectory)
public final boolean isConcatenateBulkDataFiles()
public final void setConcatenateBulkDataFiles(boolean catBlkFiles)
public final void setDicomInputHandler(DicomInputHandler handler)
public boolean isDecodeUNWithIVRLE()
public void setDecodeUNWithIVRLE(boolean decodeUNWithIVRLE)
public final void setFileMetaInformationGroupLength(byte[] val)
public final byte[] getPreamble()
public Attributes getFileMetaInformation() throws IOException
IOExceptionpublic final int level()
public final int tag()
public final VR vr()
public final int length()
public final long getPosition()
public void setPosition(long pos)
public long getTagPosition()
public final boolean bigEndian()
public final boolean explicitVR()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionpublic void mark(int readlimit)
mark in class FilterInputStreampublic void reset()
throws IOException
reset in class FilterInputStreamIOExceptionpublic final int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic final int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic final int read(byte[] b)
throws IOException
read in class FilterInputStreamIOExceptionpublic final long skip(long n)
throws IOException
skip in class FilterInputStreamIOExceptionpublic void skipFully(long n)
throws IOException
IOExceptionpublic void readFully(byte[] b)
throws IOException
IOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws IOException
IOExceptionpublic void readHeader()
throws IOException
IOExceptionpublic Attributes readCommand() throws IOException
IOExceptionpublic Attributes readDataset(int len, int stopTag) throws IOException
IOExceptionpublic Attributes readFileMetaInformation() throws IOException
IOExceptionpublic void readAttributes(Attributes attrs, int len, int stopTag) throws IOException
IOExceptionpublic void readValue(DicomInputStream dis, Attributes attrs) throws IOException
readValue in interface DicomInputHandlerIOExceptionpublic BulkData createBulkData() throws IOException
IOExceptionpublic boolean isBulkData(Attributes attrs)
public boolean isBulkDataFragment(Fragments frags)
public void readValue(DicomInputStream dis, Sequence seq) throws IOException
readValue in interface DicomInputHandlerIOExceptionpublic void readValue(DicomInputStream dis, Fragments frags) throws IOException
readValue in interface DicomInputHandlerIOExceptionpublic void startDataset(DicomInputStream dis)
startDataset in interface DicomInputHandlerpublic void endDataset(DicomInputStream dis)
endDataset in interface DicomInputHandlerpublic Attributes readItem() throws IOException
IOExceptionpublic byte[] readValue()
throws IOException
IOExceptionCopyright © 2014 dcm4che.org. All Rights Reserved.