mehta-lab / waveorder

Wave optical models and inverse algorithms for label-agnostic imaging of density & orientation.
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

3D phase reconstruction should not use reflection padding #161

Open talonchandler opened 2 months ago

talonchandler commented 2 months ago

@ziw-liu, @ieivanov, and I just discussed the padding behavior of waveorder, and we agreed that 3D phase reconstruction should not use reflection padding.

The core problem is that if you only sample one axial half of a 3D PSF then reflect it, you will always create an "absorption"-type even PSF. Instead, we suggest that we use replicate padding for phase reconstructions, and reflection padding for fluorescence reconstructions.

An "even more correct" solution would be to skip the axial FFT altogether and a solve a small inverse problems for each transverse spatial frequency. This would avoid padding difficulties altogether, but it can wait for another time. In the short term, we'll change the padding behavior.

ziw-liu commented 2 months ago

Pinging @edyoshikun for neuromast reconstructions.

mattersoflight commented 1 month ago

@talonchandler thanks for catching this effect of padding! It is interesting that type of padding assumes a contrast mechanism.

An "even more correct" solution would be to skip the axial FFT altogether and solve a small inverse problems for each transverse spatial frequency.

Are you thinking of 2D FFTs at each $z$? If so, the equation would look like: $$ I(f_x, f_y, z) = S(f_x, f_y, z) \otimes_z O (f_x, f_y,z) $$ Above are defocused 2D spectrum of image, defocused 2D spectrum of specimen, and defocused 2D OTF.

It makes sense to solve the above at each transverse spatial frequency. What inverse algorithm are you thinking of?