Hi ImgLib2-ers,
long mail coming, sorry.
I just pushed some updates into ImgLib2's master branch. Maven seems
happy with both Eclipse and OpenJDK6. Please let me know if there are
issues with the Oracle Java or whatever, cannot test it all.
Summary of the updates:
* Accessibles transformed by RealTransforms copy the RealTransform for
each RealRandomAccess. This is safer in concurrent situations and
doesn't cost much. However, it slightly changes the behavior of
non-constant Accessibles. Modifying the transformation does not
immediately affect all existing Accesses any more. I wrote som comments
about that.
* RealTransforms need a copy method
* VolatileTypes moved into the display package where they are most
useful. However, I feel that the VolatileType concept is still in flux
and needs some more thought. It immediately comes to mind that one may
want to encode more than 2 states or have a real weight (certainty?)
instead of a state. Most general it looks very much as this is just a
special incarnation of a Pair<A,B>. More to come... To explain: I
needed something like the VolatileType for containers that are slowly
fetching remote data. Instead of waiting for every pixel, these
containers can always provide a value that is either correct or not yet
loaded (valid or invalid).
* I added an ARGBDoubleType and a NativeARGBDoubleType for double
precision ARGB calculations. Helpful for visualization stuff.
* There is now a View that collapses the trailing dimension of a
RandomAccessible into a CompositeType. The result is an n-1 dimensional
RandomAccessible with composite values. The motivation is that:
When we have a transformed view of a multi-color image, then accessing
each of the color channels individually requires that either
- all channels exist as an individual transformed view and the
coordinates are transformed for each channels separately, or
- one applies a n-1 dimensional transformation to an n-dimensional
source (not so clean) and traverses along the n-th dimension in the
transformed target. With real transformations, this still requires to
add a vector to the coordinates of which all but one value are
0---stupid.
With the collapsed View, the n-1 dimensional transformation is applied
only once in n-1 dimensional space and the traversal in the composite
dimension is performed in source-space, modifying just one dimension.
I haven't yet made Composites RandomAccessibles or Iterables. The
reason is that they are usually short, and creating an accessor to
traverse their values would be overkill. We are, however, planning to
have this more general construct available at some point: Collapsing
and n+m dimensional RandomAccessible into an n-dimensional
RandomAccessible of m-dimensional RandomAccessibles. The simpler
Composite construct enabled me to implement Numeric and Real
specializations that can directly be used for interpolation, conversion
and whatever. Check the new examples in imglib2-examples.
Composites and ARGBDoubleTypes enabled me to generate this beautiful
volume rendering from original 16bit multi-channel data using a purely
ImgLib2 based off-line renderer:
http://fly.mpi-cbg.de/~saalfeld/video/l1-cns-argb-imglib2-volume-rendering.mov
(play it in a loop)
Nothing written in stone. Comments and complaints very welcome and
thanks for reading this to the end ;)
Best,
Stephan