imagej/imglib — pull request #34 by Squareys (2013-10-22 10:46:55+00:00)
Title: Generics cleanup

Hi all,

@dietzc and I started to clean-up several code fragements in ImgLib2 (core, algorithm, algorithm-gpl, core and very few changes in scripting).

We changed the following:
- Reduce generics if possible (e.g. R extends RandomAccessibleInterval implements UnaryOperation we reduce to UnaryOperation>)

- Replace Img with IterableInterval, Iterable, RandomAccessible or RandomAccessibleInterval (always the most general) where possible. Therefore we deprecated/added some constructors, as for the creation of several temporary images sometimes ImgFactories are explicitly needed.

What's still need to be done:
- You should review the changes which affect your code, e.g. maybe you want to rename several methods (getImage() e.g.) or you still see further possible improvements which we overlooked.

- Maybe while you are doing so, you could check if some of the classes are still valid/needed or even used (e.g. We were not sure how to improve Gauss.java and whether it's still needed as Gauss3 seems to be a very clean/beautiful implementation?)

- Several Algorithms can be improved if you allow the user to set the output as he wishes (as defined in UnaryOperation). Then, an algorithm doesn't need to know how to create the output (e.g. sometimes it's not an image, just any RandomAccessibleInterval).

We hope this is a good first step for cleanup of generics and excessive Img (even if it's not needed) usage.

Cheers,

Jonathan and Christian

Somehow these changes involve nearly everyone :-): @tinevez @LeeKamentsky @MichaelZinsmaier @hornm @dietzc @StephanPreibisch @axtimwalde @tpietzsch @ctrueden @dscho @acardona @bdezonia