T
- the named-channels-input we expect to receiveS
- shared-state of the taskU
- the named-channels-input the delegate task containspublic class ConvertNamedChannels<T extends NamedChannelsInput,S,U extends InputFromManager> extends Task<T,SharedStateRememberConverted<U,S>> implements ReplaceTask<U,S>
NamedChannelsInput
to a variety of others to match a delegate task.
The other types, to which a NamedChannelsInput
will be converted are:
Note that the presence of ReplaceTask
gives special behavior to this task in the
JobProcessor
.
Constructor and Description |
---|
ConvertNamedChannels() |
Modifier and Type | Method and Description |
---|---|
void |
afterAllJobsAreExecuted(SharedStateRememberConverted<U,S> sharedState,
InputOutputContext context)
Called once after all calls to
Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>) . |
SharedStateRememberConverted<U,S> |
beforeAnyJobIsExecuted(Outputter outputter,
ConcurrencyPlan concurrencyPlan,
List<T> 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<T,SharedStateRememberConverted<U,S>> inputBound)
Performs the task on a particular input.
|
StackReader |
getDefaultStackReaderForMetadata()
Supplies to the
imageMetadataReader to use, if no other reader is specified. |
ImageMetadataReader |
getImageMetadataReader()
How to read the
ImageMetadata from the file-system. |
Task<U,S> |
getTask()
The underlying task that will be called, perhaps with a different input-type.
|
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.
|
void |
replaceTask(Task<U,S> taskToReplace)
Replace the currently-assigned
Task with another. |
void |
setDefaultStackReaderForMetadata(StackReader defaultStackReaderForMetadata)
Supplies to the
imageMetadataReader to use, if no other reader is specified. |
void |
setImageMetadataReader(ImageMetadataReader imageMetadataReader)
How to read the
ImageMetadata from the file-system. |
void |
setTask(Task<U,S> task)
The underlying task that will be called, perhaps with a different input-type.
|
executeJob, isInputCompatibleWith
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public SharedStateRememberConverted<U,S> beforeAnyJobIsExecuted(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<T> inputs, ParametersExperiment parameters) throws ExperimentExecutionException
Task
Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
.beforeAnyJobIsExecuted
in class Task<T extends NamedChannelsInput,SharedStateRememberConverted<U extends InputFromManager,S>>
outputter
- the output-manager for the experiment (not for an individual job)concurrencyPlan
- 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<T,SharedStateRememberConverted<U,S>> inputBound) throws JobExecutionException
Task
doJobOnInput
in class Task<T extends NamedChannelsInput,SharedStateRememberConverted<U extends InputFromManager,S>>
inputBound
- the input for the job.JobExecutionException
- if an error occurs executing a particular job, that is not
otherwise suppressed.public InputTypesExpected inputTypesExpected()
Task
This is usually the class of T (or sometimes the absolute base class InputFromManager).
inputTypesExpected
in class Task<T extends NamedChannelsInput,SharedStateRememberConverted<U extends InputFromManager,S>>
public void afterAllJobsAreExecuted(SharedStateRememberConverted<U,S> sharedState, InputOutputContext context) throws ExperimentExecutionException
Task
Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
.afterAllJobsAreExecuted
in class Task<T extends NamedChannelsInput,SharedStateRememberConverted<U extends InputFromManager,S>>
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<T extends NamedChannelsInput,SharedStateRememberConverted<U extends InputFromManager,S>>
public void replaceTask(Task<U,S> taskToReplace) throws OperationFailedException
ReplaceTask
Task
with another.replaceTask
in interface ReplaceTask<U extends InputFromManager,S>
taskToReplace
- the task to replace.OperationFailedException
- if the task cannot be successfully replaced.public OutputEnabledMutable defaultOutputs()
Task
defaultOutputs
in class Task<T extends NamedChannelsInput,SharedStateRememberConverted<U extends InputFromManager,S>>
public Task<U,S> getTask()
public void setTask(Task<U,S> task)
public ImageMetadataReader getImageMetadataReader()
ImageMetadata
from the file-system.public void setImageMetadataReader(ImageMetadataReader imageMetadataReader)
ImageMetadata
from the file-system.public StackReader getDefaultStackReaderForMetadata()
imageMetadataReader
to use, if no other reader is specified.public void setDefaultStackReaderForMetadata(StackReader defaultStackReaderForMetadata)
imageMetadataReader
to use, if no other reader is specified.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.