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
48 stars 33 forks source link

Allow user to choose which axes of a data hypercube are displayed #669

Open Brow71189 opened 3 years ago

Brow71189 commented 3 years ago

Right now we have some hardcoded defaults which make sense for most use cases. But especially for graphically selecting data slices for processing it would be very useful to be able to change the displayed axes. For instance cropping multidimensional data with a graphical selection is currently only possible along the displayed axes. Being able to change the displayed axes would make this example much more straightforward to implement and use.

cmeyer commented 3 years ago

This is also required for "data item 2".

cmeyer commented 3 years ago

The way I'm planning to implement this is by generalizing the "display pipeline" which was partially implemented earlier when working on the brightness/contrast/gamma changes.

The idea is that there are different stages to go from arbitrary data to display data. Roughly, the display pipeline works like this, with options/UI at each stage (taken from DisplayValues class):

  1. start with raw data
  2. extract the raw data element using sequence and/or collection indexes and/or slices if required
  3. produce display data by applying complex to real conversion if required
  4. apply adjustments by normalizing display data and performing adjustment operation
  5. calculate rgb display data by scaling display range and applying color table

In this case, we want to provide options and UI for step 2.

Also see my personal notes from 2020-09-14.

Also see #554 separate processing data chain for related ideas.

ndellby commented 3 years ago

That's a bit terse, stage 2 can at present be, either a crop and sum in one or more dimensions--which I think is what you mean, or multiplying some dimensions by a weighting function-which is how the virtual detectors work, and how all linear SI works (which in my humble opinion is the only kind worth using).

Stage 5 becomes interesting if  2-3-4 support data with more than 1 dimension.

On 4/1/2021 9:51 AM, Chris Meyer wrote:

The way I'm planning to implement this is by generalizing the "display pipeline" which was partially implemented earlier when working on the brightness/contrast/gamma changes.

The idea is that there are different stages to go from arbitrary data to display data. Roughly, the display pipeline works like this, with options/UI at each stage (taken from |DisplayValues| class):

  1. start with raw data
  2. extract the raw data element using sequence and/or collection indexes and/or slices if required
  3. produce display data by applying complex to real conversion if required
  4. apply adjustments by normalizing display data and performing adjustment operation
  5. calculate rgb display data by scaling display range and applying color table

In this case, we want to provide options and UI for step 2.

Also see my personal notes from 2020-09-14.

Also see #554 https://github.com/nion-software/nionswift/issues/554 separate processing data chain for related ideas.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nion-software/nionswift/issues/669#issuecomment-812037415, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALBPXD3JJ5XFODJRVWJQIFTTGSP7TANCNFSM42GVYKHQ.