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

Start parsing binary setup #7

Closed
wants to merge 3 commits into from

Conversation

larsbergenholtz
Copy link

I personally use the parameters included in the GVDparams section of the file, to ensure proper scaling. Count scaling depends on laserpower, linetime and number frames, and lateral scaling depends on the zoom factor. These variables are included in the binary setup, but are not parsed in the current version of sdtfile. I added the definitions and parsed them in a way I thought fits the rest of the package.

The rest of the binary setup is not included since I do not know what they mean, and can not verify that they work as intended. The parts that are included, I have tested against FLIM files from our setup.

@cgohlke cgohlke added the enhancement New feature or request label Dec 6, 2024
@cgohlke
Copy link
Owner

cgohlke commented Dec 6, 2024

Thank you. Unfortunately the GVDParam structure is version dependent, not at the end, but in the GVDdata field. Simply shortening the GVDParam structure depending on GVD_size cannot work correctly. Bad design.

@larsbergenholtz
Copy link
Author

I am not sure I understand your comment completely.
I added a check for the software version and verified that it works for those two. I am not sure how to implement a version dependent file structure when I only have acces to the current documentation (which I downloaded from Becker and Hickl just recently). This way, if someone else has a different version they can add to the project and hopefully at some point all versions are supported?

@cgohlke
Copy link
Owner

cgohlke commented Dec 6, 2024

The SDT files on my system have GVD_size values of 112, 110, 86, 84, or 64. I could only find the documentation for size 112. 110 I assume just omits the last sreserve. Anyway, the parsing of the binary setup structures needs to be more error resistant. I have released sdtfile v2024.12.6 that adds bh_bin_hdr, spc_bin_hdr, spc_bin_hdr_ext, and gvd_param properties to SetupBlock. Let me know how it works for you.

@cgohlke cgohlke closed this Dec 6, 2024
@larsbergenholtz
Copy link
Author

It seems to work fine on the files that I can test, thank you for the update.

@cgohlke
Copy link
Owner

cgohlke commented Dec 10, 2024

Thanks for confirming and of course the initial implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants