org.dcm4che.image
Interface PixelDataReader


public interface PixelDataReader

Since:
July 2003
Version:
$Revision: 3922 $ $Date: 2005-10-05 18:26:16 +0200 (Mi, 05 Okt 2005) $
Author:
gunter zeilinger, joseph foraci
See Also:
"DICOM Part 5: Data Structures and Encoding, Section 8. 'Encoding of Pixel, Overlay and Waveform Data', Annex D"

Method Summary
 int[] getPixel(int i, int j, int k)
           
 int[][][] getPixelDataArray()
           
 int[][] getPixelDataArray(int frame)
           
 PixelDataDescription getPixelDataDescription()
          Retrieves the PixelDataDescription.
 int getSample(int i, int j, int k, int band)
           
 void mark()
          Marks the read position of the backing ImageInputStream
 int[] readFully(int len)
           
 void readFully(int[] samples, int offset, int len)
           
 void readPixelData()
           
 void readPixelData(boolean grabOverlayData)
           
 int readSample()
          If a sample can't be read, the state of the contained ImageInputStream is not disturbed (beyond any effect of trying to read and getting an IOException)
 void reset()
          Resets the read position of the backing ImageInputStream to the matching mark (where mark() was last called on the stream).
 void resetStream()
          Reset the read position of the backing ImageInputStream and state of this instance to the initial read position
 void skipSamples(int n)
          Skip the specified number of samples from the current position in the stream.
 void skipSamples(long n)
          Skip the specified number of samples from the current position in the stream.
 void skipToNextFrame()
           
 

Method Detail

getPixelDataDescription

PixelDataDescription getPixelDataDescription()
Retrieves the PixelDataDescription.

Returns:
PixelDataDescription

mark

void mark()
Marks the read position of the backing ImageInputStream


reset

void reset()
           throws java.io.IOException
Resets the read position of the backing ImageInputStream to the matching mark (where mark() was last called on the stream). If no mark was set using @see org.dcm4che.image.PixelData#mark(), nothing happens.

Throws:
java.io.IOException - If the matching mark is in a portion of the backing ImageInputStream that has already been discarded.

resetStream

void resetStream()
                 throws java.io.IOException
Reset the read position of the backing ImageInputStream and state of this instance to the initial read position

Throws:
java.io.IOException - On I/O error -- a seek to beginning of stream was not was not possible

readSample

int readSample()
               throws java.io.IOException
If a sample can't be read, the state of the contained ImageInputStream is not disturbed (beyond any effect of trying to read and getting an IOException)

Returns:
The next sample value from the underlying ImageInputStream
Throws:
java.io.IOException - If underlying ImageInputStream has an I/O problem

skipSamples

void skipSamples(int n)
                 throws java.io.IOException
Skip the specified number of samples from the current position in the stream.

Parameters:
n - Number of samples to skip. The behaviour of this method is undefined for negative values of n or if an IOException occurs.
Throws:
java.io.IOException - On I/O error

skipSamples

void skipSamples(long n)
                 throws java.io.IOException
Skip the specified number of samples from the current position in the stream.

Parameters:
n - Number of samples to skip. The behavior of this class is undefined for negative values of n or if an IOException occurs.
Throws:
java.io.IOException - On I/O error

skipToNextFrame

void skipToNextFrame()
                     throws java.io.IOException
Throws:
java.io.IOException

readFully

void readFully(int[] samples,
               int offset,
               int len)
               throws java.io.IOException
Throws:
java.io.IOException

readFully

int[] readFully(int len)
                throws java.io.IOException
Throws:
java.io.IOException

getPixel

int[] getPixel(int i,
               int j,
               int k)
               throws java.io.IOException
Throws:
java.io.IOException

getSample

int getSample(int i,
              int j,
              int k,
              int band)
              throws java.io.IOException
Throws:
java.io.IOException

getPixelDataArray

int[][][] getPixelDataArray()

getPixelDataArray

int[][] getPixelDataArray(int frame)

readPixelData

void readPixelData()
                   throws java.io.IOException
Throws:
java.io.IOException

readPixelData

void readPixelData(boolean grabOverlayData)
                   throws java.io.IOException
Throws:
java.io.IOException