[ImageJ-devel] Code duplication...

Lee Kamentsky leek at broadinstitute.org
Tue Mar 13 10:45:14 CDT 2012


Hmmm... mine is certainly a candidate for removal. It looks like it is 
used in a couple of places and one is pretty pedantic. It's nice to have 
the ConstantRandomAccessible for places that take that instead of a 
ConstantRandomAccess.

I have a ConstantRealRandomAccess too, in the 
net.imglib2.sampler.special package. That doesn't fit into 
net.imglib2.img.constant. What happens to it?

If someone else wants to make the modifications, it's fine with me. If I 
were to do it, I'd add ConstantRandomAccessible to 
net.imglib2.img.constant, remove ConstantRandomAccessible and fix the 
two places where it's used. Any volunteers? If not, I'll mod.

--Lee

On 3/13/2012 11:04 AM, Tobias Pietzsch wrote:
> Hi,
>
> I just noticed that currently there are 3 (three!) 
> ConstantRandomAccess implementations in ImgLib2
>
> One by Albert in
> net.imglib2.script.img.fn
>
> One by Steffi in
> net.imglib2.img.constant
>
> And one by Lee (as an inner class) in
> net.imglib2.sampler.special.ConstantRandomAccess
>
> I didn't look in detail, but essentially all of those are doing the 
> same thing.  Could we maybe get rid of two of those?
>
> best regards,
> Tobias




More information about the ImageJ-devel mailing list