[app][dxfile2nx] convert dxfile to NXTomo

Merged payno requested to merge handle_dx_file into master

Description / Goal

Insure translation from dxfile to NXtomo.

TODO list

  • add an application to convert from dxfile to NXTomo
  • add a function to do conversion from a script
  • doc
    • general information
    • add tutorial
  • add tests
  • insure version is stored
  • test on several dxfile
    • tomo_00022
    • tomo_00024
    • tomo_00068
    • tomo_00076
  • test tomwer / nabu can handle the file for a processing

INFO (how to use...)

Example of usage:

tomo_00022 case

  • x rotation angle "theta" are not take into account for now. Might evolve with time. But in this case we might expect rotation angle for all dark, flat and projection not only projection. For now users must provide a scan range (0,180) in this case:
  • other mandatory parameters are converted (pixel size, distance, energy...)
nxtomomill dxfile2nx tomo_00022.h5 tomo_00022.nx --overwrite --scan-range 0,180

We can now try nabu on it


This generate a nabu.conf file that we have to set up. Adding dataset location (generated .nx file), rotation_axis_position=auto, enable_halftomo=0, output location, Paganin ? ... Once done we can call nabu with it.

nabu nabu.conf --slice middle

Nxtomo - tomo_00022.nx

dxfile - tomo_00022.h5

nabu reconstruction note: note sure at all about nabu reconstruction parameters, cor value... but at least it processes it.

tomo_00024 case

close to the tomo_00022. This time we avoid data duplication

nxtomomill dxfile2nx tomo_00024.h5 tomo_00024.nx --overwrite --no-data-copy

This time we test tomwer on it (with nabu)

tomwer canvas

We need to specify the field of fiew to provide it to nabu so we need to add the --field-of-view option

nxtomomill dxfile2nx tomo_00024.h5 tomo_00024.nx --overwrite --no-data-copy --field-of-view full

Again not sure at all by the reconstruction parameters. I guess the provided .tiff does not help much.


tomo_00068 case

test file conversion providing distance and energy + test it with nabu (no paganin)

nxtomomill dxfile2nx tomo_00068.h5 tomo_00068.nx --overwrite --no-data-copy --energy 20 --distance 0.36

nabu middle slice - tomo_00068

tomo_00071 case

simply test file conversion

Any warning ?

  • several "core" information are not provided by dxfile as rotation angle, detector-sample distance, pixel size. Some "default" values are provided but might need to be provided during conversion.
  • alignment projection are not handled
  • it look like dxfile contains one acquisition per file. If not users will have to call several time the converter and providing the input_entry parameter
  • to call nabu from tomwer the field of view need to be provided. Maybe we will also create a default value ?

associated materials (screenshot, test scripts...)


converted nxtomo file

Edited by payno

Merge request reports