Package clickDetector.localisation
Class GeneralGroupLocaliser
java.lang.Object
clickDetector.localisation.GeneralGroupLocaliser
- All Implemented Interfaces:
LocalisationAlgorithm,LocalisationAlgorithmInfo,LocaliserModel<PamDataUnit>
- Direct Known Subclasses:
ClickGroupLocaliser
public abstract class GeneralGroupLocaliser
extends Object
implements LocaliserModel<PamDataUnit>, LocalisationAlgorithm, LocalisationAlgorithmInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionList of possible localiser (do not serialise) -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindLocaliserAlgorithm(String algorithmName) Find an algorithm by namevoidGenerate the list of available localisers.Get information about the localisation algorithm.Get the algorithm nameGet the settings pane for the localiser.abstract ClickLocParamsintGet the likely content flags for this localiser.getLocalizationOptionsPanel(Window parent, LocalizationBuilder locBuilder) Get options panel to either build into the export dialog or to show as a separate dialog (in which case export wizard will show a button).The type of localisation information the localiser can accept.abstract StringgetName()Get the name which describes the localiser.Get the algorithm parameters.Get something that can make LocalisationType objects of a form a bit bespoke to the type of localiser.booleanTrue if the model has parameters to set.voidnotifyModelProgress(double progress) This should be called whenever the localiser has finished processing and, if the localisation process is long, then updates progress.booleanresultsFilterOK(GroupLocalisation groupLocalisation) Filter results before localisation is selected based on AIC value.runModel(PamDataUnit pamDataUnit, DetectionGroupOptions detectionGroupOptions) Run the click group localiser.runModel(PamDataUnit pamDataUnit, DetectionGroupOptions detectionGroupOptions, boolean addLoc) Run the localisation model.
-
Field Details
-
locAlgorithmList
List of possible localiser (do not serialise)
-
-
Constructor Details
-
GeneralGroupLocaliser
public GeneralGroupLocaliser()
-
-
Method Details
-
getName
Description copied from interface:LocaliserModelGet the name which describes the localiser.- Specified by:
getNamein interfaceLocaliserModel<PamDataUnit>- Returns:
- the name of the localiser.
-
getClickLocParams
-
generateLocList
public void generateLocList()Generate the list of available localisers. -
getToolTipText
- Specified by:
getToolTipTextin interfaceLocaliserModel<PamDataUnit>
-
getAlgorithmSettingsPane
Description copied from interface:LocaliserModelGet the settings pane for the localiser. Allows users to change localiser settings.- Specified by:
getAlgorithmSettingsPanein interfaceLocaliserModel<PamDataUnit>- Returns:
- the settings pane for the localiser.
-
findLocaliserAlgorithm
Find an algorithm by name- Parameters:
algorithmName-- Returns:
-
hasParams
public boolean hasParams()Description copied from interface:LocaliserModelTrue if the model has parameters to set. If has the localiser has a settings pane it will have parameters. This generally puts an extra button onto a display panel.- Specified by:
hasParamsin interfaceLocaliserModel<PamDataUnit>
-
notifyModelProgress
public void notifyModelProgress(double progress) Description copied from interface:LocaliserModelThis should be called whenever the localiser has finished processing and, if the localisation process is long, then updates progress.- Specified by:
notifyModelProgressin interfaceLocaliserModel<PamDataUnit>
-
runModel
public GroupLocalisation runModel(PamDataUnit pamDataUnit, DetectionGroupOptions detectionGroupOptions) Run the click group localiser.- Parameters:
pamDataUnit- - the group detection to localise.- Returns:
- the best fit GroupLocalisation.
-
resultsFilterOK
Filter results before localisation is selected based on AIC value. If the localisation contains multiple ambiguities, then it will pass as long as one of the ambiguous results passes the filter.- Parameters:
groupLocalisation- - the localisation result to test.- Returns:
- true if localisation passes the filter tests.
-
runModel
public GroupLocalisation runModel(PamDataUnit pamDataUnit, DetectionGroupOptions detectionGroupOptions, boolean addLoc) Description copied from interface:LocaliserModelRun the localisation model. Once completed the results are added to the AbstractLoclaisation class of the input PamDataUnit. Note that algorithms may run on a separate thread. Once processing has finished the notifyModelFinished function is called with a progress of 1;.- Specified by:
runModelin interfaceLocaliserModel<PamDataUnit>- Parameters:
pamDataUnit- the pamDataUnit. This can be a super unit if multiple detections are required.addLoc- automatically add the localisation result to the data unit, replacing it's current localisation info.
-
getLocContents
Description copied from interface:LocaliserModelThe type of localisation information the localiser can accept. e.g. bearings, time delays etc. The types are defined in the AbstractLocalisation class.- Specified by:
getLocContentsin interfaceLocaliserModel<PamDataUnit>- Returns:
- integer bitmap of the type of localisation information the localiser can use.
-
getAlgorithmInfo
Description copied from interface:LocalisationAlgorithmGet information about the localisation algorithm.- Specified by:
getAlgorithmInfoin interfaceLocalisationAlgorithm- Returns:
- algorithm information.
-
getTethysCreator
Description copied from interface:LocalisationAlgorithmGet something that can make LocalisationType objects of a form a bit bespoke to the type of localiser. This may be better than having the standard functions in LocalizationBuilder guess what's best.- Specified by:
getTethysCreatorin interfaceLocalisationAlgorithm- Returns:
- can be null in which case standard functions will do the best they can.
-
getLocalisationContents
public int getLocalisationContents()Description copied from interface:LocalisationAlgorithmInfoGet the likely content flags for this localiser.- Specified by:
getLocalisationContentsin interfaceLocalisationAlgorithmInfo- Returns:
- localisation flags.
- See Also:
-
getAlgorithmName
Description copied from interface:LocalisationAlgorithmInfoGet the algorithm name- Specified by:
getAlgorithmNamein interfaceLocalisationAlgorithmInfo- Returns:
- algorithm name
-
getParameters
Description copied from interface:LocalisationAlgorithmInfoGet the algorithm parameters. Something else can turn these into xml for Tethys.- Specified by:
getParametersin interfaceLocalisationAlgorithmInfo- Returns:
- algorithm parameters object. Might be null;
-
getLocalizationOptionsPanel
public LocalizationOptionsPanel getLocalizationOptionsPanel(Window parent, LocalizationBuilder locBuilder) Description copied from interface:LocalisationAlgorithmInfoGet options panel to either build into the export dialog or to show as a separate dialog (in which case export wizard will show a button). Can be null if no options.- Specified by:
getLocalizationOptionsPanelin interfaceLocalisationAlgorithmInfo- Parameters:
locBuilder-- Returns:
- options panel or null if there are no options.
-