nion-software / nionswift

Nion Swift is open source scientific image processing software integrating hardware control, data acquisition, visualization, processing, and analysis using Python. Nion Swift is easily extended using Python. It runs on Windows, Linux, and macOS.
http://nion.com/swift
GNU General Public License v3.0
44 stars 33 forks source link

Eliminate display type choice (dictated by data type) #1081

Open cmeyer opened 3 months ago

cmeyer commented 3 months ago

The display type pop-up in the inspector is redundant. The display type should be determined entirely by the number of datum dimensions of the data. There is one use case which isn't covered: when the user has something like a width=1024, height=16 image where the 1024 dimension is EELS. In this case, changing the display type was used to display the image as a composite line plot. However, this could be accomplished using 'Redimension' to change the image to a sequence of 16 spectrum of 1024. Needs confirmation that this workflow works as a replacement.

### Tasks
- [ ] https://github.com/nion-software/nionswift/issues/1087
bentps commented 2 months ago

What would be the default display type for shifts of an length N sequence of 2D images, which is N x 2?

cmeyer commented 2 months ago

Whatever behavior happens now would be the default (displays as image). In addition, in the short term, I would propose adding a special "redimension" processing: "redimension to stack of 2 spectra of length N", similar to how one can redimension it now to be "redimension to sequence of. spectra of length N", which would display as a line plot by default.

Overall, I would also propose the following:

If you want different behavior, let me know. I think the key item is the last one (vector valued arrays), but also the most difficult.

bentps commented 2 months ago

Shifts for sequences of 2D images are a special case that deserves special handling. Currently Andreas experimental align image sequence automatically sets the display type for the shifted output to be a line plot. That has been a huge quality of life improvement to the previous behavior where the shifts were shown as an image, and I would be unhappy if that behavior went away.

When I do need to use the multidimensional processing menu measure shifts, that shift data is shown as an image, and then I used the display type dropdown in the inspector to change it to a line plot display. I would prefer if it was automatically shown as a line plot, but at the very least I don't want to lose an easily available option to display it that way. A menu item to redimension the data sounds like a downgrade from the current workflow.

cmeyer commented 2 months ago

Good point. I added the issue below and made this issue dependent on it.