Class ROI

java.lang.Object
jj2000.j2k.roi.encoder.ROI

public class ROI extends Object
This class contains the shape of a single ROI. In the current implementation only rectangles and circles are supported.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
    Where or not the ROI shape is arbitrary
    int
    The components for which the ROI is relevant
    int
    height of rectangular ROI
    ImgReaderPGM object with the arbrtrary ROI
    int
    radius of circular ROI
    boolean
    Flag indicating whether the ROI is rectangular or not
    int
    x coordinate of upper left corner of rectangular ROI
    int
    y coordinate of upper left corner of rectangular ROI
    int
    width of rectangular ROI
    int
    x coordinate of center of circular ROI
    int
    y coordinate of center of circular ROI
  • Constructor Summary

    Constructors
    Constructor
    Description
    ROI(int comp, int x, int y, int rad)
    Constructor for circular ROIs
    ROI(int comp, int ulx, int uly, int w, int h)
    Constructor for rectangular ROIs
    ROI(int comp, ImgReaderPGM maskPGM)
    Constructor for ROI with arbitrary shape
  • Method Summary

    Modifier and Type
    Method
    Description
    This function prints all relevant data for the ROI

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • maskPGM

      public ImgReaderPGM maskPGM
      ImgReaderPGM object with the arbrtrary ROI
    • arbShape

      public boolean arbShape
      Where or not the ROI shape is arbitrary
    • rect

      public boolean rect
      Flag indicating whether the ROI is rectangular or not
    • comp

      public int comp
      The components for which the ROI is relevant
    • ulx

      public int ulx
      x coordinate of upper left corner of rectangular ROI
    • uly

      public int uly
      y coordinate of upper left corner of rectangular ROI
    • w

      public int w
      width of rectangular ROI
    • h

      public int h
      height of rectangular ROI
    • x

      public int x
      x coordinate of center of circular ROI
    • y

      public int y
      y coordinate of center of circular ROI
    • r

      public int r
      radius of circular ROI
  • Constructor Details

    • ROI

      public ROI(int comp, ImgReaderPGM maskPGM)
      Constructor for ROI with arbitrary shape
      Parameters:
      comp - The component the ROI belongs to
      maskPGM - ImgReaderPGM containing the ROI
    • ROI

      public ROI(int comp, int ulx, int uly, int w, int h)
      Constructor for rectangular ROIs
      Parameters:
      comp - The component the ROI belongs to
      ulx - x-coordinate of upper left corner of ROI
      uly - y-coordinate of upper left corner of ROI
      w - width of ROI
      h - height of ROI
    • ROI

      public ROI(int comp, int x, int y, int rad)
      Constructor for circular ROIs
      Parameters:
      comp - The component the ROI belongs to
      x - x-coordinate of center of ROI
      y - y-coordinate of center of ROI
      rad - radius of ROI
  • Method Details

    • toString

      public String toString()
      This function prints all relevant data for the ROI
      Overrides:
      toString in class Object