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 RGB virtual stacks #44

Closed
hinerm opened this issue Jun 9, 2014 · 5 comments
Closed

Support RGB virtual stacks #44

hinerm opened this issue Jun 9, 2014 · 5 comments

Comments

@hinerm
Copy link
Member

hinerm commented Jun 9, 2014

When I try to open AVI images right now, they get to the point of converting to an ImagePlus and then I get the following exception:

    [Method] protected void org.scijava.ui.DefaultUIService.onEvent(org.scijava.display.event.DisplayCreatedEvent)
java.lang.IllegalArgumentException: RGB stacks not supported
    at ij.CompositeImage.<init>(CompositeImage.java:54)
    at net.imagej.legacy.translate.AbstractImagePlusCreator.makeImagePlus(AbstractImagePlusCreator.java:175)
    at net.imagej.legacy.translate.AbstractImagePlusCreator.makeImagePlus(AbstractImagePlusCreator.java:96)
    at net.imagej.legacy.translate.ColorImagePlusCreator.cellImgCase(ColorImagePlusCreator.java:152)
    at net.imagej.legacy.translate.ColorImagePlusCreator.createLegacyImage(ColorImagePlusCreator.java:104)
    at net.imagej.legacy.translate.DefaultImageTranslator.createLegacyImage(DefaultImageTranslator.java:124)
    at net.imagej.legacy.translate.DefaultImageTranslator.createLegacyImage(DefaultImageTranslator.java:110)
    at net.imagej.legacy.LegacyImageMap.registerDisplay(LegacyImageMap.java:179)
    at net.imagej.legacy.display.LegacyImageDisplayViewer.view(LegacyImageDisplayViewer.java:99)
    at net.imagej.legacy.ui.LegacyUI$1.run(LegacyUI.java:167)
    at org.scijava.thread.DefaultThreadService.invoke(DefaultThreadService.java:91)
    at net.imagej.legacy.ui.LegacyUI.show(LegacyUI.java:163)
    at org.scijava.ui.DefaultUIService.onEvent(DefaultUIService.java:378)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.scijava.event.DefaultEventService$ProxySubscriber.onEvent(DefaultEventService.java:278)
    at org.scijava.event.DefaultEventService$ProxySubscriber.onEvent(DefaultEventService.java:252)
    at org.bushe.swing.event.ThreadSafeEventService.publish(ThreadSafeEventService.java:971)
    at org.scijava.event.DefaultEventBus.access$101(DefaultEventBus.java:56)
    at org.scijava.event.DefaultEventBus$1.run(DefaultEventBus.java:197)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

So I'm pretty sure we can't open any .avi files until scifio/scifio#191 is resolved, and still we should make this work for virtual datasets.

@dscho
Copy link
Contributor

dscho commented Jun 10, 2014

Actually, it should be pretty easy to split the RGB images on imagej-legacy's side, no? Let's discuss this tomorrow in person.

@hinerm
Copy link
Member Author

hinerm commented Jun 10, 2014

note that other datasets are broken by this, too.. e.g. the dice.gif sample, which is an indexed time series and thus ends up being opened as an RGB stack, which fails.

Anyway yes let's discuss today @dscho ... i'd like to resolve this quickly.

@hinerm hinerm closed this as completed in 5998170 Jun 10, 2014
@hinerm
Copy link
Member Author

hinerm commented Jun 10, 2014

argh.. this was the wrong fix.. working on it now. we just want to be smarter about when wrapping in a composite image.

@hinerm hinerm reopened this Jun 10, 2014
@dscho
Copy link
Contributor

dscho commented Jun 10, 2014

I fear we'll have to add a Auto-convert grayscale .gif/.jpg images when loading with SCIFIO checkbox (needs help with the exact label, of course), defaulting to true to abide by the Law of the Least Surprise...

@hinerm
Copy link
Member Author

hinerm commented Jun 10, 2014

OK I think the color support is now correct and should clear up some confusion about RGB and composite images.. also, 3+ dim GIF and AVI should work again.

Fixed as of 5f77360

@hinerm hinerm closed this as completed Jun 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants