Interface FeatureExtractor<T>

Type Parameters:
T - generic parameter related to the ImageData (not always required).

public interface FeatureExtractor<T>
Interface for extracting features from PathObjects for the purpose of object classification.
Author:
Pete Bankhead
See Also:
  • Method Details

    • getFeatureNames

      List<String> getFeatureNames()
      Returns:
      the names of the features that can be extracted
    • nFeatures

      int nFeatures()
      Returns:
      the number of features that can be extracted
    • extractFeatures

      void extractFeatures(ImageData<T> imageData, Collection<? extends PathObject> pathObjects, FloatBuffer buffer)
      Extract features from a collection of objects, adding the corresponding values to a FloatBuffer. Each feature is a single numeric value. At the end, pathObjects.size() * nFeatures() features should be added to the buffer. Each object is processed in turn, with all features for that object added before the next object is processed.
      Parameters:
      imageData - image data, used by some implementations to determine feature values (e.g. if these depend upon pixels).
      pathObjects - objects for which features should be calculated
      buffer - buffer into which feature values should be added
    • getMissingFeatures

      Collection<String> getMissingFeatures(ImageData<T> imageData, PathObject pathObject)
      Check for missing features, returning the names. This is useful as a warning that the input for the feature extractor may not be valid. Default implementation returns an empty list; however, implementations should attempt to provide a meaningful output if possible.
      Parameters:
      imageData - image containing the objects to test
      pathObject - object to test for missing feature
      Returns:
      a collection of feature names that correspond to missing features