Class OtherByteAttributeCompressedSeparateFramesOnDisk

    • Field Detail

      • frameItemByteOffsets

        protected long[][] frameItemByteOffsets
      • frameItemLengths

        protected long[][] frameItemLengths
      • sequenceDelimitationItemTag

        protected static final AttributeTag sequenceDelimitationItemTag
    • Constructor Detail

      • OtherByteAttributeCompressedSeparateFramesOnDisk

        public OtherByteAttributeCompressedSeparateFramesOnDisk​(AttributeTag t)

        Construct an (empty) attribute.

        Parameters:
        t - the tag of the attribute
      • OtherByteAttributeCompressedSeparateFramesOnDisk

        public OtherByteAttributeCompressedSeparateFramesOnDisk​(AttributeTag t,
                                                                java.io.File file,
                                                                long[][] frameItemByteOffsets,
                                                                long[][] frameItemLengths,
                                                                boolean deleteFilesWhenNoLongerNeeded)
                                                         throws java.io.IOException,
                                                                DicomException

        Create an attribute from a file that contains tghe compressed frames.

        Parameters:
        t - the tag of the attribute
        file - the file
        frameItemByteOffsets - the byte offsets in the input stream of the start of the data for each item of each frame
        frameItemLengths - 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 scope
        Throws:
        java.io.IOException
        DicomException
      • OtherByteAttributeCompressedSeparateFramesOnDisk

        public OtherByteAttributeCompressedSeparateFramesOnDisk​(AttributeTag t,
                                                                DicomInputStream i,
                                                                long[][] frameItemByteOffsets,
                                                                long[][] frameItemLengths)
                                                         throws java.io.IOException,
                                                                DicomException

        Create an attribute from an input stream from which the encapsulated items have already been read.

        Parameters:
        t - the tag of the attribute
        i - the input stream
        frameItemByteOffsets - the byte offsets in the input stream of the start of the data for each item of each frame
        frameItemLengths - the lengths in bytes of each item of each frame
        Throws:
        java.io.IOException
        DicomException
    • Method Detail

      • getPaddedVL

        public long getPaddedVL()
        Description copied from class: Attribute

        Get the value length of this attribute, accounting for the need for even-length padding.

        Overrides:
        getPaddedVL in class Attribute
        Returns:
        the value length (padded to an even length)
      • writeItemTag

        protected void writeItemTag​(DicomOutputStream o,
                                    long length)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • writeSequenceDelimitationItemTag

        protected void writeSequenceDelimitationItemTag​(DicomOutputStream o)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • getByteValuesForSelectedFrame

        public byte[] getByteValuesForSelectedFrame​(int frameNumber)
                                             throws DicomException

        Get the value of this attribute as a byte array for one selected frame.

        Specified by:
        getByteValuesForSelectedFrame in interface ByteFrameSource
        Parameters:
        frameNumber - from 0
        Returns:
        the values as an array of bytes
        Throws:
        DicomException - thrown if values cannot be read
      • getNumberOfFrames

        public int getNumberOfFrames()

        Get the number of frames.

        Returns:
        number of frame
      • getVR

        public byte[] getVR()

        Get the value representation of this attribute (OB).

        Overrides:
        getVR in class Attribute
        Returns:
        'O','B' in ASCII as a two byte array; see ValueRepresentation