Package gda.px.humiditycontroller
Class HC1DummyDropsize
java.lang.Object
gda.factory.ConfigurableBase
gda.px.humiditycontroller.HC1DropsizeCalcBase
gda.px.humiditycontroller.HC1DummyDropsize
- All Implemented Interfaces:
Configurable,Findable,gda.observable.IObservable,HC1DropsizeCalc
@ServiceInterface(HC1DropsizeCalc.class)
public class HC1DummyDropsize
extends HC1DropsizeCalcBase
implements Configurable
HC1DummyDropsize aims to emulate live dropsize detection by loading in a list of static dropsize images
from disk, processes a given image to determine the size of the drop when the dropSize() method is called,
and an image and the new dropsize calculation. Most importantly, it aims to test that calculate the global min/max
of the drop curve that indicate the midpoint, and hence from which the height of the drop is derived.
method can correctly in HC1DropsizeBase correctly process the arrays.
This class is can (and is ) tested independently of GDA.
-
Field Summary
Fields inherited from class gda.px.humiditycontroller.HC1DropsizeCalcBase
b, oc, t -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.voidDisables the overlay on the OAVprotected voiddoubleCalculates the size of the drop on the OAVvoidEnables the overlay on the OAVgetImage()Gets the last drop imagedoubleCalculates the current dropsize divided by a previous drop size - value between 1 - 100%protected voidgetScale()protected voidgetSize()booleanIndicates whether this object should be configured at startup.protected voidprotected voidprotected voidvoidsetImage(BufferedImage img) Sets the image of the dropvoidCalculates and sets the drop size on the sample in the OAVvoidsetROIasCrosshair(int width) Sets the size of the cross hair in the centre of the ROIvoidsetROIx(int lowLimit, int highLimit) Sets the coordinates that frames the Region of Interest of the Drop on the image using the explicit (x,y) coordinates of the bottom corner of rectangle, and its height and widthstatic inttruncate(int grad) Methods inherited from class gda.px.humiditycontroller.HC1DropsizeCalcBase
addIObserver, deleteIObserver, deleteIObservers, getBeamdata, getDifAtxpos, getDropsize, getHighLimitX, getHighLimitY, getLowLimitX, getName, getSavedAcqPeriod, getSavedBrightness, getSavedExposure, getSavedGain, getSavedInput, getSavedZoom, getXpos, getxSize, getYpos, getySize, midpoint_x, setBackLight, setBacklightIntensity, setBeamdata, setBeamlineOAVPV, setCamera, setDifAtxpos, setDropsize, setHighLimitX, setHighLimitY, setLowLimitX, setName, setSavedAcqPeriod, setSavedBrightness, setSavedExposure, setSavedGain, setSavedInput, setSavedZoom, setXpos, setxSize, setYpos, setySizeMethods inherited from class gda.factory.ConfigurableBase
isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigured, reconfigure
-
Constructor Details
-
HC1DummyDropsize
public HC1DummyDropsize()
-
-
Method Details
-
configure
Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
isConfigureAtStartup
public boolean isConfigureAtStartup()Description copied from interface:ConfigurableIndicates whether this object should be configured at startup.Moved from ConditionallyConfigurable which has been deleted
- Specified by:
isConfigureAtStartupin interfaceConfigurable- Overrides:
isConfigureAtStartupin classConfigurableBase
-
enableOverlays
public void enableOverlays()Description copied from interface:HC1DropsizeCalcEnables the overlay on the OAV- Specified by:
enableOverlaysin interfaceHC1DropsizeCalc
-
disableOverlays
public void disableOverlays()Description copied from interface:HC1DropsizeCalcDisables the overlay on the OAV- Specified by:
disableOverlaysin interfaceHC1DropsizeCalc
-
setROIx
public void setROIx(int lowLimit, int highLimit) Description copied from interface:HC1DropsizeCalcSets the coordinates that frames the Region of Interest of the Drop on the image using the explicit (x,y) coordinates of the bottom corner of rectangle, and its height and width- Specified by:
setROIxin interfaceHC1DropsizeCalc
-
setOriginalSize
public void setOriginalSize()Description copied from interface:HC1DropsizeCalcCalculates and sets the drop size on the sample in the OAV- Specified by:
setOriginalSizein interfaceHC1DropsizeCalc
-
getRelativeSize
public double getRelativeSize()Description copied from interface:HC1DropsizeCalcCalculates the current dropsize divided by a previous drop size - value between 1 - 100%- Specified by:
getRelativeSizein interfaceHC1DropsizeCalc
-
dropsizeCalc
public double dropsizeCalc()Description copied from interface:HC1DropsizeCalcCalculates the size of the drop on the OAV- Specified by:
dropsizeCalcin interfaceHC1DropsizeCalc- Returns:
- the drop size
-
setImage
Description copied from interface:HC1DropsizeCalcSets the image of the drop- Specified by:
setImagein interfaceHC1DropsizeCalc
-
getImage
Description copied from interface:HC1DropsizeCalcGets the last drop image- Specified by:
getImagein interfaceHC1DropsizeCalc
-
saveOAVParameters
- Specified by:
saveOAVParametersin classHC1DropsizeCalcBase- Throws:
DeviceException
-
restoreOAVParameters
protected void restoreOAVParameters()- Specified by:
restoreOAVParametersin classHC1DropsizeCalcBase
-
getSize
protected void getSize()- Specified by:
getSizein classHC1DropsizeCalcBase
-
getScale
protected void getScale()- Overrides:
getScalein classHC1DropsizeCalcBase
-
load_arrays
protected void load_arrays()- Specified by:
load_arraysin classHC1DropsizeCalcBase
-
drawOverlay
protected void drawOverlay()- Specified by:
drawOverlayin classHC1DropsizeCalcBase
-
setROIasCrosshair
public void setROIasCrosshair(int width) Description copied from interface:HC1DropsizeCalcSets the size of the cross hair in the centre of the ROI- Specified by:
setROIasCrosshairin interfaceHC1DropsizeCalc
-
truncate
public static int truncate(int grad)
-