Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vistech.roi
Class ROIContext

    java.lang.Object
      |
      +--com.vistech.roi.ROIContext

public class ROIContext
extends java.lang.Object

A convenient class that represents the context of an ROI. It contains the image in which the ROI is deposited. All the ROIs deposited on an image have the same ROI context.

Version:
  1.0 3 Oct 2000
Author:
  Lawrence Rodrigues

Field Summary
`protected java.awt.image.BufferedImage` | `displayImage`
`protected java.awt.image.BufferedImage` | `originalImage`

Constructor Summary
`ROIContext(java.awt.image.BufferedImage img)`

Method Summary
`protected void` | `createDisplayImage()` Creates a copy of the original image for depositing the ROIs.
`java.lang.String[]` | `getComponentNames()` Returns the names of the pixel components as an array of strings.
`java.awt.image.BufferedImage` | `getDisplayImage()` Returns the image that is displyed on the screen.
`java.awt.image.WritableRaster` | `getDisplayRaster()` Returns the writable raster of the displayed image.
`java.awt.image.BufferedImage` | `getOriginalImage()` Returns the original image.
`java.awt.image.WritableRaster` | `getOriginalRaster()` Returns the writable raster of the original image.
`void` | `reset()` Resets the context.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### originalImage

    protected java.awt.image.BufferedImage originalImage

### displayImage

    protected java.awt.image.BufferedImage displayImage

Constructor Detail

### ROIContext

    public ROIContext(java.awt.image.BufferedImage img)

  Parameters:
    `img` - the image on which ROIs are to be deposited.

Method Detail

### getOriginalImage

    public java.awt.image.BufferedImage getOriginalImage()

  Returns the original image.
  Returns:
    img the original image.

### getDisplayImage

    public java.awt.image.BufferedImage getDisplayImage()

  Returns the image that is displyed on the screen. This may contain deposited ROIs.
  Returns:
    img the displyed image on which ROIs are deposited.

### createDisplayImage

    protected void createDisplayImage()

  Creates a copy of the original image for depositing the ROIs.

### getOriginalRaster

    public java.awt.image.WritableRaster getOriginalRaster()

  Returns the writable raster of the original image.
  Returns:
    the writable raster of the original image.

### getDisplayRaster

    public java.awt.image.WritableRaster getDisplayRaster()

  Returns the writable raster of the displayed image.
  Returns:
    the writable raster of the displyed image.

### getComponentNames

    public java.lang.String[] getComponentNames()

  Returns the names of the pixel components as an array of strings. For example, this will return {"red", "green", "blue"} in th case of an RGB image.
  Returns:
    an array of sample names.

### reset

    public void reset()

  Resets the context. Creates a new image for depositing ROIs. All the previously drawn ROIs will be lost when you call this method

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD