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 ObjectMask s that are produced as HDF5 |
histograms | yes | Histograms that are produced as CSV. |
marks | yes | Collections of Mark s that are produced as serialized XML. |
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Functional interface for processing anImageInitialization
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllOutputNamesTo
(OutputEnabledMutable outputEnabled) Adds all possible output-names to aOutputEnabledMutable
.protected ImageInitialization
createInitialization
(InitializationContext context, Optional<SharedObjects> sharedObjects, Optional<Dictionary> dictionary) Creates anImageInitialization
from the given context, shared objects, and dictionary.protected ImageInitialization
createInitialization
(InitializationContext context, ExportSharedObjects input) Creates anImageInitialization
from the given context and input.TheDefine
to be applied on inputs.boolean
If true, suppresses the creation of subfolders for outputs.protected void
outputSharedObjects
(SharedObjects sharedObjects, Optional<EnergyStack> energyStack, Outputter outputter) Outputs shared objects and optionally an energy stack.<S> void
process
(InputBound<MultiInput, S> input, DefineOutputter.Processor<ImageInitialization> operation) Processes the input using the provided operation.void
TheDefine
to be applied on inputs.void
setSuppressSubfolders
(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 anImageInitialization
from 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
TheDefine
to be applied on inputs. -
setDefine
TheDefine
to 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.
-