imagej/imagej-ops — pull request #74 by dietzc (2014-10-06 20:26:10+00:00)
Title: FeatureService and Implementations

#### THIS PR IS FOR REVIEW ####

related issue: https://github.com/imagej/imagej-ops/issues/67

Ideas behind FeatureService:
* Provide Service to 'compile' a set of features
* Features are numerical descriptors for e.g. images or ROIs or ...

Compiling means:
* Resolve dependencies between features automatically (i.e. Mean requires Sum and Area)
* Calculate Features in same FeatureSet only once (i.e. if FeatureSet contains Sum and Mean, only calculate the Sum once and reuse it).

What to review
* Interface design (features vs. regular ops). For example FirstOrderStatOps vs. FirstOrderStatFeatures
* Visible vs. Invisible operations. Visible features are features which are exposed to the user, invisible ops are dependencies which can't be automatically resolved. Lots of prior knowledge required by the developer. And naming somehow not the best?
* What ever you like?

Good starting point:
* As usual, the tests. FeatureSetTest (which is not really a test yet, more a use-case) or FirstOrderFeaturesTest

Open Points:
* Smarter & nicer implementation of DefaultFeatureService: Currently it is a hack, but I think we can do way more now, as we have the tests ready and the interfaces more or less defined.
* In the end it's an optimization problem, which implementations of Features one should use in combination. But this can be done later. For now the simple heuristic in DefaultFeatureService is fine I think. We just need to make sure, that in the future we still can add more complex FeatureServices (i.e. smarter ones).
* JoinedFeatureSet (which combines several predefined feature-sets to one big one (easy I think)
* Multi-Threading?
* Discussion: How to add "PixelFeatures" to this framework (for pixel-classification). Should we at all?

Next Steps:
* @DanielSeebacher will implement geometric (size, circularity, convexity, perimeter etc pp), shape (fourier descriptors), tamura (texture), haralick 3d, zernike moments, hue moments etc. features and FeatureSets.