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

Add reader and writer for NXTomo files #939

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

lauramurgatroyd
Copy link
Member

@lauramurgatroyd lauramurgatroyd commented Aug 4, 2021

Adds ability to read and write the NXTomo format.

Reader was modified from this code

Writer makes use of this code

Addresses the first part of #744

I copied over all methods from the original reader code, but I am unsure whether the following are needed:

  • get_acquisition_data_subset , get_acquisition_data_batch and get_acquisition_data_subset - the same thing can be achieved by using slicing with get_acquisition_data if the dimensions are set.
  • get_acquisition_data_whole - the same thing is returned if you just use get_acquisition_data withoutdimensionsset

From the NXTomo documentation, the data is of shape [nFrames, xSize, ySize], however in the previous code and by visualising NXTomo datasets from EPAC, it is seen that the data is in the order (angles, vertical, horizontal), which is the default for CIL acquisition data.

Another point is I am wondering if we should have some way for the user to specify which integer type they would like to write to the file. By default the NEXUSDataWriter writes out as float32 but the NXTomo format expects the data as "any representation of an integer number". I have set it to uint32, but say for example I have a uint16 dataset that I read in and want to write out again then it will double in size!

@lauramurgatroyd
Copy link
Member Author

lauramurgatroyd commented Aug 4, 2021

To do:

  • Test out image dimension ordering by visualising EPAC NXTomo images
  • Also allow reading in and writing out of 'optional' datasets and attributes in NXTomo file
  • Look at how TIFF reader is being updated - we will want similar methods here for slicing/binning the data as it is read
  • Add method for getting the ordering of the flat and dark fields relative to the projections (see Write flat and dark field data to the CIL Nexus format #940 )
  • Create base class for readers and writers, and inherit from it Base class for Readers #949

@gfardell
Copy link
Member

gfardell commented May 3, 2022

base class #1020

@casperdcl casperdcl force-pushed the master branch 3 times, most recently from a910556 to f8b513b Compare September 2, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Work In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants