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

Make sure rich image data structure has a "label" property #47

Open
ctrueden opened this issue Mar 19, 2015 · 2 comments
Open

Make sure rich image data structure has a "label" property #47

ctrueden opened this issue Mar 19, 2015 · 2 comments

Comments

@ctrueden
Copy link
Member

ImageJ1 displays the label as a "subtitle" at the top of the image window (not in the title bar—that would be the name). ImageJ2 will also need a dedicated label property, since it's useful.

We also need slice labels—but see #21 for that.

@lannybroo
Copy link

I agree with this. I use these all the time in ImageJ1. I also have always found it strange that this is different metadata than the slice labels. It would be nice if you wanted a subtitle on an entire stack to be able to set a label/subtitle property once for a stack. In IJ1, I end up using a utility function often when I want a plugin to be able to set a subtitle. Here is my utility function, for reference:

public static void setSubtitle(ImagePlus imp, String label) {
    ImageStack stack = imp.getStack();
    if (stack.getSize()>1) {
        // Stacks show the stack label as the subtitle
        stack.setSliceLabel(label, imp.getSlice());
    } else {
        // Single images show the "Label" property as the subtitle
        imp.setProperty("Label", label);
    }
    imp.updateAndRepaintWindow();
}

@ctrueden
Copy link
Member Author

Thanks @lannybroo. I think that discrepancy is an artifact of ImageJ1's growth from 2D to 3D to 5D over time. Hopefully we can make ImageJ2 more unified in this regard.

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