flimfit / FLIMfit

State of the art fluorescence lifetime imaging analysis software
http://flimfit.org
GNU General Public License v2.0
23 stars 14 forks source link

Bug in loading 1D lifetime scans from PicoQuant #275

Closed ilyaradko closed 7 years ago

ilyaradko commented 7 years ago

Hello

There is a bug in loading 1D scans from PicoQuant's pre-histogrammed Image Data File. I am using FLIMfit version 4.12.0.

There is one bug and two related issues:

  1. The problem occurs with files that have only 1 pixel along y-direction, i.e., only one line of lifetime scan. Trying to load such files, results in an Error in FLIMfit with the message as shown in the attachment file bug_report.txt. Interestingly, exactly the same data file, but transposed (just a swap of two 32-bit words in the header) so that there is 1 pixel along x-direction, is loaded without complaints.
  2. A related issue/bug - FLIMfit transpose the PicoQuant data while loading, so that x-direction becomes y-direction and vice versa. It was not the case in version 4.9.1 and appeared since version 4.10.3.
  3. A related issue/bug in the GUI. For 1D scans that are successfully loaded by FLIMfit (those with 1 pixel along x-directions), it is not possible to see lifetime histograms by clicking on the loaded image, because the area is too narrow. This behaviour can also be seen with square/rectangular scans: It is not possible to select pixels close to the edge of the scan.

I have attached a bug report from FLIMfit. Unfortunately, I cannot attach the problematic 1D data files, because this form does not allow to attach binary files - I can send them by e-mail. bug_report.txt

imunro commented 7 years ago

Hello

Thanks for reporting this. Can I ask if these are binned files (typically with a .bin suffix)?

ilyaradko commented 7 years ago

Yes, they are .bin files in this format: http://www.tcspc.com/doku.php/glossary:pre-histogrammed_image

imunro commented 7 years ago

Thanks I'll have a look and get back to you shortly.

imunro commented 7 years ago

My apologies for the problems. @ilyaradko Could you possibly try one of the beta versions from https://storage.googleapis.com/flimfit-downloads/latest/4.12.0-9-g5931635/FLIMfit_4.12.0-9-g5931635_MACI64.zip or https://storage.googleapis.com/flimfit-downloads/merge/4.12.0-9-g5931635/FLIMfit%204.12.0-9-g5931635%20Setup%20x64.exe , depending on your platform, and see if this addresses any of the issues that you are having?

ilyaradko commented 7 years ago

Sorry for the delay, @imunro. No, unfortunately, it does not address any of the issues. The only difference is that this beta gives error for 1D scans along y-direction, while version 4.12.0 gives error for 1D scans along x-direction.

imunro commented 7 years ago

Sorry to have wasted your time. In that case could I please ask you to to upload examples of the failing files to https://www.openmicroscopy.org/qa2/ along with a brief description of the problem in the feedback field. Many thanks.

ilyaradko commented 7 years ago

Sure. I created a feedback with ID 17394.

imunro commented 7 years ago

Thanks.I can see them. I'll report back as soon as I work out what's going wrong.

imunro commented 7 years ago

@ilyaradko Sorry for the delay in replying, this turned out to be quite complex. I think I now have the basic functionality working with these files although some work remains on the graphics. When you have some time, could I please ask you to try one of the beta-versions from the links below and see if I'm heading in the right direction. Many thanks. https://storage.googleapis.com/flimfit-downloads/latest/4.12.0-14-g0a6c464/FLIMfit_4.12.0-14-g0a6c464_MACI64.zip or https://storage.googleapis.com/flimfit-downloads/merge/4.12.0-14-g0a6c464/FLIMfit%204.12.0-14-g0a6c464%20Setup%20x64.exe

ilyaradko commented 7 years ago

@imunro Thank you for looking at that. You are definitely heading in the right direction. This beta version opens correctly 1D files and also slightly larger ones ( I checked data files with dimensions 200x10 pixels). However, when I try to load a large file 250x250 pixels, the data are again transposed, exactly as in version 4.12.0, whereas version 4.9.1 shows that large file correctly.

imunro commented 7 years ago

Thanks for spotting that. I think I know what I did wrong.

imunro commented 7 years ago

Hopefully this is better. I'm afraid I won't get back to this till next week now https://storage.googleapis.com/flimfit-downloads/latest/4.12.0-15-gb3aa463/FLIMfit_4.12.0-15-gb3aa463_MACI64.zip https://storage.googleapis.com/flimfit-downloads/merge/4.12.0-15-gb3aa463/FLIMfit%204.12.0-15-gb3aa463%20Setup%20x64.exe

ilyaradko commented 7 years ago

@imunro This version seems to work correctly. Thank you.

imunro commented 7 years ago

Thanks for all the help. I'll try and get these changes merged and release a v4.12.1 as soon as I can. Would it be ok to acknowledge your assistance in the the release announcement?

ilyaradko commented 7 years ago

Sure, I don't mind :) Thank you too for fixing this.

seanwarren commented 7 years ago

Note to self