h5web
h5web copied to clipboard
Data mapping not fully reflected in exports
Describe the bug
The export feature (to CSV, TIFF, etc.) does not take into account potential transposition of datasets (or dataset slices). See https://github.com/silx-kit/vscode-h5web/pull/23#discussion_r1257530624
The getExportURL
method that data providers may implement does not receive sufficient information to determine whether users have transposed the dataset/slice they want to export. The current signature of the method is:
public getExportURL?<D extends Dataset<ArrayShape>>(
format: ExportFormat,
dataset: D,
selection: string | undefined,
value: Value<D>
): ExportURL;
To Reproduce
- Go to https://h5web.panosc.eu/h5grove
- Select dataset
/entry_0000/1_integration/results/I
- Select Matrix visualization
- Export to CSV => 10 rows x 1000 columns
- Use dimension mapper sidebar to transpose dataset
- Export to CSV again => still 10 rows x 1000 columns (expected 1000 rows x 10 columns)
Can also be reproduced with the Heatmap visualization and the TIFF export, for instance.
Expected behaviour
Exports should reflect potential transposition of the datasets (or dataset slices).