Class DefineOutputter
Object
org.anchoranalysis.bean.AnchorBean<DefineOutputter>
org.anchoranalysis.plugin.mpp.bean.define.DefineOutputter
- Direct Known Subclasses:
DefineOutputterWithEnergy
public class DefineOutputter extends org.anchoranalysis.bean.AnchorBean<DefineOutputter>
Applies a
Define on inputs and outputs produced entities (images, histograms, objects
etc.).
The following outputs are produced:
| Output Name | Default? | Description |
|---|---|---|
| stacks | yes | Image-stacks that are produced. |
| objects | yes | Collections of ObjectMasks that are produced as HDF5 |
| histograms | yes | Histograms that are produced as CSV. |
| marks | yes | Collections of Marks that are produced as serialized XML. |
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDefineOutputter.Processor<T>Functional interface for processing anImageInitialization. -
Constructor Summary
Constructors Constructor Description DefineOutputter() -
Method Summary
Modifier and Type Method Description voidaddAllOutputNamesTo(org.anchoranalysis.io.output.enabled.OutputEnabledMutable outputEnabled)Adds all possible output-names to aOutputEnabledMutable.protected org.anchoranalysis.image.bean.nonbean.init.ImageInitializationcreateInitialization(org.anchoranalysis.experiment.io.InitializationContext context, Optional<org.anchoranalysis.core.identifier.provider.store.SharedObjects> sharedObjects, Optional<org.anchoranalysis.core.value.Dictionary> dictionary)Creates anImageInitializationfrom the given context, shared objects, and dictionary.protected org.anchoranalysis.image.bean.nonbean.init.ImageInitializationcreateInitialization(org.anchoranalysis.experiment.io.InitializationContext context, org.anchoranalysis.mpp.io.input.ExportSharedObjects input)Creates anImageInitializationfrom the given context and input.org.anchoranalysis.bean.define.DefinegetDefine()TheDefineto be applied on inputs.booleanisSuppressSubfolders()If true, suppresses the creation of subfolders for outputs.protected voidoutputSharedObjects(org.anchoranalysis.core.identifier.provider.store.SharedObjects sharedObjects, Optional<org.anchoranalysis.feature.energy.EnergyStack> energyStack, org.anchoranalysis.io.output.outputter.Outputter outputter)Outputs shared objects and optionally an energy stack.<S> voidprocess(org.anchoranalysis.experiment.task.InputBound<org.anchoranalysis.mpp.io.input.MultiInput,S> input, DefineOutputter.Processor<org.anchoranalysis.image.bean.nonbean.init.ImageInitialization> operation)Processes the input using the provided operation.voidsetDefine(org.anchoranalysis.bean.define.Define define)TheDefineto be applied on inputs.voidsetSuppressSubfolders(boolean suppressSubfolders)If true, suppresses the creation of subfolders for outputs.
-
Constructor Details
-
DefineOutputter
public DefineOutputter()
-
-
Method Details
-
addAllOutputNamesTo
public void addAllOutputNamesTo(org.anchoranalysis.io.output.enabled.OutputEnabledMutable outputEnabled)Adds all possible output-names to aOutputEnabledMutable.- Parameters:
outputEnabled- where to add all possible output-names
-
process
public <S> void process(org.anchoranalysis.experiment.task.InputBound<org.anchoranalysis.mpp.io.input.MultiInput,S> input, DefineOutputter.Processor<org.anchoranalysis.image.bean.nonbean.init.ImageInitialization> operation) throws org.anchoranalysis.core.exception.OperationFailedExceptionProcesses the input using the provided operation.- Type Parameters:
S- the type of the input- Parameters:
input- the input to processoperation- the operation to apply on the initialization- Throws:
org.anchoranalysis.core.exception.OperationFailedException- if the operation fails
-
createInitialization
protected org.anchoranalysis.image.bean.nonbean.init.ImageInitialization createInitialization(org.anchoranalysis.experiment.io.InitializationContext context, org.anchoranalysis.mpp.io.input.ExportSharedObjects input) throws org.anchoranalysis.core.exception.CreateExceptionCreates anImageInitializationfrom the given context and input.- Parameters:
context- the initialization contextinput- the input to create the initialization from- Returns:
- the created
ImageInitialization - Throws:
org.anchoranalysis.core.exception.CreateException- if the initialization creation fails
-
createInitialization
protected org.anchoranalysis.image.bean.nonbean.init.ImageInitialization createInitialization(org.anchoranalysis.experiment.io.InitializationContext context, Optional<org.anchoranalysis.core.identifier.provider.store.SharedObjects> sharedObjects, Optional<org.anchoranalysis.core.value.Dictionary> dictionary) throws org.anchoranalysis.core.exception.CreateExceptionCreates anImageInitializationfrom the given context, shared objects, and dictionary.- Parameters:
context- the initialization contextsharedObjects- optional shared objectsdictionary- optional dictionary- Returns:
- the created
ImageInitialization - Throws:
org.anchoranalysis.core.exception.CreateException- if the initialization creation fails
-
outputSharedObjects
protected void outputSharedObjects(org.anchoranalysis.core.identifier.provider.store.SharedObjects sharedObjects, Optional<org.anchoranalysis.feature.energy.EnergyStack> energyStack, org.anchoranalysis.io.output.outputter.Outputter outputter) throws org.anchoranalysis.io.output.error.OutputWriteFailedExceptionOutputs shared objects and optionally an energy stack.- Parameters:
sharedObjects- the shared objects to outputenergyStack- optional energy stack to outputoutputter- the outputter to use- Throws:
org.anchoranalysis.io.output.error.OutputWriteFailedException- if the output operation fails
-
getDefine
public org.anchoranalysis.bean.define.Define getDefine()TheDefineto be applied on inputs. -
setDefine
public void setDefine(org.anchoranalysis.bean.define.Define define)TheDefineto be applied on inputs. -
isSuppressSubfolders
public boolean isSuppressSubfolders()If true, suppresses the creation of subfolders for outputs. -
setSuppressSubfolders
public void setSuppressSubfolders(boolean suppressSubfolders)If true, suppresses the creation of subfolders for outputs.
-