portugueslab / sashimi

Lightsheet control
GNU General Public License v3.0
1 stars 2 forks source link

Save the resolution into the dataset #28

Closed vilim closed 4 years ago

vilim commented 4 years ago

voxel size (binning dependent) and inter-plane spacing

diegoasua commented 4 years ago

This is related to #16 as voxel size depends on ROI dimensions

vilim commented 4 years ago

the json file has this field (optionally)

diegoasua commented 4 years ago

Inter-plane pacing came come in 2 ways: The dinstance between the centre of the beam waist of subsequent planes or the distance between then end of a waist and the start of the next.

Also to calculate voxel size we need to calibrate the microscope with some sample of know size (like a ruler). Next question is, in voxel size, which of the 2 z distances do we use.

inter_plane

vilim commented 4 years ago

it is the right-hand one. In usual digital imaging sampling models, you sample at coordinates, how much the point spread functions blur into one another it is irrelevant (you want to know e.g how far the cell centers are, if you model the cell as any distribution, e.g. a 3D Gaussian only the right-hand distance is informative). For the xy voxel size we know it's 0.3um at 1x1 binning, but maybe it's good to double-check this. For a very detailed discussion of pixels/sampling, have a look at this: http://alvyray.com/Memos/CG/Microsoft/6_pixel.pdf

diegoasua commented 4 years ago

voxel_size = (z,x,y) or (x,y,z)? What is the current convention in the lab if any?

diegoasua commented 4 years ago

Committed to master (as they were small changes). I decided to go for (z,x,y), if I was wrong it is a matter of changing one line of code

vilim commented 4 years ago

The implementation is not correct: The voxel size should be the distance between two adjacent voxel centers, which is not influenced by waist width at all. The order is z y x as is common for all datasets.

vilim commented 4 years ago

Imagine you are trying to register a lightsheet imaging dataset to a reference brain, or want to plot a scatterplot of all the cell centers: the thing you are interested is the spacing between imaged planes, which is independent of waist width/z blurriness.

diegoasua commented 4 years ago

Can we close this? Note: x and y were swapped and now dims are (z, y, x)