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 ImagePlus parameters #49

Open
hinerm opened this issue May 26, 2022 · 6 comments
Open

Support ImagePlus parameters #49

hinerm opened this issue May 26, 2022 · 6 comments
Assignees
Milestone

Comments

@hinerm
Copy link
Member

hinerm commented May 26, 2022

image-plus-not-supported

The Manual Threshold... .js script creeps into the search results and its ImagePlus parameter doesn't map appropriately. This will have to be handled appropriately in conjunction with imagej/imagej-legacy#264

@hinerm hinerm added this to the 1.0.0 milestone May 26, 2022
@ctrueden
Copy link
Member

ctrueden commented May 26, 2022

In general, we need to handle ImagePlus inputs and outputs. Users may write their own scripts that use this data structure, and will expect it to work with these scripts installed into their ImageJ2 environment. The PyImageJ project should handle them though, so making napari-imagej deal with them as well shouldn't be extra effort? I hope. Just need to figure out why the type mapping here is wrong.

@ctrueden ctrueden changed the title Some ImagePlus commands can creep in Support ImagePlus parameters May 26, 2022
@gselzer gselzer self-assigned this May 26, 2022
@gselzer
Copy link
Collaborator

gselzer commented May 26, 2022

Just need to figure out why the type mapping here is wrong.

It is because it is commented out 😜

This fix may be as simple as uncommenting these lines.

@ctrueden
Copy link
Member

This fix may be as simple as uncommenting these lines.

I think it needs to be conditional on the original ImageJ being present on the classpath, though. You don't want napari-imagej to crash when the legacy layer is absent.

@gselzer
Copy link
Collaborator

gselzer commented May 26, 2022

Yes, we should surround that import with a try/except

@gselzer
Copy link
Collaborator

gselzer commented Dec 8, 2022

Okay, so here's the current state of the major players in this PR.

  • We can get an ImagePlus from napari Image layers. For that reason, you won't get any errors when you run ManualThreshold.js.
  • The ManualThreshold command doesn't do anything in napari-imagej, because it alters the (original ImageJ) color table via ImageProcessor.setThreshold. The color table changes do not transfer into napari-imagej - I'm guessing they cannot be synced into the Dataset via the legacy image map...

What is the step forward here? Is there anything left to do as far as napari-imagej goes? Should we file an issue in imagej-legacy to ensure that the color table changes are made?

@ctrueden
Copy link
Member

Probably related: #138.

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