org.dcm4che2.image
Class PartialComponentSampleModel

java.lang.Object
  extended by java.awt.image.SampleModel
      extended by org.dcm4che2.image.PartialComponentSampleModel

public class PartialComponentSampleModel
extends java.awt.image.SampleModel


Field Summary
protected  int subsampleX
           
protected  int subsampleY
           
 
Fields inherited from class java.awt.image.SampleModel
dataType, height, numBands, width
 
Constructor Summary
PartialComponentSampleModel(int w, int h, int subsampleX, int subsampleY)
          Sub-sample x,y are the rate of sub-sampling.
 
Method Summary
 java.awt.image.SampleModel createCompatibleSampleModel(int w, int h)
           
 java.awt.image.DataBuffer createDataBuffer()
           
 java.awt.image.SampleModel createSubsetSampleModel(int[] bands)
           
 java.lang.Object getDataElements(int x, int y, java.lang.Object obj, java.awt.image.DataBuffer data)
           
 int getNumDataElements()
           
 int getSample(int x, int y, int b, java.awt.image.DataBuffer data)
           
 int[] getSampleSize()
           
 int getSampleSize(int band)
           
 void setDataElements(int x, int y, java.lang.Object obj, java.awt.image.DataBuffer data)
           
 void setSample(int x, int y, int b, int s, java.awt.image.DataBuffer data)
           
 
Methods inherited from class java.awt.image.SampleModel
getDataElements, getDataType, getHeight, getNumBands, getPixel, getPixel, getPixel, getPixels, getPixels, getPixels, getSampleDouble, getSampleFloat, getSamples, getSamples, getSamples, getTransferType, getWidth, setDataElements, setPixel, setPixel, setPixel, setPixels, setPixels, setPixels, setSample, setSample, setSamples, setSamples, setSamples
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subsampleX

protected final int subsampleX

subsampleY

protected final int subsampleY
Constructor Detail

PartialComponentSampleModel

public PartialComponentSampleModel(int w,
                                   int h,
                                   int subsampleX,
                                   int subsampleY)
Sub-sample x,y are the rate of sub-sampling. YBR_X_422 corresponds to 2, 1, while YBR_X_420 corresponds to 2,2

Method Detail

createCompatibleSampleModel

public java.awt.image.SampleModel createCompatibleSampleModel(int w,
                                                              int h)
Specified by:
createCompatibleSampleModel in class java.awt.image.SampleModel

createDataBuffer

public java.awt.image.DataBuffer createDataBuffer()
Specified by:
createDataBuffer in class java.awt.image.SampleModel

createSubsetSampleModel

public java.awt.image.SampleModel createSubsetSampleModel(int[] bands)
Specified by:
createSubsetSampleModel in class java.awt.image.SampleModel

getDataElements

public java.lang.Object getDataElements(int x,
                                        int y,
                                        java.lang.Object obj,
                                        java.awt.image.DataBuffer data)
Specified by:
getDataElements in class java.awt.image.SampleModel

getNumDataElements

public int getNumDataElements()
Specified by:
getNumDataElements in class java.awt.image.SampleModel

getSample

public int getSample(int x,
                     int y,
                     int b,
                     java.awt.image.DataBuffer data)
Specified by:
getSample in class java.awt.image.SampleModel

getSampleSize

public int[] getSampleSize()
Specified by:
getSampleSize in class java.awt.image.SampleModel

getSampleSize

public int getSampleSize(int band)
Specified by:
getSampleSize in class java.awt.image.SampleModel

setDataElements

public void setDataElements(int x,
                            int y,
                            java.lang.Object obj,
                            java.awt.image.DataBuffer data)
Specified by:
setDataElements in class java.awt.image.SampleModel

setSample

public void setSample(int x,
                      int y,
                      int b,
                      int s,
                      java.awt.image.DataBuffer data)
Specified by:
setSample in class java.awt.image.SampleModel


Copyright © 2011 dcm4che. All Rights Reserved.