Giter Club home page Giter Club logo

Comments (18)

pllim avatar pllim commented on August 20, 2024

Eric refactored a bunch of stuff. You might want to see his commit changes for clues.

from stginga.

stscieisenhamer avatar stscieisenhamer commented on August 20, 2024

Actually its not what I was afraid of; actual functionality change. Seems more that some layout default, such as stretch, for ImageViewCanvas, has changed. Not critical.

from stginga.

ejeschke avatar ejeschke commented on August 20, 2024

@stscieisenhamer, I'm trying MultiImage. I can draw a region and it creates an image in the lower bar, but I cannot figure out how to add a new image. Can I add new cutouts from a single image?

Edit: I'm beginning to grok this. Switch to another image in the channel to add a new stamp. I take it that it is not possible to add multiple stamps per same image?

from stginga.

stscieisenhamer avatar stscieisenhamer commented on August 20, 2024

If you drag another image into the channel, it should add automatically. Or if other images are in the channel already, just rotate to them using the arrow keys.

And no, there is only one cutout.

from stginga.

ejeschke avatar ejeschke commented on August 20, 2024

Cool. Is there a limit on the number of stamps?

from stginga.

ejeschke avatar ejeschke commented on August 20, 2024

And MIPick just works as another way to set the region?

from stginga.

ejeschke avatar ejeschke commented on August 20, 2024

Anyway, stamps seem to work for me. What kind of problem are you seeing?

from stginga.

stscieisenhamer avatar stscieisenhamer commented on August 20, 2024

No: no limit, except for hardware

Yes: MIPick is just another way to choose the region, combining the stats of Pick while fixing on a sky region instead of a pixel region. Sometimes this gets confused when an image has no overlapping sky. Haven't dealt with that yet.

And the problem of this issue is just a visual. At some commit which I forget, previously the stamps would center and fill the HBox. Then as more were added, the HBox would evenly divide, each filling an equal area.

Now, the first one only takes the left 1/4 of the space. As more add, the remaining quarters are filled. Then, as more are added, the evenly divided behavior takes over.

I started investigating: has something to do with an object changing from HBox to a native Qt.Widget, but I didn't get too far.

from stginga.

ejeschke avatar ejeschke commented on August 20, 2024

I see what you are saying. You can probably fix that with the right "expand" options set on the horizontal container widget in your build_gui() method. To me it doesn't look bad now.

Couple of notes, FWIW:

  1. I notice now that once the row gets filled there is no way to get to the new stamps except by resizing the top level window (which is limited by screen size). Might be good to embed the container in a ScrollArea--then scroll bars would appear automatically when it filled up and overflowed.

  2. I think this kind of plugin could certainly work across channels as well. In that case it probably would be better as a global plugin. I notice that if I add a new channel and start a second MultiDim in that then it's difficult to tell anyway which images belong to which channel. Another possible configuration would be one stamp for each channel, and a stamp would update as you stepped through images in that channel. That probably fits better with the idea behind @hcferguson's workflow (as I understand it).

  3. I can imagine that it might be convenient to have a keystroke (and button in the GUI) to add a stamp. That way you don't always automatically get a new stamp when you visit a new image. This could be a preference, maybe?

  4. Might be nice to have a little "X" button or at least a right-click context menu to close stamps that you are done with.

Looks like a very useful plugin!

from stginga.

stscieisenhamer avatar stscieisenhamer commented on August 20, 2024

Excellent suggestions! And, I see a path to success....

The desire was to have all stamps shown so that as you view the main image, you can see what that same region is in the other images. How this was to work with the multi images per channel and multiple channels was unclear. However, @ejeschke suggestion #3 gave the needed hint. A possible workflow is then:

  • MultiImage becomes a global plugin, and is started at any point
  • To add an image, an explicit keystroke is needed.
  • Where the image comes from is irrelevant
  • To cycle through the images, a different set of keystrokes, or overload of the arrow keys, will cycle through the JUST the images added to MultiDim, as long as that plugin has focus. Again, the cycling would cross channels if necessary.
  • As in #4 above, images would be removed.
  • The image in the main viewer does not actually have to be part of the stamps. <- Need to think about that.

from stginga.

pllim avatar pllim commented on August 20, 2024

As @ejeschke stated to me before, the same image can be loaded into different channels. How do you plan to handle duplicates?

from stginga.

ejeschke avatar ejeschke commented on August 20, 2024

@pllim, would that be a problem? If the stamps are added manually, and are maintained on a per-image basis, then if the user decides to open two different stamps for the same image then that's a kind of user error, IMO, no matter how you navigated to the images (in one channel or two, etc.).

from stginga.

hcferguson avatar hcferguson commented on August 20, 2024

I could see a potential benefit of having the same image in two different stamps with a different colormap. I actually used this kind of thing in ds9 blinking between images doing supernova searches. When looking at potential candidates, it was useful to have both a heavy stretch and a log stretch handy.

from stginga.

pllim avatar pllim commented on August 20, 2024

Okay. Just want to make sure we covered this feature.

from stginga.

stscieisenhamer avatar stscieisenhamer commented on August 20, 2024

OK. Sounds like a plan. I'll be making separate issues to do the implementation, since this discussion went off-the-rails-with-respect-to-the-issue.

With-respect-to-the-issue, I'm closing. Not really a functional nor usability issue. Will revisit after functionality changes.

from stginga.

ejeschke avatar ejeschke commented on August 20, 2024

@stscieisenhamer, @pllim

TL;DR: postage stamps fixed in latest ginga, please see MultiImage edits I posted to @pllim's ginga-dev box folder; all other STScI plugins I was able to test look ok, but please test and LMK

longer explanation: The latest ginga in master completes a unification of the widget-specific code (such as GingaQt and GingaGtk, etc). Almost all platform-specific widget code now has been pushed all the way down into the Widgets.py wrappers. This doesn't much effect the plugins (as they were almost all already working with wrapped versions) except in instances where you want to make a call directly against the Qt API (say)--in such cases you need to extract the widget with get_widget(). I only found a couple of spots in MultiImage where this was happening--you can see the trivial changes I made to get it working with the latest. And--bonus--the postage stamps are working again as I think you expect!

from stginga.

pllim avatar pllim commented on August 20, 2024

@ejeschke , I made your edited version into a PR (see #50). @stscieisenhamer , what do you think?

from stginga.

pllim avatar pllim commented on August 20, 2024

Fixed by #50. Thanks, @ejeschke !

from stginga.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.