|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.desy.acop.video.analysis.ImageAnalysisEngine
public class ImageAnalysisEngine
ImageAnalysisEngine provides AImage image analysis data. It has two modes of operation: local and remote analysis. In local analysis mode, the IMAGE arguments of the updateValue method are processed locally. In remote mode this engine reads AImage data from a video analysis server.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_A_IMAGE
|
static java.lang.String |
PROPERTY_BACKGROUND
|
static java.lang.String |
PROPERTY_PRECISE_BACKGROUND
|
static java.lang.String |
PROPERTY_RESET
|
Constructor Summary | |
---|---|
ImageAnalysisEngine(ColorDecoder decoder)
Constructs this ImageAnalysisEngine. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener for the specified propertyName. |
AImage |
getAImage()
Gets the AImage. |
de.desy.tine.types.IMAGE |
getBackground()
Gets the background image used by this ImageAnalysisEngine. |
int |
getBackgroundWidth()
Returns the width of the background image. |
ColorDecoder |
getDecoder()
Gets the decoder used by this ImageAnalysisEngine. |
de.desy.tine.types.IMAGE |
getImage()
Gets the IMAGE. |
double[] |
getPreciseBackground()
Returns the double array that is used as background image. |
java.awt.Rectangle |
getROI()
Returns the rectangle describing the region of interest. |
double |
getThreshold()
Gets the threshold value. |
java.awt.Rectangle |
getThresholdROI()
Returns the rectangle describing the region of interest used for threshold calculation. |
boolean |
isCalculateThreshold()
Returns true if the threshold is calculated by this engine, or false if the user defined the threshold to be used. |
boolean |
isLocalAnalysisMode()
Gets the analysis mode for this ImageAnalysisEngine. |
boolean |
isPerformFit()
Returns true if fitting is performed by this engine, or false if otherwise |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener. |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener for the specified propertyName. |
void |
resetForReceiving()
Resets this receiver for receiving. |
void |
setAnalysisParameters(double threshold,
int roiX,
int roiY,
int roiW,
int roiH,
int roi2X,
int roi2Y,
int roi2W,
int roi2H,
boolean calculateThreshold,
boolean performFit,
boolean performSmoothing)
Sets the analysis parameters (threshold and region of interest) and reanalyzes pixels. |
void |
setAnalysisParameters(int roiX,
int roiY,
int roiW,
int roiH,
int roi2X,
int roi2Y,
int roi2W,
int roi2H,
boolean calculateThreshold,
boolean performFit,
boolean performSmoothing)
Sets the analysis parameters (only region of interest, threshold remains the same) and reanalyzes pixels. |
void |
setAnalysisServerConnectionParameters(ConnectionParameters cp)
Sets ConnectionParameters for remote video analysis server. |
void |
setBackground(de.desy.tine.types.IMAGE background)
Sets the background image to be used by this ImageAnalysisEngine. |
void |
setCalculateThreshold(boolean calculateThreshold)
Sets the calculate thershold parameter. |
void |
setDecoder(ColorDecoder decoder)
Sets a ColorDecoder to this ImageAnalysisEngine |
void |
setLocalAnalysisMode(boolean local)
Sets the analysis mode for this ImageAnalysisEngine. |
void |
setPerformFit(boolean performFit)
Sets the perform fit parameter. |
void |
setPerformSmoothing(boolean performSmoothing)
Sets the perform smoothing parameter. |
void |
setPreciseBackground(double[] background,
int width)
Sets the precise background array. |
void |
setRoi(int roiX,
int roiY,
int roiW,
int roiH)
Sets the region of interest and reanalyzes pixels. |
void |
setRoi2(int roi2X,
int roi2Y,
int roi2W,
int roi2H)
Sets the region of interest and reanalyzes pixels. |
void |
setThreshold(double threshold)
Sets the threshold value, which discards all pixels which have returned by ColorDecoder lover than threshold value. |
void |
startRemoteAnalysis()
Starts connection to remote video analysis server. |
void |
stopRemoteAnalysis()
Stops connection to remote video analysis server. |
static java.awt.image.BufferedImage |
toBufferedImage(double[] image,
int width)
Transforms teh double array to a gray buffered image. |
static java.awt.image.BufferedImage |
toBufferedImage(de.desy.tine.types.IMAGE image)
Transforms the IMAGE to BufferedImage using the appropriate algorithm for the given image. |
static de.desy.tine.types.IMAGE |
toImage(double[] image,
int width)
Transforms the double array to a Gray image. |
void |
updateValue(de.desy.tine.types.IMAGE newImage)
Updates this receiver's IMAGE. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_A_IMAGE
public static final java.lang.String PROPERTY_BACKGROUND
public static final java.lang.String PROPERTY_PRECISE_BACKGROUND
public static final java.lang.String PROPERTY_RESET
Constructor Detail |
---|
public ImageAnalysisEngine(ColorDecoder decoder)
decoder
- the ColorDecoder to be used with this
ImageAnalysisEngineMethod Detail |
---|
public void resetForReceiving()
TineImageReceiver
resetForReceiving
in interface TineImageReceiver
public void updateValue(de.desy.tine.types.IMAGE newImage)
TineImageReceiver
updateValue
in interface TineImageReceiver
newImage
- the new IMAGEpublic void setPreciseBackground(double[] background, int width)
background
- the pixel value arraywidth
- the width of the imagepublic double[] getPreciseBackground()
#setPreciseBackground(double[], boolean)
public int getBackgroundWidth()
public static de.desy.tine.types.IMAGE toImage(double[] image, int width)
image
- the image to transformwidth
- the width of the image
public static java.awt.image.BufferedImage toBufferedImage(double[] image, int width)
image
- the double image arraywidth
- the width of the image
public de.desy.tine.types.IMAGE getBackground()
public void setBackground(de.desy.tine.types.IMAGE background)
background
- the image to setpublic void setRoi(int roiX, int roiY, int roiW, int roiH)
roiX
- the starting x coordinateroiY
- the starting y coordinateroiW
- the width of the regionroiH
- the height of the regionpublic void setRoi2(int roi2X, int roi2Y, int roi2W, int roi2H)
roiX
- the starting x coordinateroiY
- the starting y coordinateroiW
- the width of the regionroiH
- the height of the regionpublic de.desy.tine.types.IMAGE getImage()
public AImage getAImage()
public java.awt.Rectangle getROI()
public java.awt.Rectangle getThresholdROI()
public double getThreshold()
setThreshold(double)
public void setThreshold(double threshold)
ColorDecoder
lover than threshold value.
Threshold value has effect only between values Const2D and Amplitude2D
as described by AImage
.
threshold
- the threshold value to setAImage
,
AImage.getAmplitude2D()
,
AImage.getConst2D()
public void setCalculateThreshold(boolean calculateThreshold)
calculateThreshold
- true if the threshold should be calculated or false
otherwisepublic boolean isCalculateThreshold()
public void setPerformFit(boolean performFit)
performFit
- true if fitting should be performed or false otherwisepublic void setPerformSmoothing(boolean performSmoothing)
performSmoothing
- true if smoothing should be performed or false otherwisepublic boolean isPerformFit()
public ColorDecoder getDecoder()
public void setDecoder(ColorDecoder decoder)
decoder
- the ColorDecoder to setpublic void setAnalysisParameters(int roiX, int roiY, int roiW, int roiH, int roi2X, int roi2Y, int roi2W, int roi2H, boolean calculateThreshold, boolean performFit, boolean performSmoothing)
roiX
- the starting x coordinateroiY
- the starting y coordinateroiW
- the width of the regionroiH
- the height of the regioncalculateThreshold
- true if the threshold is calculated by the server or false otherwiseperformFit
- true if the fitting should be performed or false otherwisepublic void setAnalysisParameters(double threshold, int roiX, int roiY, int roiW, int roiH, int roi2X, int roi2Y, int roi2W, int roi2H, boolean calculateThreshold, boolean performFit, boolean performSmoothing)
threshold
- the thresholdroiX
- the starting x coordinateroiY
- the starting y coordinateroiW
- the width of the regionroiH
- the height of the regionpublic void setLocalAnalysisMode(boolean local)
local
- true for local analysis and
false for remote analysispublic boolean isLocalAnalysisMode()
public void startRemoteAnalysis()
public void stopRemoteAnalysis()
public void setAnalysisServerConnectionParameters(ConnectionParameters cp)
cp
- the ConnectionParameters to setpublic void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- the name of the propertylistener
- the PropertyChangeListener to addpublic void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- the name of the propertylistener
- the PropertyChangeListener to removepublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the PropertyChangeListener to addpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the PropertyChangeListener to removepublic static java.awt.image.BufferedImage toBufferedImage(de.desy.tine.types.IMAGE image)
image
- the image to transform
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |