Class DefineOutputter
- Direct Known Subclasses:
DefineOutputterWithEnergy
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 ClassesModifier and TypeClassDescriptionstatic interfaceFunctional interface for processing anImageInitialization. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllOutputNamesTo(OutputEnabledMutable outputEnabled) Adds all possible output-names to aOutputEnabledMutable.protected ImageInitializationcreateInitialization(InitializationContext context, Optional<SharedObjects> sharedObjects, Optional<Dictionary> dictionary) Creates anImageInitializationfrom the given context, shared objects, and dictionary.protected ImageInitializationcreateInitialization(InitializationContext context, ExportSharedObjects input) Creates anImageInitializationfrom the given context and input.TheDefineto be applied on inputs.booleanIf true, suppresses the creation of subfolders for outputs.protected voidoutputSharedObjects(SharedObjects sharedObjects, Optional<EnergyStack> energyStack, Outputter outputter) Outputs shared objects and optionally an energy stack.<S> voidprocess(InputBound<MultiInput, S> input, DefineOutputter.Processor<ImageInitialization> operation) Processes the input using the provided operation.voidTheDefineto be applied on inputs.voidsetSuppressSubfolders(boolean suppressSubfolders) If true, suppresses the creation of subfolders for outputs.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
DefineOutputter
public DefineOutputter()
-
-
Method Details
-
addAllOutputNamesTo
Adds all possible output-names to aOutputEnabledMutable.- Parameters:
outputEnabled- where to add all possible output-names
-
process
public <S> void process(InputBound<MultiInput, S> input, DefineOutputter.Processor<ImageInitialization> operation) throws 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:
OperationFailedException- if the operation fails
-
createInitialization
protected ImageInitialization createInitialization(InitializationContext context, Optional<SharedObjects> sharedObjects, Optional<Dictionary> dictionary) throws CreateException Creates anImageInitializationfrom the given context, shared objects, and dictionary.- Parameters:
context- the initialization contextsharedObjects- optional shared objectsdictionary- optional dictionary- Returns:
- the created
ImageInitialization - Throws:
CreateException- if the initialization creation fails
-
getDefine
TheDefineto be applied on inputs. -
setDefine
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.
-