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

Handling of X and Y axes of an image by IJM.show() #16

Open
kouichi-c-nakamura opened this issue Apr 3, 2018 · 3 comments
Open

Handling of X and Y axes of an image by IJM.show() #16

kouichi-c-nakamura opened this issue Apr 3, 2018 · 3 comments

Comments

@kouichi-c-nakamura
Copy link
Contributor

kouichi-c-nakamura commented Apr 3, 2018

Following discussion in here, I'd like to raise an issue about IJM.show().

IJM.show('I') or net.imagej.matlab.ImageJMATLABCommands.show('I') is a great way to transfer array data from MATLAB workspace to ImageJ, thanks to ImageJ-MATLAB.

However, I’ve noticed that X and Y of axes of images are flipped over between MATLAB and ImageJ, which is not smart at all.

MATLAB's permute can manipulate data to avoid this problem. But, because it apparently needs to copy data internally, it requires double memory, which is not ideal. An imglib2 /ImageJ2 -style permute (which re-indexes but does not copy) might be a better solution.

This issue is also related, but more specifically about multidimensional images.

#17

@stelfrich stelfrich changed the title Handling of X and Y axes of an image by IVM.show() Handling of X and Y axes of an image by IJM.show() Apr 3, 2018
@kouichi-c-nakamura
Copy link
Contributor Author

kouichi-c-nakamura commented Apr 19, 2018

IJM.show() in ImageJ-MATLAB does not support multi-dimentional or multi-channel images
http://forum.imagej.net/t/ijm-show-in-imagej-matlab-does-not-support-multi-dimentional-or-multi-channel-images/10156/7

@kouichi-c-nakamura
Copy link
Contributor Author

I wrote a wrapper function of IJM.show called ijmshow, and it can handle the X and Y axes nicely.

https://github.com/kouichi-c-nakamura/ijmshow/

@imagejan
Copy link
Member

This issue doesn't only affect IJM.show() but in general the conversion between IJ and Matlab. For example, data input by #@ script parameters suffer from the same issue:

  • #@matrix data -> y * x
  • imread(path-to-file) -> x * y

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

2 participants