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 NameDefault?Description
stacksyesImage-stacks that are produced.
objectsyesCollections of ObjectMasks that are produced as HDF5
histogramsyesHistograms that are produced as CSV.
marksyesCollections of Marks that are produced as serialized XML.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static interface  DefineOutputter.Processor<T>
    Functional interface for processing an ImageInitialization.
  • Constructor Summary

    Constructors 
    Constructor Description
    DefineOutputter()  
  • Method Summary

    Modifier and Type Method Description
    void addAllOutputNamesTo​(org.anchoranalysis.io.output.enabled.OutputEnabledMutable outputEnabled)
    Adds all possible output-names to a OutputEnabledMutable.
    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)
    Creates an ImageInitialization from the given context, shared objects, and dictionary.
    protected org.anchoranalysis.image.bean.nonbean.init.ImageInitialization createInitialization​(org.anchoranalysis.experiment.io.InitializationContext context, org.anchoranalysis.mpp.io.input.ExportSharedObjects input)
    Creates an ImageInitialization from the given context and input.
    org.anchoranalysis.bean.define.Define getDefine()
    The Define to be applied on inputs.
    boolean isSuppressSubfolders()
    If true, suppresses the creation of subfolders for outputs.
    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)
    Outputs shared objects and optionally an energy stack.
    <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)
    Processes the input using the provided operation.
    void setDefine​(org.anchoranalysis.bean.define.Define define)
    The Define 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • addAllOutputNamesTo

      public void addAllOutputNamesTo​(org.anchoranalysis.io.output.enabled.OutputEnabledMutable outputEnabled)
      Adds all possible output-names to a OutputEnabledMutable.
      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.OperationFailedException
      Processes the input using the provided operation.
      Type Parameters:
      S - the type of the input
      Parameters:
      input - the input to process
      operation - 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.CreateException
      Creates an ImageInitialization from the given context and input.
      Parameters:
      context - the initialization context
      input - 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.CreateException
      Creates an ImageInitialization from the given context, shared objects, and dictionary.
      Parameters:
      context - the initialization context
      sharedObjects - optional shared objects
      dictionary - 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.OutputWriteFailedException
      Outputs shared objects and optionally an energy stack.
      Parameters:
      sharedObjects - the shared objects to output
      energyStack - optional energy stack to output
      outputter - the outputter to use
      Throws:
      org.anchoranalysis.io.output.error.OutputWriteFailedException - if the output operation fails
    • getDefine

      public org.anchoranalysis.bean.define.Define getDefine()
      The Define to be applied on inputs.
    • setDefine

      public void setDefine​(org.anchoranalysis.bean.define.Define define)
      The Define 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.