[ImageJ-devel] Confusion about SubsampleIntervalView, HyperSliceImgPlus, etc.
Curtis Rueden
ctrueden at wisc.edu
Mon Feb 23 16:44:58 CST 2015
Hi Jan,
Apologies for the delay in reply.
> I run into conflict between net.imglib2.meta.ImgPlus<T> and
> net.imagej.ImgPlus<T> now.
That suggests a clash of dependencies. The "net.imglib2.meta.ImgPlus" is
gone, in favor of (for the time being [1]) net.imagej.ImgPlus.
Everything should work if you update your POM to extend the newest
pom-imagej (5.10.0 at the time of this writing), and purge all "import
net.imglib2.meta" lines from your imports in favor of the new "import
net.imagej" class instead. The HyperSliceImgPlus, though deprecated, was
updated to use net.imagej.ImgPlus, so hopefully this will work for you.
> what should I use for the subsampling operations to do it properly?
The API for doing this is still under development. The Views.interpolate
method [2] is probably a good starting point, though it is rather low
level. If what you want is to resample an image, we should create an op for
that in the ImageJ OPS project (I don't think one exists yet).
Regards,
Curtis
[1] In case you are curious: the ImgPlus class really needs a better
interface-driven type hierarchy, which has been a long time in coming. It
is planned to rework the ImageJ2 data model a bit along these lines later
this year.
[2]
http://javadoc.imagej.net/ImgLib2/net/imglib2/view/Views.html#interpolate(F,%20net.imglib2.interpolation.InterpolatorFactory)
On Fri, Feb 13, 2015 at 6:45 AM, Jan Schier <schier at utia.cas.cz> wrote:
> Hi,
>
> Excuse me perhaps naive questions for this list. I have, say, reasonable
> experience with Java coding for ImageJ1, and now I have tried to touch
> ImageJ2 and ImgLib2
>
> I have written some code using Haar wavelets on 3D images last year, using
> HyperSliceImgPlus.fixChannelAxis() to select the channel and then
> SubsampleIntervalView etc. to get the sampling for wavelet computation.
>
> Essentially, I have used something like
>
> final ImgPlus<T> input = (ImgPlus<T>)dataset.getImgPlus();
> final Img<T> viewChan = HyperSliceImgPlus.fixChannelAxis(input, 1L);
>
> and then I was using Img<T> for subsampling and further processing.
> With this code, I run into conflict between net.imglib2.meta.ImgPlus<T>
> and net.imagej.ImgPlus<T> now.
>
> I wanted to extend it now, but things have changed a lot with ops. I
> assume that my approach of working on Img<T> is incorrect now.
>
> - how should I replace the above construct for channel selection now?
>
> - what should I use for the subsampling operations to do it properly? I
> assume I should stay at the Dataset or ImgPlus level?
>
> Many thanks for any hint,
>
> Jan
>
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagej.net
> http://imagej.net/mailman/listinfo/imagej-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20150223/98c07789/attachment.html>
More information about the ImageJ-devel
mailing list