public class OtherByteAttributeCompressedSeparateFramesOnDisk extends OtherAttributeOnDisk implements ByteFrameSource, BasicOffsetTableAccessor
A concrete class specializing Attribute
for
Other Byte (OB) attributes whose compressed frames are not memory resident.
Though an instance of this class may be created
using its constructors, there is also a factory class, AttributeFactory
.
Attribute
,
AttributeFactory
,
AttributeList
,
OtherWordAttributeOnDisk
Modifier and Type | Field and Description |
---|---|
protected int[] |
basicOffsetTable |
protected long[][] |
frameItemByteOffsets |
protected long[][] |
frameItemLengths |
protected static AttributeTag |
itemTag |
protected static AttributeTag |
sequenceDelimitationItemTag |
byteOffset, deleteFilesWhenNoLongerNeeded, file
valueLength, valueMultiplicity
Constructor and Description |
---|
OtherByteAttributeCompressedSeparateFramesOnDisk(AttributeTag t)
Construct an (empty) attribute.
|
OtherByteAttributeCompressedSeparateFramesOnDisk(AttributeTag t,
DicomInputStream i,
long[][] frameItemByteOffsets,
long[][] frameItemLengths)
Create an attribute from an input stream from which the encapsulated items have already been read.
|
OtherByteAttributeCompressedSeparateFramesOnDisk(AttributeTag t,
File file,
long[][] frameItemByteOffsets,
long[][] frameItemLengths,
boolean deleteFilesWhenNoLongerNeeded)
Create an attribute from a file that contains the compressed frames.
|
Modifier and Type | Method and Description |
---|---|
int[] |
getBasicOffsetTable()
Get the 32 bit array Basic Offset Table.
|
byte[] |
getByteValuesForSelectedFrame(int frameNumber)
Get the value of this attribute as a byte array for one selected frame.
|
long[][] |
getFrameItemLengths() |
int |
getNumberOfFrames()
Get the number of frames.
|
long |
getPaddedVL()
Get the value length of this attribute, accounting for the need for even-length padding.
|
byte[] |
getVR()
Get the value representation of this attribute (OB).
|
void |
setBasicOffsetTable(int[] basicOffsetTable)
Set the 32 bit array Basic Offset Table.
|
void |
write(DicomOutputStream o)
Write the entire attribute (including values) to the output stream.
|
protected void |
writeItemTag(DicomOutputStream o,
long length) |
protected void |
writeSequenceDelimitationItemTag(DicomOutputStream o) |
deleteFilesWhenNoLongerNeeded, finalize, getByteOffset, getFile, removeValues, setFile, setFile, toString
addValue, addValue, addValue, addValue, addValue, addValue, addValue, getByteValues, getByteValues, getDelimitedStringValuesOrDefault, getDelimitedStringValuesOrDefault, getDelimitedStringValuesOrDefault, getDelimitedStringValuesOrDefault, getDelimitedStringValuesOrDefault, getDelimitedStringValuesOrDefault, getDelimitedStringValuesOrEmptyString, getDelimitedStringValuesOrEmptyString, getDelimitedStringValuesOrEmptyString, getDelimitedStringValuesOrEmptyString, getDelimitedStringValuesOrEmptyString, getDelimitedStringValuesOrEmptyString, getDelimitedStringValuesOrNull, getDelimitedStringValuesOrNull, getDelimitedStringValuesOrNull, getDelimitedStringValuesOrNull, getDelimitedStringValuesOrNull, getDelimitedStringValuesOrNull, getDoubleValues, getDoubleValues, getDoubleValues, getElement, getFloatValues, getFloatValues, getFloatValues, getGroup, getIntegerValues, getIntegerValues, getIntegerValues, getLengthOfEncodedValue, getLongValues, getLongValues, getLongValues, getOriginalStringValues, getShortValues, getSingleDoubleValueOrDefault, getSingleDoubleValueOrDefault, getSingleDoubleValueOrDefault, getSingleFloatValueOrDefault, getSingleFloatValueOrDefault, getSingleFloatValueOrDefault, getSingleIntegerValueOrDefault, getSingleIntegerValueOrDefault, getSingleIntegerValueOrDefault, getSingleLongValueOrDefault, getSingleLongValueOrDefault, getSingleLongValueOrDefault, getSingleStringValueOrDefault, getSingleStringValueOrDefault, getSingleStringValueOrDefault, getSingleStringValueOrDefault, getSingleStringValueOrDefault, getSingleStringValueOrDefault, getSingleStringValueOrEmptyString, getSingleStringValueOrEmptyString, getSingleStringValueOrEmptyString, getSingleStringValueOrEmptyString, getSingleStringValueOrEmptyString, getSingleStringValueOrEmptyString, getSingleStringValueOrNull, getSingleStringValueOrNull, getSingleStringValueOrNull, getSingleStringValueOrNull, getSingleStringValueOrNull, getSingleStringValueOrNull, getStringValues, getStringValues, getStringValues, getStringValues, getStringValues, getStringValues, getTag, getVL, getVM, getVRAsString, isValid, repairValues, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValues, setValues, setValues, setValues, setValues, setValues, setValues, toString, writeBase
protected int[] basicOffsetTable
protected long[][] frameItemByteOffsets
protected long[][] frameItemLengths
protected static final AttributeTag itemTag
protected static final AttributeTag sequenceDelimitationItemTag
public OtherByteAttributeCompressedSeparateFramesOnDisk(AttributeTag t)
Construct an (empty) attribute.
t
- the tag of the attributepublic OtherByteAttributeCompressedSeparateFramesOnDisk(AttributeTag t, DicomInputStream i, long[][] frameItemByteOffsets, long[][] frameItemLengths) throws IOException, DicomException
Create an attribute from an input stream from which the encapsulated items have already been read.
t
- the tag of the attributei
- the input streamframeItemByteOffsets
- the byte offsets in the input stream of the start of the data for each item of each frameframeItemLengths
- the lengths in bytes of each item of each frameIOException
DicomException
public OtherByteAttributeCompressedSeparateFramesOnDisk(AttributeTag t, File file, long[][] frameItemByteOffsets, long[][] frameItemLengths, boolean deleteFilesWhenNoLongerNeeded) throws IOException, DicomException
Create an attribute from a file that contains the compressed frames.
t
- the tag of the attributefile
- the fileframeItemByteOffsets
- the byte offsets in the input stream of the start of the data for each item of each frameframeItemLengths
- the lengths in bytes of each item of each frame, with any trailing padding after EOI marker removed (i.e., may be odd)deleteFilesWhenNoLongerNeeded
- delete file when attribute goes out of scopeIOException
DicomException
public int[] getBasicOffsetTable()
Get the 32 bit array Basic Offset Table.
getBasicOffsetTable
in interface BasicOffsetTableAccessor
public byte[] getByteValuesForSelectedFrame(int frameNumber) throws DicomException
Get the value of this attribute as a byte array for one selected frame.
getByteValuesForSelectedFrame
in interface ByteFrameSource
frameNumber
- from 0DicomException
- thrown if values cannot be readpublic long[][] getFrameItemLengths()
public int getNumberOfFrames()
Get the number of frames.
public long getPaddedVL()
Attribute
Get the value length of this attribute, accounting for the need for even-length padding.
getPaddedVL
in class Attribute
public byte[] getVR()
Get the value representation of this attribute (OB).
getVR
in class Attribute
ValueRepresentation
public void setBasicOffsetTable(int[] basicOffsetTable)
Set the 32 bit array Basic Offset Table.
setBasicOffsetTable
in interface BasicOffsetTableAccessor
basicOffsetTable
- public void write(DicomOutputStream o) throws DicomException, IOException
Attribute
Write the entire attribute (including values) to the output stream.
write
in class Attribute
o
- IOException
DicomException
protected void writeItemTag(DicomOutputStream o, long length) throws IOException
IOException
protected void writeSequenceDelimitationItemTag(DicomOutputStream o) throws IOException
IOException