Martin Spitaler-2 |
*****
To join, leave or search the confocal microscopy listserv, go to: http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy Post images on http://www.imgur.com and include the link in your posting. ***** Dear microscopists, a question related to the recent issue about bidirectional scanning ("...bug or feature..."): Does anyone know of a tool to correct a misaligned bidirectional scan post-acquisition? It sounds so obvious that I'm surprised it's not built into the confocal software anyway, nor am I aware of any Matlab script, ImageJ plugin or anything else. And I know of several cases where the acquisition couldn't be easily reproduced quickly. And it should be fairly straightforward, at least if only one dimension is misaligned, as is usually the case (it might not be possible on a Zeiss confocal with rotations angles other than 0 or 90 degrees). Best regards, Martin ________________________________________ Martin Spitaler, PhD Head of the Imaging Facility Max Planck Institute of Biochemistry Am Klopferspitz 18 82152 Martinsried Germany Tel: +49 (0)89 8578-3971 E-mail: [hidden email] Website: http://www.biochem.mpg.de/en/facilities/imaging |
*****
To join, leave or search the confocal microscopy listserv, go to: http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy Post images on http://www.imgur.com and include the link in your posting. ***** Dear Martin, I’ve used this ImageJ plugin with success: https://imagej.nih.gov/ij/plugins/correct-shift.html Hope this helps, Theresa ------------------------------------ Theresa Swayne, Ph.D. Associate Research Scientist Manager, Confocal and Specialized Microscopy Shared Resource<http://hiccc.columbia.edu/research/sharedresources/confocal> Herbert Irving Comprehensive Cancer Center Columbia University Medical Center 1130 St. Nicholas Ave., Room 222A New York, NY 10032 Phone: 212-851-4613 [hidden email]<mailto:[hidden email]> From: Confocal Microscopy List <[hidden email]> on behalf of "Spitaler, Martin" <[hidden email]> Reply-To: Confocal Microscopy List <[hidden email]> Date: Monday, September 24, 2018 at 8:45 AM To: "[hidden email]" <[hidden email]> Subject: bi-directional scanning - misalignment correction ***** To join, leave or search the confocal microscopy listserv, go to: https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.umn.edu_cgi-2Dbin_wa-3FA0-3Dconfocalmicroscopy&d=DwIFAg&c=G2MiLlal7SXE3PeSnG8W6_JBU6FcdVjSsBSbw6gcR0U&r=JzqbFzGMeaMAlwu5KvYtC8ig-FF8xbvhI6BlFtbXky8&m=TvsaDmetttsbKUZ5OVZ7J6Dp4AZe1zqhXwqewCHIJWU&s=LvR6IQL3-CL5j1h-Q40U9iaM5dPFFyAEI8Diqb5m8hc&e= Post images on https://urldefense.proofpoint.com/v2/url?u=http-3A__www.imgur.com&d=DwIFAg&c=G2MiLlal7SXE3PeSnG8W6_JBU6FcdVjSsBSbw6gcR0U&r=JzqbFzGMeaMAlwu5KvYtC8ig-FF8xbvhI6BlFtbXky8&m=TvsaDmetttsbKUZ5OVZ7J6Dp4AZe1zqhXwqewCHIJWU&s=HOJZByDl9TWMInnFPxIsXWLZmwTE5msK5-QTqvw5QbY&e= and include the link in your posting. ***** Dear microscopists, a question related to the recent issue about bidirectional scanning ("...bug or feature..."): Does anyone know of a tool to correct a misaligned bidirectional scan post-acquisition? It sounds so obvious that I'm surprised it's not built into the confocal software anyway, nor am I aware of any Matlab script, ImageJ plugin or anything else. And I know of several cases where the acquisition couldn't be easily reproduced quickly. And it should be fairly straightforward, at least if only one dimension is misaligned, as is usually the case (it might not be possible on a Zeiss confocal with rotations angles other than 0 or 90 degrees). Best regards, Martin ________________________________________ Martin Spitaler, PhD Head of the Imaging Facility Max Planck Institute of Biochemistry Am Klopferspitz 18 82152 Martinsried Germany Tel: +49 (0)89 8578-3971 E-mail: [hidden email]<mailto:[hidden email]> Website: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.biochem.mpg.de_en_facilities_imaging&d=DwIFAg&c=G2MiLlal7SXE3PeSnG8W6_JBU6FcdVjSsBSbw6gcR0U&r=JzqbFzGMeaMAlwu5KvYtC8ig-FF8xbvhI6BlFtbXky8&m=TvsaDmetttsbKUZ5OVZ7J6Dp4AZe1zqhXwqewCHIJWU&s=hOX2VjmFX5Cke0lkXUuijQWniELB4J2kS34hFxzoQkY&e= |
Peter Rupprecht-2 |
*****
To join, leave or search the confocal microscopy listserv, go to: http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy Post images on http://www.imgur.com and include the link in your posting. ***** Hi Martin, Here's a highly non-optimized piece of Matlab code that I wrote which aligns a bidirectionally scanned 3D movie (or 2D image): https://github.com/PTRRupprecht/Drawing-ROIs-without-GUI/blob/master/non-GUI%20ROI%20analysis/bidi_align.m It computes the shift with subpixel precision, but applies the shift only with pixel-precision to avoid the need for any interpolation. Let me know if you have questions. Best,Peter Am Montag, 24. September 2018, 15:21:11 MESZ hat Swayne, Theresa C. <[hidden email]> Folgendes geschrieben: ***** To join, leave or search the confocal microscopy listserv, go to: http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy Post images on http://www.imgur.com and include the link in your posting. ***** Dear Martin, I’ve used this ImageJ plugin with success: https://imagej.nih.gov/ij/plugins/correct-shift.html Hope this helps, Theresa ------------------------------------ Theresa Swayne, Ph.D. Associate Research Scientist Manager, Confocal and Specialized Microscopy Shared Resource<http://hiccc.columbia.edu/research/sharedresources/confocal> Herbert Irving Comprehensive Cancer Center Columbia University Medical Center 1130 St. Nicholas Ave., Room 222A New York, NY 10032 Phone: 212-851-4613 [hidden email]<mailto:[hidden email]> From: Confocal Microscopy List <[hidden email]> on behalf of "Spitaler, Martin" <[hidden email]> Reply-To: Confocal Microscopy List <[hidden email]> Date: Monday, September 24, 2018 at 8:45 AM To: "[hidden email]" <[hidden email]> Subject: bi-directional scanning - misalignment correction ***** To join, leave or search the confocal microscopy listserv, go to: https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.umn.edu_cgi-2Dbin_wa-3FA0-3Dconfocalmicroscopy&d=DwIFAg&c=G2MiLlal7SXE3PeSnG8W6_JBU6FcdVjSsBSbw6gcR0U&r=JzqbFzGMeaMAlwu5KvYtC8ig-FF8xbvhI6BlFtbXky8&m=TvsaDmetttsbKUZ5OVZ7J6Dp4AZe1zqhXwqewCHIJWU&s=LvR6IQL3-CL5j1h-Q40U9iaM5dPFFyAEI8Diqb5m8hc&e= Post images on https://urldefense.proofpoint.com/v2/url?u=http-3A__www.imgur.com&d=DwIFAg&c=G2MiLlal7SXE3PeSnG8W6_JBU6FcdVjSsBSbw6gcR0U&r=JzqbFzGMeaMAlwu5KvYtC8ig-FF8xbvhI6BlFtbXky8&m=TvsaDmetttsbKUZ5OVZ7J6Dp4AZe1zqhXwqewCHIJWU&s=HOJZByDl9TWMInnFPxIsXWLZmwTE5msK5-QTqvw5QbY&e= and include the link in your posting. ***** Dear microscopists, a question related to the recent issue about bidirectional scanning ("...bug or feature..."): Does anyone know of a tool to correct a misaligned bidirectional scan post-acquisition? It sounds so obvious that I'm surprised it's not built into the confocal software anyway, nor am I aware of any Matlab script, ImageJ plugin or anything else. And I know of several cases where the acquisition couldn't be easily reproduced quickly. And it should be fairly straightforward, at least if only one dimension is misaligned, as is usually the case (it might not be possible on a Zeiss confocal with rotations angles other than 0 or 90 degrees). Best regards, Martin ________________________________________ Martin Spitaler, PhD Head of the Imaging Facility Max Planck Institute of Biochemistry Am Klopferspitz 18 82152 Martinsried Germany Tel: +49 (0)89 8578-3971 E-mail: [hidden email]<mailto:[hidden email]> Website: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.biochem.mpg.de_en_facilities_imaging&d=DwIFAg&c=G2MiLlal7SXE3PeSnG8W6_JBU6FcdVjSsBSbw6gcR0U&r=JzqbFzGMeaMAlwu5KvYtC8ig-FF8xbvhI6BlFtbXky8&m=TvsaDmetttsbKUZ5OVZ7J6Dp4AZe1zqhXwqewCHIJWU&s=hOX2VjmFX5Cke0lkXUuijQWniELB4J2kS34hFxzoQkY&e= |
Jason M. Kirk |
In reply to this post by Martin Spitaler-2
*****
To join, leave or search the confocal microscopy listserv, go to: http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy Post images on http://www.imgur.com and include the link in your posting. ***** Hi Martin, There is a very good reason why bi-directional scanning is not obviously easy to correct. It has to do with the inherent non-linearity of the scan in the opposite direction. The Zeiss systems use a linearization calibration on the scanners in the left-to-right direction. This is to ensure that the velocity of the scan is constant over the field imaged. When the scan starts – there is a fixed distance where the scanner accelerates (for 512x512 it is equivalent to roughly 44 pixels) to the left edge of the image before the AOTF turns the laser on. Over the X scan the velocity is maintained until the scanner reaches the opposite end of the scan where the AOTF turns off and the scanner is decelerated and returns to the left side. When scanning in bi-directional mode, where every other line is scanned backwards – the opposite (backwards) line scanner velocity is not calibrated and exhibits a sinusoidal pattern. These fluctuations can be effected by temperature, scan frequency, even scanner age and how hard it has been historically driven by the user(s). This is why if you’ve ever tried to correct this in the software you notice that if you correct the center of the image the sides are out of alignment and vice versa. Zeiss has made attempts to improve this in later models with liquid cooled scanners and online software calibrations – and while this has improved for certain conditions quite well – it is still not comparable to uni-directional mode. Now I know what you’re asking – why not just calibrate that direction too? I should state that I am not an engineer – but my understanding is that scanning in the opposite direction is achieved is by inverting the voltage supplied to the scanner. The power supply likely cannot have 2 separate calibrations applied to it simultaneously – so it is a technical limitation. That said – there is only one scenario where I recommend using bi-directional scanning to my users, and that is the case were you require high frame rates but do not require sub-cellular resolution. I strongly discourage the idea of bi-directional scanning to save time and for most people uni-directional mode is sufficient. Hope this helps! -Jason |
Peter Rupprecht-2 |
*****
To join, leave or search the confocal microscopy listserv, go to: http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy Post images on http://www.imgur.com and include the link in your posting. ***** Hi Jason, I have also observed that the two lines are impossible to match perfectly for systems using a regular galvo for fast scanning. For microscopes based on resonant scanners, however, I could almost always align the backward-scanned line very well, not only in the center. This is based on experience with only a couple of different, home-built resonant scanning-based microscopes. Best,Peter Am Montag, 24. September 2018, 20:13:20 MESZ hat Jason M. Kirk <[hidden email]> Folgendes geschrieben: ***** To join, leave or search the confocal microscopy listserv, go to: http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy Post images on http://www.imgur.com and include the link in your posting. ***** Hi Martin, There is a very good reason why bi-directional scanning is not obviously easy to correct. It has to do with the inherent non-linearity of the scan in the opposite direction. The Zeiss systems use a linearization calibration on the scanners in the left-to-right direction. This is to ensure that the velocity of the scan is constant over the field imaged. When the scan starts – there is a fixed distance where the scanner accelerates (for 512x512 it is equivalent to roughly 44 pixels) to the left edge of the image before the AOTF turns the laser on. Over the X scan the velocity is maintained until the scanner reaches the opposite end of the scan where the AOTF turns off and the scanner is decelerated and returns to the left side. When scanning in bi-directional mode, where every other line is scanned backwards – the opposite (backwards) line scanner velocity is not calibrated and exhibits a sinusoidal pattern. These fluctuations can be effected by temperature, scan frequency, even scanner age and how hard it has been historically driven by the user(s). This is why if you’ve ever tried to correct this in the software you notice that if you correct the center of the image the sides are out of alignment and vice versa. Zeiss has made attempts to improve this in later models with liquid cooled scanners and online software calibrations – and while this has improved for certain conditions quite well – it is still not comparable to uni-directional mode. Now I know what you’re asking – why not just calibrate that direction too? I should state that I am not an engineer – but my understanding is that scanning in the opposite direction is achieved is by inverting the voltage supplied to the scanner. The power supply likely cannot have 2 separate calibrations applied to it simultaneously – so it is a technical limitation. That said – there is only one scenario where I recommend using bi-directional scanning to my users, and that is the case were you require high frame rates but do not require sub-cellular resolution. I strongly discourage the idea of bi-directional scanning to save time and for most people uni-directional mode is sufficient. Hope this helps! -Jason |
Zdenek Svindrych-2 |
In reply to this post by Jason M. Kirk
*****
To join, leave or search the confocal microscopy listserv, go to: http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy Post images on http://www.imgur.com and include the link in your posting. ***** Hi Jason, there is no reason to believe that there is any difference in linearization approach for the two scan directions (at least for modern scanners like the LSM 780). After all, the driving waveforms are computer generated and fed to the galvo amplifier through D/A converters (a more fancy soundcard). The thing is that even if the scanner is 99% linear, which would be acceptable for imaging, the remaining 1% nonlinearity might account for 10 pixels (out of 1024 pixels for example) difference between the two scan directions. That's clearly too much, and it's challenging to bring it below 1 pixel at all scanning conditions. One solution is to digitize the actual mirror position using the feedback position sensor inside the galvo, and use this information to correct the images, but that's an overkill for system where the scanning is supposed to be linear (Zeiss). On a well-tuned system I can't typically see any jagged edges with a 512x512 bi-directional scan (when the scan offset is set correctly). But I never use bi-di when I'm planning to do some heavy post-processing, like deconvolution. My $0.02, zdenek ---------- Původní e-mail ---------- Od: Jason M. Kirk <[hidden email]> Komu: [hidden email] Datum: 24. 9. 2018 14:16:15 Předmět: Re: bi-directional scanning - misalignment correction "***** To join, leave or search the confocal microscopy listserv, go to: http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy Post images on http://www.imgur.com and include the link in your posting. ***** Hi Martin, There is a very good reason why bi-directional scanning is not obviously easy to correct. It has to do with the inherent non-linearity of the scan in the opposite direction. The Zeiss systems use a linearization calibration on the scanners in the left-to-right direction. This is to ensure that the velocity of the scan is constant over the field imaged. When the scan starts – there is a fixed distance where the scanner accelerates (for 512x512 it is equivalent to roughly 44 pixels) to the left edge of the image before the AOTF turns the laser on. Over the X scan the velocity is maintained until the scanner reaches the opposite end of the scan where the AOTF turns off and the scanner is decelerated and returns to the left side. When scanning in bi-directional mode, where every other line is scanned backwards – the opposite (backwards) line scanner velocity is not calibrated and exhibits a sinusoidal pattern. These fluctuations can be effected by temperature, scan frequency, even scanner age and how hard it has been historically driven by the user(s). This is why if you’ve ever tried to correct this in the software you notice that if you correct the center of the image the sides are out of alignment and vice versa. Zeiss has made attempts to improve this in later models with liquid cooled scanners and online software calibrations – and while this has improved for certain conditions quite well – it is still not comparable to uni-directional mode. Now I know what you’re asking – why not just calibrate that direction too? I should state that I am not an engineer – but my understanding is that scanning in the opposite direction is achieved is by inverting the voltage supplied to the scanner. The power supply likely cannot have 2 separate calibrations applied to it simultaneously – so it is a technical limitation. That said – there is only one scenario where I recommend using bi- directional scanning to my users, and that is the case were you require high frame rates but do not require sub-cellular resolution. I strongly discourage the idea of bi-directional scanning to save time and for most people uni-directional mode is sufficient. Hope this helps! -Jason " |
Michael Giacomelli |
In reply to this post by Peter Rupprecht-2
*****
To join, leave or search the confocal microscopy listserv, go to: http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy Post images on http://www.imgur.com and include the link in your posting. ***** You can easily align a resonant scanner because the Q is very high (typically > 5000-10000), and so the forward and backward sweeps are identical to within a fraction of a Hertz. A galvanometer system works differently, there is a closed loop controller that takes your signal and feedback from a position sensor and tries to minimize an error function defined when the controller parameters are programmed. With proper calibration and the right controller, galvo and mirror selection you can do well in bidirectional mode too, but for a commercial microscope that will rarely be run in this mode, don't expect the vendor have prioritized it when calibrating the controller. The vendor is more likely to prioritize duty cycle in unidirectional mode, very high linearity, and cost at the expense of operation in other modes. You can of course try to correct for any error in position control in post processing (effectively, open loop calibration), but as Jason mentioned this will depend on temperature, and so your correction may not be entirely stable over time. A grid target image beforehand can help if you have a controller that drifts a lot, or pulling off the cover and recording the scanner's actual trajectory from the controller's feedback encoder. Mike On Mon, Sep 24, 2018 at 7:02 PM Peter Rupprecht < [hidden email]> wrote: > ***** > To join, leave or search the confocal microscopy listserv, go to: > http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy > Post images on http://www.imgur.com and include the link in your posting. > ***** > > Hi Jason, > I have also observed that the two lines are impossible to match perfectly > for systems using a regular galvo for fast scanning. For microscopes based > on resonant scanners, however, I could almost always align the > backward-scanned line very well, not only in the center. This is based on > experience with only a couple of different, home-built resonant > scanning-based microscopes. > Best,Peter > Am Montag, 24. September 2018, 20:13:20 MESZ hat Jason M. Kirk < > [hidden email]> Folgendes geschrieben: > > ***** > To join, leave or search the confocal microscopy listserv, go to: > http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy > Post images on http://www.imgur.com and include the link in your posting. > ***** > > Hi Martin, > > There is a very good reason why bi-directional scanning is not obviously > easy to correct. It has to do with the inherent non-linearity of the scan > in the opposite direction. The Zeiss systems use a linearization > calibration on the scanners in the left-to-right direction. This is to > ensure that the velocity of the scan is constant over the field imaged. > When the scan starts – there is a fixed distance where the scanner > accelerates (for 512x512 it is equivalent to roughly 44 pixels) to the left > edge of the image before the AOTF turns the laser on. Over the X scan the > velocity is maintained until the scanner reaches the opposite end of the > scan where the AOTF turns off and the scanner is decelerated and returns to > the left side. > > When scanning in bi-directional mode, where every other line is scanned > backwards – the opposite (backwards) line scanner velocity is not > calibrated and exhibits a sinusoidal pattern. These fluctuations can be > effected by temperature, scan frequency, even scanner age and how hard it > has been historically driven by the user(s). This is why if you’ve ever > tried to correct this in the software you notice that if you correct the > center of the image the sides are out of alignment and vice versa. Zeiss > has made attempts to improve this in later models with liquid cooled > scanners and online software calibrations – and while this has improved for > certain conditions quite well – it is still not comparable to > uni-directional mode. > > Now I know what you’re asking – why not just calibrate that direction > too? I should state that I am not an engineer – but my understanding is > that scanning in the opposite direction is achieved is by inverting the > voltage supplied to the scanner. The power supply likely cannot have 2 > separate calibrations applied to it simultaneously – so it is a technical > limitation. > > That said – there is only one scenario where I recommend using > bi-directional scanning to my users, and that is the case were you require > high frame rates but do not require sub-cellular resolution. I strongly > discourage the idea of bi-directional scanning to save time and for most > people uni-directional mode is sufficient. > > Hope this helps! > > -Jason > |
Free forum by Nabble | Edit this page |