Class ImageDataROI

java.lang.Object
  extended by ImageDataROI

public class ImageDataROI
extends java.lang.Object

ImageDataROI class supports image data ROI object access. This is the top level data structure for a basic image object. It contains the input and output Image objects and input and output int[] pix arrays.

This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The Flicker Mozilla and Legal files are available on http://open2dprot.sourceforge.net/Flicker

Version:
$Date$ $Revision$
Author:
P. Lemkin (LECB/NCI), G. Thornwall (SAIC), Frederick, MD
See Also:
Flicker Home

Field Summary
 int cwx1
          generic ULHC computing window set when both (C-U) and (C-L) were performed.
 int cwx2
          generic LRHC computing window when both (C-U) and (C-L) were performed.
 int cwy1
          generic ULHC computing window set when both (C-U) and (C-L) were performed.
 int cwy2
          generic LRHC computing window when both (C-U) and (C-L) were performed.
 ImageData id
          Instance of ImageData for extended classes
 int roiX1
          ULHC ROI window set by (C-U).
 int roiX2
          LRHC ROI window set by (C-L).
 int roiY1
          ULHC ROI window set by (C-U).
 int roiY2
          LRHC ROI window set by (C-L).
 
Constructor Summary
ImageDataROI(ImageData id)
          ImageDataROI() - Constructor.
 
Method Summary
 boolean calcHistogramROI()
          calcHistogramROI() - compute grayscale histogram under the current ROI.
 void copyROI2CW()
          copyROI2CW() - copy C-U/C-L ROI to Computing Window (CW)
 boolean forceROIUpperAndLowerCorners()
          forceROIUpperAndLowerCorners() - reorder the ROI so that (roiX1,roiY1) < (roiX2,roiY2)
 boolean isValidCW()
          isValidCW() - check if current Computing Window (CW) is valid
 boolean isValidNDcalibCW()
          isValidNDcalibCW() - check if current Calibration Computing Window is valid
 boolean isValidROI()
          isValidROI() - check if current region of interest (ROI) is valid
 void setROI(int rX1, int rY1, int rX2, int rY2)
          setROI() - set computing window region of interest (ROI)
 boolean setROI2CALCW(int rX1, int rY1, int rX2, int rY2)
          setROI2CALCW() - set ND wedge computing window region of interest (ROI)
 void setROI2CW(int rX1, int rY1, int rX2, int rY2)
          setROI2CW() - set region of interest (ROI) to Computing Window (CW)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

public ImageData id
Instance of ImageData for extended classes


roiX1

public int roiX1
ULHC ROI window set by (C-U). Note (C-W) clears this.


roiY1

public int roiY1
ULHC ROI window set by (C-U). Note (C-W) clears this.


roiX2

public int roiX2
LRHC ROI window set by (C-L). Note (C-W) clears this.


roiY2

public int roiY2
LRHC ROI window set by (C-L). Note (C-W) clears this.


cwx1

public int cwx1
generic ULHC computing window set when both (C-U) and (C-L) were performed. Note (C-W) clears this.


cwy1

public int cwy1
generic ULHC computing window set when both (C-U) and (C-L) were performed. Note (C-W) clears this.


cwx2

public int cwx2
generic LRHC computing window when both (C-U) and (C-L) were performed. Note (C-W) clears this.


cwy2

public int cwy2
generic LRHC computing window when both (C-U) and (C-L) were performed. Note (C-W) clears this.

Constructor Detail

ImageDataROI

public ImageDataROI(ImageData id)
ImageDataROI() - Constructor. Obj keeps all image ROI data together. Setup up a 1:1 mapGrayToOD[0:maxGray] if mapGrayToOD is null.

Method Detail

setROI2CW

public void setROI2CW(int rX1,
                      int rY1,
                      int rX2,
                      int rY2)
setROI2CW() - set region of interest (ROI) to Computing Window (CW)

Parameters:
rX1 - - ULHC x coordinate
rY1 - - ULHC y coordinate
rX2 - - LRHC x coordinate
rY2 - - LRHC y coordinate

copyROI2CW

public void copyROI2CW()
copyROI2CW() - copy C-U/C-L ROI to Computing Window (CW)


setROI

public void setROI(int rX1,
                   int rY1,
                   int rX2,
                   int rY2)
setROI() - set computing window region of interest (ROI)

Parameters:
rX1 - - ULHC x coordinate
rY1 - - ULHC y coordinate
rX2 - - LRHC x coordinate
rY2 - - LRHC y coordinate

setROI2CALCW

public boolean setROI2CALCW(int rX1,
                            int rY1,
                            int rX2,
                            int rY2)
setROI2CALCW() - set ND wedge computing window region of interest (ROI)

Parameters:
rX1 - - ULHC x coordinate
rY1 - - ULHC y coordinate
rX2 - - LRHC x coordinate
rY2 - - LRHC y coordinate

forceROIUpperAndLowerCorners

public boolean forceROIUpperAndLowerCorners()
forceROIUpperAndLowerCorners() - reorder the ROI so that (roiX1,roiY1) < (roiX2,roiY2)

Returns:
true if successful, false if ROI is not fully defined.

isValidROI

public boolean isValidROI()
isValidROI() - check if current region of interest (ROI) is valid

Returns:
true if valid

isValidCW

public boolean isValidCW()
isValidCW() - check if current Computing Window (CW) is valid

Returns:
true if valid

isValidNDcalibCW

public boolean isValidNDcalibCW()
isValidNDcalibCW() - check if current Calibration Computing Window is valid

Returns:
true if valid

calcHistogramROI

public boolean calcHistogramROI()
calcHistogramROI() - compute grayscale histogram under the current ROI. The result is in this.hist[] which is created here.