3d-pli / SLIX

Scattered Light Imaging ToolboX (SLIX) – an open-source Python package that allows a fully automated evaluation of SLI measurements and the generation of different parameter maps
MIT License
6 stars 3 forks source link

[DOC] Understanding sample data #8

Closed alexrockhill closed 3 years ago

alexrockhill commented 3 years ago

I think it's a bit hard to figure out how to use the code without explaining the sample data better. Are the images 24 light angles that are 1314 x 1176 pixels?

I assume you would get images in some image format from the microscope, but then it's not clear how you would convert that to nii with the light angle stored in the nii metadata. And for the .tiff files, how is the light angle stored? That it if indeed the third dimension is light angle.

I think maybe this should be included to explain how to get from raw data capture to results/parameter maps that can be used in many ways to find results.

import nibabel as nib
img = nib.load('SLI-human-Sub-01_2xOpticTracts_s0037_30um_SLI_105_Stack_3days_registered.nii')
img.shape
(1314, 1176, 24, 1)

https://github.com/openjournals/joss-reviews/issues/2675

miriammenzel commented 3 years ago

We agree that we can explain the format of the input data in more detail: The images from the microscope (raw format) are converted to .nii or .tiff images. The input is an SLI image stack that contains a series of these images (.nii or .tiff), where each image was recorded with a different illumination angle (from Phi=0° to 360°, starting on top and rotating clock-wise, as shown in Figure 2 in the arXiv paper). The software assumes that the measurement has been performed with equidistant illumination angles over a full range of 360°. The number of images defines the illumination angles (no metadata needed). In your example, the images represent measurements with 24 different illumination angles (Phi=0°, 15°, …, 345°). The first and second dimensions are the number of image pixels in x and y, the third dimension is the number of images, the forth dimension (in the .nii image) is ignored. We will include a more detailed description of the data format in the README.

miriammenzel commented 3 years ago

I have added a more detailed description of the SLI measurement and the input data (SLI image stack) to the README.md here. I hope that - together with the illustration in the "Introduction" part - the sample data is clear now. @alexrockhill: Please let us know if we should add anything else.

miriammenzel commented 3 years ago

@alexrockhill: Please let us know if we can close this issue.

alexrockhill commented 3 years ago

The documentation looks good, the only issue I'd be concerned with is missing or corrupted data. What if one of the images is not to be included because it has been corrupted?

miriammenzel commented 3 years ago

We expect that it is extremely unlikely that a whole image is corrupted/missing if the SLI measurement was performed in the suggested way (and the user should notice this immediately after the measurement). Moreover, the loss of information is quite large (e.g. missing peaks in the SLI profile could lead to different results). Therefore, we suggest to repeat the measurement instead of correcting this in SLIX. If single image pixels have been corrupted, the tool automatically copes with that. We will add a specific error message if the input format is not as required.

alexrockhill commented 3 years ago

Ok, thanks for explaining.