silx icon indicating copy to clipboard operation
silx copied to clipboard

silx view keep aspect ratio default

Open CaptainNemoz opened this issue 6 years ago • 3 comments
trafficstars

When starting silx view with an image (e.g. edf) as argument, it is not displayed by default with the right aspect ratio. This is a problem for tomographic image that are always square. It should be possible that silx view remembers the option.

CaptainNemoz avatar Mar 28 '19 09:03 CaptainNemoz

It is displayed using a default NXdata, then the NXdata viewer do not set the aspect ration to true.

I don't think we can turn one this flag by default.

For example, 2D-integration of diffraction data from pyFAI creates an HDF5 image which is not supposed to have the keep aspect ratio (the 2 axes do not use the same unit).

But we have to find a solution.

  • Maybe we could turn one the aspect ration if there is no specified units (i guess no units (or no axes) is the common case), or if the units of both axes are equal.
  • Else it also could be a new metadata to add to Nexus? As @t20100 was working on some metadata to add to custom the display (colormap info)

vallsv avatar Mar 28 '19 12:03 vallsv

On 28/03/2019 13:32, Valentin Valls wrote:

It is displayed using a default NXdata, then the NXdata viewer do not set the aspect ration to true.

I don't think we can turn one this flag by default.

For example, 2D-integration of diffraction data from pyFAI creates an HDF5 image which is not supposed to have the keep aspect ratio (the 2 axes do not use the same unit).

But we have to find a solution.

To me the solution is to save the settings by the application.

You will also find users not willing to keep the aspect ratio by default.

vasole avatar Mar 28 '19 13:03 vasole

Today's silx view behavior is to display all images with keep aspect ratio by default ;)

So this can be closed... yet, making it a user setting sounds a sensible solution and easier compared to guessing it from Nexus info.

t20100 avatar Feb 26 '21 14:02 t20100