Comments (9)
We had the naming discussion in Konstanz and I thought we agreed to the following:
- For each kind of operation, define a package and interface with that name. E.g.:
imagej.ops.mean
with interfaceMean
for operations named "mean". Copy and paste an existing interface when doing this, so you keep the style identical (NAME
constant, javadoc blurb about how to annotate the@Plugin
, etc.). - It is OK to have subinterfaces for different sorts of ops with the same name. See for example the type hierarchy of
imagej.ops.join.Join
. - Then, for each
Foo
interface, create anAbstractFoo
base class, as well as one or more concrete implementing subclasses each annotated with@Plugin
. Again, see the type hierarchy ofimagej.ops.join.Join
for an example.
from imagej-ops.
@dscho: Were there other aspects of naming that you feel are unclear or inconsistent?
from imagej-ops.
@ctrueden that's a nice summary! I'll turn it into a document after addressing a couple of completely unrelated issues.
from imagej-ops.
Thanks, @dscho.
from imagej-ops.
Sometimes the names are pretty long. Of course you can argument that in most of the cases you will not use the class names to instantiate those classes, rather one would use the name of the plugin, e.g. "join", anyway the long names are still somehow suboptimal.
Anyway, just for curiosity: What about things like putting an "I" in front of interface definitions and let the default definitions be the interface name without any "I"?
from imagej-ops.
What about things like putting an "I" in front of interface definitions and let the default definitions be the interface name without any "I"?
We considered that when ImageJ2 first began 4 years ago, but:
- The idea is for the names to be shorter, easier, more elegant, etc. for the API consumers. And on the flip side, it is OK for them to be a little more laborious for the API implementors. So the people using services should use a
PluginService
not anIPluginService
. That's interface-driven design: the interfaces are the object references that get passed around everywhere. Calling the default plugin service simplyPluginService
encourages people too much to use that class directly, when actually they should (almost) never import or use that class directly. - If we changed the naming scheme like that, I would want to do it across the board for the whole SciJava software stack and IMO it is vastly too late for that.
So anyway, I really like our current naming strategy and have no issues with it!
from imagej-ops.
There is the start of such a document about naming, BTW, at:
http://developer.imagej.net/coding-style#Naming
from imagej-ops.
@dscho Just a quick ping that this issue is still open. I'll leave it in 0.2.0 for now (i.e., "high priority" milestone), unless you are too busy to tackle it before mid-November.
from imagej-ops.
I started a document on the wiki. It is not fully specified, but it's a start. We will continue to update and flesh it out as needed.
from imagej-ops.
Related Issues (20)
- Median not returning mean of two middle values for even number of values HOT 8
- Add stats.mode op to compute modal value
- Confusing behavior for histogram HOT 2
- Quesrtion: Sobel filter HOT 3
- SobelRAI derivativeComputer array error prone if dimension mismatch HOT 5
- AbstractPadAndFFTFilter overrides OutOfBoundsFactory parameter of PadAndConvolveFFTF HOT 7
- Ops filter gauss does not respect the image dimensions HOT 1
- JOML version from parent pom conflicts with current scenery/sciview
- Repeated computation of co-occurrence matrix in haralick features
- Yen threshold differs from IJ1 HOT 4
- Fractal Dimension creates thousands of zombie threads that crash ImageJ HOT 4
- filter/addPoissonNoise hangs up with large pixel values
- Size inconsistencies for Polygon2Ds HOT 2
- Improve OpSearchResult to give limited type information in stringified op HOT 2
- OpListings ignore preallocated outputs
- DefaultGaussRAI.compute() reports cryptic IAE for sigma dimension mismatch HOT 1
- ClassCastException from ConstantToIIOutputII
- OpSearcher reduces OpListings too eagerly HOT 3
- CreateOutputFFTMethods requires a image creator that can take an ImgFactory HOT 1
- FrangiVesselness: Auto-fill the spacing field
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imagej-ops.