T
- model-type in poolpublic class SegmentInstanceWithModel<T extends InferenceModel> extends Task<StackSequenceInput,SharedStateSegmentInstance<T>>
Various visualizations and export types are supported.
Specifically, the following outputs are produced:
Output Name | Default? | Description |
---|---|---|
no | The input image for segmentation. | |
yes | Segmented object-masks encoded into HDF5. | |
yes | A binary-mask image that binary ors each voxel across the segmented object-masks (scaled to match the input image for model inference). | |
yes | A RGB image showing the outline of segmented-objects on top of the input image (scaled to match the input image for model inference). | |
no | Like mask but on the full-scale input image. | |
no | Like outline but on on the full-scale input image. | |
yes | A CSV file showing basic feature of all segmented-objects across all input images. | |
yes | A directory of thumbnails showing the outline of all segmented objects on top of an extracted portion of the respective input-image. | |
outputs inherited from Task |
Constructor and Description |
---|
SegmentInstanceWithModel() |
Modifier and Type | Method and Description |
---|---|
void |
afterAllJobsAreExecuted(SharedStateSegmentInstance<T> sharedState,
InputOutputContext context)
Called once after all calls to
Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>) . |
SharedStateSegmentInstance<T> |
beforeAnyJobIsExecuted(Outputter outputter,
ConcurrencyPlan plan,
List<StackSequenceInput> inputs,
ParametersExperiment parameters)
Called once before all calls to
Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>) . |
OutputEnabledMutable |
defaultOutputs()
If specified, default rules for determine which outputs are enabled or not.
|
void |
doJobOnInput(InputBound<StackSequenceInput,SharedStateSegmentInstance<T>> input)
Performs the task on a particular input.
|
List<NamedBean<FeatureListProvider<FeatureInputSingleObject>>> |
getFeatures()
Features to calculate for objects in the features output.
|
Interpolator |
getInterpolator()
The interpolator to use for scaling images.
|
RGBColorBean |
getOutlineColor()
The color of the outline.
|
int |
getOutlineWidth()
The width of the outline.
|
SegmentStackIntoObjectsPooled<T> |
getSegment()
The segmentation algorithm.
|
ExportFeaturesStyle |
getStyle()
Visual style for how feature export occurs.
|
boolean |
hasVeryQuickPerInputExecution()
Is the execution-time of the task per-input expected to be very quick to execute?
|
InputTypesExpected |
inputTypesExpected()
Highest class(es) that will function as a valid input.
|
boolean |
isIgnoreNoObjects()
When true, then the outputs (outline, mask, image etc.) are not written for images that
produce no objects.
|
boolean |
isVaryColors()
When true, the colors change for different objects in the image (using a default color set).
|
void |
setFeatures(List<NamedBean<FeatureListProvider<FeatureInputSingleObject>>> features)
Features to calculate for objects in the features output.
|
void |
setIgnoreNoObjects(boolean ignoreNoObjects)
When true, then the outputs (outline, mask, image etc.) are not written for images that
produce no objects.
|
void |
setInterpolator(Interpolator interpolator)
The interpolator to use for scaling images.
|
void |
setOutlineColor(RGBColorBean outlineColor)
The color of the outline.
|
void |
setOutlineWidth(int outlineWidth)
The width of the outline.
|
void |
setSegment(SegmentStackIntoObjectsPooled<T> segment)
The segmentation algorithm.
|
void |
setStyle(ExportFeaturesStyle style)
Visual style for how feature export occurs.
|
void |
setVaryColors(boolean varyColors)
When true, the colors change for different objects in the image (using a default color set).
|
executeJob, isInputCompatibleWith
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public InputTypesExpected inputTypesExpected()
Task
This is usually the class of T (or sometimes the absolute base class InputFromManager).
inputTypesExpected
in class Task<StackSequenceInput,SharedStateSegmentInstance<T extends InferenceModel>>
public SharedStateSegmentInstance<T> beforeAnyJobIsExecuted(Outputter outputter, ConcurrencyPlan plan, List<StackSequenceInput> inputs, ParametersExperiment parameters) throws ExperimentExecutionException
Task
Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
.beforeAnyJobIsExecuted
in class Task<StackSequenceInput,SharedStateSegmentInstance<T extends InferenceModel>>
outputter
- the output-manager for the experiment (not for an individual job)plan
- available numbers of processors that can call Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
inputs
- a list of inputs, each will result in at least one call to Task.executeJob(ParametersUnbound)
.parameters
- the experiment-parameters.Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
and to Task.afterAllJobsAreExecuted(S, org.anchoranalysis.io.output.outputter.InputOutputContext)
.ExperimentExecutionException
- if a fatal error occurs executing this step of the
experiment.public void doJobOnInput(InputBound<StackSequenceInput,SharedStateSegmentInstance<T>> input) throws JobExecutionException
Task
doJobOnInput
in class Task<StackSequenceInput,SharedStateSegmentInstance<T extends InferenceModel>>
input
- the input for the job.JobExecutionException
- if an error occurs executing a particular job, that is not
otherwise suppressed.public void afterAllJobsAreExecuted(SharedStateSegmentInstance<T> sharedState, InputOutputContext context) throws ExperimentExecutionException
Task
Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
.afterAllJobsAreExecuted
in class Task<StackSequenceInput,SharedStateSegmentInstance<T extends InferenceModel>>
sharedState
- the shared-statecontext
- IO-context for experiment (not for an individual job)ExperimentExecutionException
- if a fatal error occurs executing this step of the
experiment.public boolean hasVeryQuickPerInputExecution()
Task
hasVeryQuickPerInputExecution
in class Task<StackSequenceInput,SharedStateSegmentInstance<T extends InferenceModel>>
public OutputEnabledMutable defaultOutputs()
Task
defaultOutputs
in class Task<StackSequenceInput,SharedStateSegmentInstance<T extends InferenceModel>>
public SegmentStackIntoObjectsPooled<T> getSegment()
public void setSegment(SegmentStackIntoObjectsPooled<T> segment)
public RGBColorBean getOutlineColor()
public void setOutlineColor(RGBColorBean outlineColor)
public boolean isVaryColors()
This takes precedence over outlineColor
.
public void setVaryColors(boolean varyColors)
This takes precedence over outlineColor
.
public int getOutlineWidth()
public void setOutlineWidth(int outlineWidth)
public List<NamedBean<FeatureListProvider<FeatureInputSingleObject>>> getFeatures()
If unspecified, default features of bounding-box coordinates and number of voxels are selected.
public void setFeatures(List<NamedBean<FeatureListProvider<FeatureInputSingleObject>>> features)
If unspecified, default features of bounding-box coordinates and number of voxels are selected.
public boolean isIgnoreNoObjects()
public void setIgnoreNoObjects(boolean ignoreNoObjects)
public ExportFeaturesStyle getStyle()
public void setStyle(ExportFeaturesStyle style)
public Interpolator getInterpolator()
public void setInterpolator(Interpolator interpolator)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.