Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viewing column-major data in HDFView #174

Open
darcamo opened this issue Apr 3, 2024 · 1 comment
Open

Viewing column-major data in HDFView #174

darcamo opened this issue Apr 3, 2024 · 1 comment
Assignees
Labels
Component - HDFView Improvements to the visual interface layer Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc. Type - Improvement Improvements that don't add a new feature or functionality

Comments

@darcamo
Copy link

darcamo commented Apr 3, 2024

I understand that HDF5 is row-major only. Whenever the original data is column-major in memory, the usual approach is to save it transposed. Thus, a "5 x 3" matrix is saved as a "3 x 5" dataset and when it is read back it is seen as a "5 x 3" matrix again.

HDFView has a nice feature where I can right-click in the dataset, choose "Open as", and then change which dimensions corresponds to the height, width and depth in the visualization. The only problem is that I need to do this everytime I open the HDF5 file and I want to view that dataset. Is there a way to save this as metadata (an attribute in the dataset) to make HDFView automatically visualize the dataset with transposed dimensions? This could work similarly to how HDFView handle images, where the presence of some attributes is used to tell HDFView to visualize the data as an image, instead of just numbers.

The easiest way, in my opinion, would be for HDFView to simply revert the default dimensions corresponding to height, width and depth if a "DATA_LAYOUT" attribute with value "TRANSPOSED" was set in the dataset. In order words, for a 3D dataset with dimensions "5 x 3 x 8", for instance, it would use dimension 2 as height, dimension 1 as width, and dimension 0 as depth if the attribute is set.

@mattjala mattjala added Type - Improvement Improvements that don't add a new feature or functionality Component - HDFView Improvements to the visual interface layer Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc. labels Apr 8, 2024
@byrnHDF
Copy link
Collaborator

byrnHDF commented Jun 10, 2024

One feature of HDView is the use of User Options. Seems like a worthwhile addition to the general options would be the setting for TRANSPOSE. Of course these User Options are global settings affecting operations with HDFView.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - HDFView Improvements to the visual interface layer Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc. Type - Improvement Improvements that don't add a new feature or functionality
Projects
None yet
Development

No branches or pull requests

3 participants