|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream java.io.FilterOutputStream org.dcm4che2.io.DicomOutputStream
public class DicomOutputStream
Field Summary |
---|
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary | |
---|---|
DicomOutputStream(java.io.DataOutput dout)
Use a DataOutput or ImageOutputStream as a destination. |
|
DicomOutputStream(java.io.File f)
|
|
DicomOutputStream(java.io.OutputStream out)
|
|
DicomOutputStream(java.io.RandomAccessFile raf)
|
Method Summary | |
---|---|
void |
close()
|
void |
finish()
Finishes writing compressed data to the output stream without closing the underlying stream. |
byte[] |
getPreamble()
|
long |
getStreamPosition()
|
TransferSyntax |
getTransferSyntax()
|
boolean |
isAutoFinish()
Indicate if the stream is finished automatically (compressed data written) when the dataset is written |
boolean |
isExplicitItemLength()
|
boolean |
isExplicitItemLengthIfZero()
|
boolean |
isExplicitSequenceLength()
|
boolean |
isExplicitSequenceLengthIfZero()
|
boolean |
isIncludeGroupLength()
|
void |
serializeDicomObject(DicomObject attrs)
Only for internal use by DicomObjectSerializer . |
void |
setAutoFinish(boolean autoFinish)
Set to false to not auto finish the stream on writing a data set - useful for writing a DataObject followed by some additonal DICOM that is custom written, eg images or related large data. |
void |
setExplicitItemLength(boolean explicitItemLength)
|
void |
setExplicitItemLengthIfZero(boolean explicitItemLengthIfZero)
|
void |
setExplicitSequenceLength(boolean explicitSequenceLength)
|
void |
setExplicitSequenceLengthIfZero(boolean explicitSequenceLengthIfZero)
|
void |
setIncludeGroupLength(boolean includeGroupLength)
|
void |
setPreamble(byte[] preamble)
|
void |
setStreamPosition(long pos)
|
void |
setTransferSyntax(java.lang.String tsuid)
|
void |
setTransferSyntax(TransferSyntax ts)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
void |
writeCommand(DicomObject attrs)
|
void |
writeDataset(DicomObject attrs,
java.lang.String tsuid)
Write a DICOM dataset to the output stream. |
void |
writeDataset(DicomObject attrs,
TransferSyntax transferSyntax)
Write a DICOM dataset to the output stream. |
void |
writeDicomFile(DicomObject attrs)
Write a DICOM object to the output stream using the specified DicomObject to obtain the transfer syntax UID and other
attributes. |
void |
writeFileMetaInformation(DicomObject attrs)
|
void |
writeHeader(int tag,
VR vr,
int len)
|
void |
writeItem(DicomObject item,
TransferSyntax transferSyntax)
Write an item (DicomObject) to the output stream. |
Methods inherited from class java.io.FilterOutputStream |
---|
flush, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DicomOutputStream(java.io.OutputStream out)
public DicomOutputStream(java.io.File f) throws java.io.IOException
java.io.IOException
public DicomOutputStream(java.io.RandomAccessFile raf) throws java.io.IOException
java.io.IOException
public DicomOutputStream(java.io.DataOutput dout)
dout
- to send the dicom data to.Method Detail |
---|
public byte[] getPreamble()
public void setPreamble(byte[] preamble)
public final long getStreamPosition()
public final void setStreamPosition(long pos)
public final TransferSyntax getTransferSyntax()
public final void setTransferSyntax(TransferSyntax ts)
public final void setTransferSyntax(java.lang.String tsuid)
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void write(int b) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public final boolean isExplicitItemLength()
public final void setExplicitItemLength(boolean explicitItemLength)
public final boolean isExplicitItemLengthIfZero()
public final void setExplicitItemLengthIfZero(boolean explicitItemLengthIfZero)
public final boolean isExplicitSequenceLength()
public final void setExplicitSequenceLength(boolean explicitSequenceLength)
public final boolean isExplicitSequenceLengthIfZero()
public final void setExplicitSequenceLengthIfZero(boolean explicitSequenceLengthIfZero)
public final boolean isIncludeGroupLength()
public final void setIncludeGroupLength(boolean includeGroupLength)
public void serializeDicomObject(DicomObject attrs) throws java.io.IOException
DicomObjectSerializer
.
java.io.IOException
public void writeCommand(DicomObject attrs) throws java.io.IOException
java.io.IOException
public void writeDicomFile(DicomObject attrs) throws java.io.IOException
DicomObject
to obtain the transfer syntax UID and other
attributes.
attrs
- The DicomObject
containing the DICOM tags to
write into the file.
java.io.IOException
public void writeFileMetaInformation(DicomObject attrs) throws java.io.IOException
java.io.IOException
public void writeDataset(DicomObject attrs, java.lang.String tsuid) throws java.io.IOException
attrs
- A DicomObject containing the attributes to write.tsuid
- A String containing the transfer syntax UID of the file.
java.io.IOException
public void writeDataset(DicomObject attrs, TransferSyntax transferSyntax) throws java.io.IOException
attrs
- A DicomObject containing the attributes to write.transferSyntax
- A TransferSyntax object representing the transfer syntax of
the file.
java.io.IOException
public boolean isAutoFinish()
public void setAutoFinish(boolean autoFinish)
autoFinish
- public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.FilterOutputStream
java.io.IOException
public void finish() throws java.io.IOException
java.io.IOException
public void writeItem(DicomObject item, TransferSyntax transferSyntax) throws java.io.IOException
item
- The DicomObject containing the specific item to write.transferSyntax
- The TransferSyntax
of the item.
java.io.IOException
public void writeHeader(int tag, VR vr, int len) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |