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

Get a nicer LUT on Cellpose output #44

Open
NicoKiaru opened this issue Jun 21, 2024 · 5 comments
Open

Get a nicer LUT on Cellpose output #44

NicoKiaru opened this issue Jun 21, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@NicoKiaru
Copy link
Member

Setting a LUT to an ImagePlus without using IJ.runis nightmarish.
IJ.run works, but it interferes with the macro recording and thus can't be used.

Here's the few things I tried but didn't work:

            new LUT()
            /*LutLoader ll = new LutLoader();
            ll.run("3-3-2 RGB.lut");
            //IndexColorModel lut = LutLoader.getLut("3-3-2 RGB");
            LutLoader.getLut("3-3-2 RGB.lut")
            //LUT lut = LutLoader.getLut("3-3-2 RGB");*/
            //new LutLoader("3-3-2 RGB").

            /*String IJ_LUT_FOLDER = IJ.getDirectory("luts");

            File lutFile = lutFiles.get(b);

            LUT currentLUT = LutLoader.openLut(lutFile.getAbsolutePath());


            Map<String, URL> luts = lutservice.findLUTs();

            if (luts.containsKey("3-3-2 RGB.lut")) {
                ColorTable lut = lutservice.loadLUT(luts.get("3-3-2 RGB.lut"));



                /*lutservice.applyLUT();

                DefaultLUTService dls;*/

                /*luts.get("3-3-2 RGB.lut")
                //String path = java.net.URLDecoder.decode(luts.get("3-3-2 RGB.lut").toString(), StandardCharsets.UTF_8.name()); // Because 3-3-2 RGB has a space
                lut = LutLoader.openLut(luts.get("3-3-2 RGB.lut"));
                cellpose_imp.setLut(lut);*/
            // }

            //add a LUT
            //IJ.run(cellpose_imp, "3-3-2 RGB", "");

So until we find a solution that is simple, the output is going to be in grayscale.

@NicoKiaru NicoKiaru added the enhancement New feature or request label Jun 21, 2024
@imagesc-bot
Copy link

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/fiji-wrapper-s-for-cellpose-and-omnipose-new-version-big-decisions/94735/33

NicoKiaru added a commit that referenced this issue Jun 21, 2024
Restores recording capabilities.
Enhancement issue added #44
@NicoKiaru
Copy link
Member Author

issue was duplicated in #40

@NicoKiaru
Copy link
Member Author

@haesleinhuepf
Copy link

Hi @NicoKiaru ,

I just saw the discussion on image.sc. If you're still worroied about the macro recording, you can turn of the recorder for a moment and then reactivate it like this:

https://github.com/clij/clij/blob/caad98e4703911cd0b78b2bf751473141b2bb5cc/src/main/java/net/haesleinhuepf/clij/macro/AbstractCLIJPlugin.java#L495-L500

Cheers,
Robert

@NicoKiaru
Copy link
Member Author

Hey, thanks Robert! Indeed that's something I rediscovered yesterday 😓 in a different context. And I had to do even worse for concatenator.

But I did not realize I could also do it for the LUT, thanks! This looks like an easy solution indeed.

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

3 participants