public class GenerateMask_ extends AbstractPluginQconf
Use Snake data produced by BOA and stored in QCONF file. If run from macro it shows image and
save it to folder where QCONF resides. If run as API it does not do any of these two actions, use
getRes()
to obtain image.
fileExt, qconfLoader
apiCall, errorSink, logger, options
Constructor and Description |
---|
GenerateMask_()
Executed if plugin is run from IJ.
|
GenerateMask_(String paramString)
Constructor that allows to provide own parameters.
|
Modifier and Type | Method and Description |
---|---|
String |
about()
Return plugin description.
|
ij.ImagePlus |
getRes()
Return image generated by plugin.
|
void |
run(String arg)
Called on plugin run by ImageJ or from API.
|
protected void |
runFromPaqp()
Called if loaded file is paQP.
|
protected void |
runFromQconf()
Called if loaded file is QCONF.
|
void |
showUi(boolean val)
Open plugin UI.
|
executer, getQconfLoader, loadFile, unload, validate
setPluginName
getOptions, parseArgumentString, publishMacroString
public GenerateMask_()
public GenerateMask_(String paramString) throws QuimpPluginException
paramString
- it can be null to ask user for file or it can be parameters string like that
passed in macro.QuimpPluginException
- on any errorpublic void run(String arg)
AbstractPluginBase
Overrides PlugIn.run(String)
. If input string is null or empty it sets
AbstractOptionsParser.errorSink
to
QuimpException.MessageSinkTypes.GUI
. Note that AbstractOptionsParser.apiCall
is set by
choosing proper constructor. Then it tries to parse specified parameter string, if it succeeds,
AbstractOptionsParser.options
is set and deserialised and AbstractPluginBase.executer()
method is
executed. If parsing fails, AbstractPluginBase.showUi(boolean)
is called with option true. If there is
parsable string AbstractOptionsParser.errorSink
is set to
QuimpException.MessageSinkTypes.IJERROR
Finally, macro string is published to ImageJ that represents current state of
AbstractOptionsParser.options
.
All exceptions thrown by plugin logic (from AbstractPluginBase.executer()
) are handled here depending
on AbstractOptionsParser.errorSink
value.
run
in interface ij.plugin.PlugIn
run
in class AbstractPluginBase
AbstractOptionsParser.parseArgumentString(String)
public String about()
IQuimpPlugin
protected void runFromQconf() throws QuimpException
AbstractPluginQconf
This method expects that AbstractPluginQconf.qconfLoader
is already set up (AbstractPluginBase.run(String)
. In
macro or IJ mode exceptions will be handled in place and displayed as IJERROR or GUI message.
For API call (only if initialised by
AbstractPluginQconf.AbstractPluginQconf(String, AbstractPluginOptions, String)
)
exceptions are re-thrown.
runFromQconf
in class AbstractPluginQconf
QuimpException
- on errorpublic ij.ImagePlus getRes()
Return 16bit image if GenerateMaskOptions.binary
is set to false with grayscale
indexed objects.
protected void runFromPaqp() throws QuimpException
AbstractPluginQconf
This method expects that AbstractPluginQconf.qconfLoader
is already set up (AbstractPluginBase.run(String)
. In
macro or IJ mode exceptions will be handled in place and displayed as IJERROR or GUI message.
For API call (only if initialised by
AbstractPluginQconf.AbstractPluginQconf(String, AbstractPluginOptions, String)
)
exceptions are re-thrown.
runFromPaqp
in class AbstractPluginQconf
QuimpException
- on errorpublic void showUi(boolean val) throws Exception
AbstractPluginBase
Executed if AbstractPluginBase.run(String)
could not parse parameters.
showUi
in class AbstractPluginBase
val
- true to show UIException
- on any error. Handled by AbstractPluginBase.run(String)
Copyright © 2002–2019 Department of Computer Science, Warwick University. All rights reserved.