How to write ANALYZE 7.5 files with defined pixel/voxel type, extension .hdr

I would like to write 3D data in Analyze 7.5 format with defined pixel/voxel type. The in-built HDR file writer produces always float pixel/voxel.

Is there a trick or command to force gmic to use another pixel data type?

This : https://github.com/dtschump/gmic/commit/553fbee983956c82af464af0ba092279fb1ee8c5
should solve your problem, allowing:

$ gmic sp lena o analyze.hdr,uchar

Thank you David for the quick help.

… and I thought I had forgotten how to do it…

In gmic 2.8.3 it works!

1 Like

Not exactly the topic, however 3d image display!

Seemingly the 3d image display is normalizing the center image. Is it possible to activate at least the ^N key for the normalization in this display mode too?

If I look at the difference of a 3d image with e.g. an opened or blurred one, I get strong display jumps according the extrema in the differences per z coordinate.

I agree that 3d display is feature incomplete compared to 2d and would like to see more. :slight_smile:

You are right. The fact is the display of 2D images is managed by custom command display2d, while 3D images use the built-in command display (display actually redirects to display2d in case of 2D images).
The best thing to do would be then to have an equivalent custom command display3d_image, for 3D image visualization (because display3d already exists for 3D vector objects).

This represents quite a bit of work, but maybe one day… :stuck_out_tongue: