public class RandomWalkSegmentationPlugin_ extends AbstractPluginTemplate
Implements common PlugIn interface as both images are provided after run. The seed can be one image - in this case seed propagation is used to generate seed for subsequent frames, or it can be stack of the same size as image. In latter case every slice from seed is used for seeding related slice from image.
Principles of working:
Modifier and Type | Class and Description |
---|---|
class |
RandomWalkSegmentationPlugin_.BgController
Handle BG button.
|
class |
RandomWalkSegmentationPlugin_.CancelBtnController
Handle Cancel button.
|
class |
RandomWalkSegmentationPlugin_.CloneController
Handle Clone button.
|
class |
RandomWalkSegmentationPlugin_.FgController
Handle FG button.
|
class |
RandomWalkSegmentationPlugin_.LoadQconfController
Handle Load qconf button.
|
class |
RandomWalkSegmentationPlugin_.QconfShowSeedImageController
Handle show loaded qconf file mask button.
|
class |
RandomWalkSegmentationPlugin_.SeedRoiController
Handle seed ROI button.
|
apiCall, errorSink, logger, options
Constructor and Description |
---|
RandomWalkSegmentationPlugin_()
Default constructor.
|
RandomWalkSegmentationPlugin_(AbstractPluginOptions options)
This constructor allows to provide user configuration.
|
RandomWalkSegmentationPlugin_(String paramString)
Constructor that allows to provide own configuration parameters.
|
Modifier and Type | Method and Description |
---|---|
String |
about()
About string.
|
ij.ImagePlus |
getResult()
Retrieve result of segmentation.
|
RandomWalkModel |
readUI()
Updates model from view.
|
void |
run(String arg)
Called on plugin run by ImageJ or from API.
|
void |
runPlugin()
Run segmentation.
|
void |
showUi(boolean val)
Build main dialog.
|
void |
writeUI()
Updates view from model.
|
executer
setPluginName
getOptions, parseArgumentString, publishMacroString
public RandomWalkSegmentationPlugin_()
public RandomWalkSegmentationPlugin_(String paramString) throws QuimpPluginException
paramString
- parameter string.QuimpPluginException
- on errorpublic RandomWalkSegmentationPlugin_(AbstractPluginOptions options)
Call runPlugin()
afterwards. Note that AbstractOptionsParser.apiCall
is set
to true and sink to Console.
options
- configuration object.public void writeUI()
public RandomWalkModel readUI()
public void showUi(boolean val)
showUi
in class AbstractPluginBase
val
- the valpublic 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 void runPlugin()
Set AbstractOptionsParser.apiCall
(this.apiCall) to true and
RandomWalkModel.showPreview
to false to block visual output.
runPlugin
in class AbstractPluginTemplate
RandomWalkModel
,
RandomWalkSegmentationPlugin_(String)
,
getResult()
public ij.ImagePlus getResult()
Valid after runPlugin()
.
public String about()
Copyright © 2002–2019 Department of Computer Science, Warwick University. All rights reserved.