Class 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:
    ROIMaskGenerator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      boolean arbShape
      Where or not the ROI shape is arbitrary
      int comp
      The components for which the ROI is relevant
      int h
      height of rectangular ROI
      ImgReaderPGM maskPGM
      ImgReaderPGM object with the arbrtrary ROI
      int r
      radius of circular ROI
      boolean rect
      Flag indicating whether the ROI is rectangular or not
      int ulx
      x coordinate of upper left corner of rectangular ROI
      int uly
      y coordinate of upper left corner of rectangular ROI
      int w
      width of rectangular ROI
      int x
      x coordinate of center of circular ROI
      int y
      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
    • Field Detail

      • 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 Detail

      • 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 Detail

      • toString

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