CIL icon indicating copy to clipboard operation
CIL copied to clipboard

Allow setting of tiff file name prefix in Nikon Reader

Open lauramurgatroyd opened this issue 1 year ago • 1 comments

In an .xtekct file there is a section called 'Name' e.g.:

[XTekCT]
Name=Proj

The NikonDataReader reads in this Name: https://github.com/TomographicImaging/CIL/blob/955ef6f2f5ca863e79c93e54dacf03f36fccfe52/Wrappers/Python/cil/io/NikonDataReader.py#L151 But it doesn't use this information at all.

In all of the .xtekct files I have seen (not very many), this name corresponds with how the tiffs are labelled in the same folder. e.g. in this case they are labelled Proj***.tif. However I don't know if this is always the case.

I also notice there is a filed called InputName (note InputFolderName is used already):

InputName=Proj
InputFolderName=

However, I have seen an .xtekct file where this isn't present. If we aren't sure that Name does refer to the name of the files then we could instead allow the user to set the prefix of the tiff file names.

This is important as it may be the case that other tiffs are saved in the folder too, such as dark and flat fields.

In my case, I had dark and flat fields saved in the same folder (and they did not have Proj in the name) What happened when I used the NikonDataReader was it read the dark and flat as the first two projections, then it read the rest of the data, excluding the last two projections. This is because it reads the expected number of projections from the .xtekCT file and stops reading after that: https://github.com/TomographicImaging/CIL/blob/955ef6f2f5ca863e79c93e54dacf03f36fccfe52/Wrappers/Python/cil/io/NikonDataReader.py#L153-L154

lauramurgatroyd avatar Jan 17 '24 11:01 lauramurgatroyd

This initially needs an update in the Tiff reader but will be in the new version.

gfardell avatar Jan 25 '24 09:01 gfardell