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

3D phase reconstruction should not use reflection padding #161

Open
talonchandler opened this issue Mar 15, 2024 · 4 comments
Open

3D phase reconstruction should not use reflection padding #161

talonchandler opened this issue Mar 15, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@talonchandler
Copy link
Collaborator

@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.

@talonchandler talonchandler self-assigned this Mar 15, 2024
@ziw-liu
Copy link
Contributor

ziw-liu commented Mar 19, 2024

Pinging @edyoshikun for neuromast reconstructions.

@ziw-liu ziw-liu added the bug Something isn't working label Mar 19, 2024
@mattersoflight
Copy link
Member

mattersoflight commented Apr 4, 2024

@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?

@ziw-liu
Copy link
Contributor

ziw-liu commented Nov 25, 2024

@talonchandler have you started working on this? If not I can take a look since better padding might improve 3D virtual staining results.

@talonchandler
Copy link
Collaborator Author

@ziw-liu Please feel free to give it a try! Both types of padding are approximations of the complete inverse problem, so if reflection padding serves our downstream needs then we should change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants