Class SharedStateSegmentInstance<T extends org.anchoranalysis.inference.InferenceModel>

Object
org.anchoranalysis.plugin.image.task.segment.SharedStateSegmentInstance<T>
Type Parameters:
T - model-type in pool

public class SharedStateSegmentInstance<T extends org.anchoranalysis.inference.InferenceModel>
extends Object
Shared-state for instance segmentation.
Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    SharedStateSegmentInstance​(org.anchoranalysis.inference.concurrency.ConcurrentModelPool<T> modelPool, org.anchoranalysis.image.feature.calculator.FeatureTableCalculator<org.anchoranalysis.image.feature.input.FeatureInputSingleObject> featureTable, org.anchoranalysis.feature.io.csv.metadata.LabelHeaders identifierHeaders, String outputNameFeatures, FeatureExporterContext context)
    Creates a new instance of SharedStateSegmentInstance.
  • Method Summary

    Modifier and Type Method Description
    void closeAndWriteOutputs​(ExportFeaturesStyle style)
    Writes all the results that have been collected as a CSV file, and closes open I/O handles and memory structures.
    FeatureCalculationContext<org.anchoranalysis.image.feature.calculator.FeatureTableCalculator<org.anchoranalysis.image.feature.input.FeatureInputSingleObject>> createCalculationContext​(org.anchoranalysis.core.time.ExecutionTimeRecorder executionTimeRecorder, org.anchoranalysis.io.output.outputter.InputOutputContext ioContext)
    Creates a FeatureCalculationContext for calculating features to later use this exporter.
    org.anchoranalysis.inference.concurrency.ConcurrentModelPool<T> getModelPool()
    The concurrent model pool for inference.

    Methods inherited from class java.lang.Object

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

    • SharedStateSegmentInstance

      public SharedStateSegmentInstance​(org.anchoranalysis.inference.concurrency.ConcurrentModelPool<T> modelPool, org.anchoranalysis.image.feature.calculator.FeatureTableCalculator<org.anchoranalysis.image.feature.input.FeatureInputSingleObject> featureTable, org.anchoranalysis.feature.io.csv.metadata.LabelHeaders identifierHeaders, String outputNameFeatures, FeatureExporterContext context) throws org.anchoranalysis.core.exception.CreateException
      Creates a new instance of SharedStateSegmentInstance.
      Parameters:
      modelPool - the concurrent model pool
      featureTable - the feature table calculator
      identifierHeaders - the label headers for identifiers
      outputNameFeatures - the output name for features
      context - the feature exporter context
      Throws:
      org.anchoranalysis.core.exception.CreateException - if there's an error creating the feature exporter
  • Method Details

    • createCalculationContext

      public FeatureCalculationContext<org.anchoranalysis.image.feature.calculator.FeatureTableCalculator<org.anchoranalysis.image.feature.input.FeatureInputSingleObject>> createCalculationContext​(org.anchoranalysis.core.time.ExecutionTimeRecorder executionTimeRecorder, org.anchoranalysis.io.output.outputter.InputOutputContext ioContext)
      Creates a FeatureCalculationContext for calculating features to later use this exporter.
      Parameters:
      executionTimeRecorder - records execution-times.
      ioContext - IO-context.
      Returns:
      a newly created context.
    • closeAndWriteOutputs

      public void closeAndWriteOutputs​(ExportFeaturesStyle style) throws org.anchoranalysis.io.output.error.OutputWriteFailedException
      Writes all the results that have been collected as a CSV file, and closes open I/O handles and memory structures.
      Parameters:
      style - the style for exporting features
      Throws:
      org.anchoranalysis.io.output.error.OutputWriteFailedException - if any output cannot be written, or there is an error closing open I/O.
    • getModelPool

      public org.anchoranalysis.inference.concurrency.ConcurrentModelPool<T> getModelPool()
      The concurrent model pool for inference.