Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copytoImgPlus.m does not work #188

Closed
kouichi-c-nakamura opened this issue May 17, 2018 · 4 comments
Closed

copytoImgPlus.m does not work #188

kouichi-c-nakamura opened this issue May 17, 2018 · 4 comments

Comments

@kouichi-c-nakamura
Copy link
Contributor

scripts/copytoImgPlus.m does not work

In the following line, the code is trying to convert ArrayImg to ImgPlus, but it seems that there is no ImgPlus class in imglib2 any longer. I could not find an equivalent either.

imgplus = net.imglib2.img.ImgPlus(img, name, ax, calibration);

Does anyone know a way to fix this?

@imagejan
Copy link
Member

It should be net.imagej.ImgPlus from imagej-common.

@kouichi-c-nakamura
Copy link
Contributor Author

Fixed as below:

imgplus = net.imagej.ImgPlus(img, name, ax, calibration);

Issued an error:

No constructor 'net.imagej.ImgPlus' with matching signature found.
Error in copytoImgPlus (line 136)
imgplus = net.imagej.ImgPlus(img, name, ax, calibration); 

However net.imagej.ImgPlus(img, name) works fine.

ax is supposed to be AxisType[] and it looks like AxisType[]:

ax =
  net.imglib2.meta.DefaultAxisType[]:
    [net.imglib2.meta.DefaultAxisType]
    [net.imglib2.meta.DefaultAxisType]
    [net.imglib2.meta.DefaultAxisType]
    [net.imglib2.meta.DefaultAxisType]
    [net.imglib2.meta.DefaultAxisType]

I wonder why it's been rejected. Any idea, please?

@imagejan
Copy link
Member

imagejan commented Jul 2, 2018

The axes should be using the net.imagej.axis.AxisType interface now.

MATCHING_AXES = [
net.imglib2.meta.Axes.X
net.imglib2.meta.Axes.Y
net.imglib2.meta.Axes.Z
net.imglib2.meta.Axes.TIME
net.imglib2.meta.Axes.CHANNEL ];

And these should accordingly be net.imagej.axis.Axes.X etc.

@kouichi-c-nakamura
Copy link
Contributor Author

PR created
#200

@ctrueden ctrueden closed this as completed Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants