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

Support conversion of complex-valued ImgLib2 images to Python #78

Open
rafaelgov95 opened this issue May 9, 2020 · 2 comments
Open
Labels
enhancement New feature or request
Milestone

Comments

@rafaelgov95
Copy link

rafaelgov95 commented May 9, 2020

I'm not able to print FFT results with ij.py.show!

import skimage
import imagej
import numpy as np
from skimage import io
import imagej
import imglyb
from jnius import cast
from jnius import autoclass


ij = imagej.init('sc.fiji:fiji:2.0.0-pre-10')

img = io.imread('https://www.fi.edu/sites/fi.live.franklinds.webair.com/files/styles/featured_large/public/General_EduRes_Heart_BloodVessels_0.jpg')

img = np.mean(img, axis=2)
print(ij.op().help('filter.fft'))
result= ij.op().filter().fft(ij.py.to_java(img))

Error 'JavaException: JVM exception occurred: java.util.concurrent.ExecutionException: java.lang.ClassCastException: net.imglib2.type.numeric.complex.ComplexFloatType cannot be cast to net.imglib2.type.numeric.real.AbstractRealType java.lang.RuntimeException'

@ctrueden ctrueden added this to the m1 milestone Nov 5, 2021
@ctrueden ctrueden changed the title FFT filter with show number complex Support conversion of complex-valued ImgLib2 images to Python Nov 5, 2021
@ctrueden
Copy link
Member

ctrueden commented Nov 5, 2021

@rafaelgov95 Apologies that this was never answered. The problem is that ImgLib2 images can be complex-valued, and we are not handling conversion of this case.

@ctrueden ctrueden added the enhancement New feature or request label Nov 5, 2021
@ctrueden ctrueden modified the milestones: paper, unscheduled Apr 18, 2022
@ctrueden
Copy link
Member

I wish someone at LOCI had time to work on this, but we don't. So it remains an open opportunity for enhancement. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants