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

Add reader for PicoQuant .bin files. #1245

Merged
merged 15 commits into from Aug 20, 2014
Merged

Conversation

imunro
Copy link
Contributor

@imunro imunro commented Jul 31, 2014

This adds support for one of the formats covered by https://trac.openmicroscopy.org.uk/ome/ticket/8059#
NB I am led to believe that the other format is a FIFO rather than imaging format in which case it could prove 'challenging'.

@ghost
Copy link

ghost commented Aug 1, 2014

Code reviewed and tested with /ome/data_repo/from_skyking/picoquant/neil/PollenGrains.bin, which looks just fine. It would certainly be useful to have some additional .bin files for testing purposes fif you have any available.

On the code side, the only question I have is the hardcoding of the Z and C dimension sizes as 1. Is this file format technically capable of storing addtional Z planes or channels? If it can, openBytes will need to cache the series no and invalidate its cache if Z/C change. Also, is the pixelType always XYTCZ? If Z and C never vary, this doesn't matter.

Other than that question, it all looks fine as far as I can tell. There's a couple of comments which could use reindenting and a few extra trailing spaces [e.g. at dataStore == null], but this is purely cosmetic.

@imunro
Copy link
Contributor Author

imunro commented Aug 1, 2014

Re: hard coding of sizeC & sizeZ PicoQuant provided us with example code for reading this format (in Pascal) & this has no capability of handling more than x,y & t. The header in the example file I have available also has no space to store info about other dimensions.

@ghost
Copy link

ghost commented Aug 1, 2014

Cosmetic changes if desired:

Indents: lines 82, 123, 147, 149
Comment alignment: 194, 196
Extra spaces at end of expression: 121

@ghost
Copy link

ghost commented Aug 1, 2014

@melissalinkert Please could you copy the content of /ome/apache_repo/9434/DaisyPollen.bin.zip to from_skyking/picoquant? Looks like a variant of the sample image we already have.

CoreMetadata m = core.get(0);

m.littleEndian = true;
in.order(isLittleEndian());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to have multiple calls to in.order.

@melissalinkert
Copy link
Member

Some mostly minor comments above, but otherwise I think this is fine. QA 9434 has been copied to picoquant/qa-9434, and necessary configuration files have been added.

@imunro
Copy link
Contributor Author

imunro commented Aug 14, 2014

Having finally, with much assistance, managed to get bio-formats to build locally again I think the memory issues have now been addressed.


// disable pre-load mode for very large files
// threshold is set to the size of the largest test file currently available
if ( m.sizeX * m.sizeY * m.sizeT > (1288 * 200 * 200)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be set to slightly smaller than the largest file? That way we're sure to be testing both openBytes code paths. 128MB of pixels (so check 32 * 1024 * 1024) would probably be reasonable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I have only one file to test against & from what rleigh said you have the same test file in which case we can only test one code path. I have tested with a lower threshold locally. Let me know what you think

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we have two test files - one is 98MB, and one is 197MB.

@imunro
Copy link
Contributor Author

imunro commented Aug 14, 2014

Threshold set as requested. Please note this means that larger files will, typically, take very much longer to load.

@melissalinkert
Copy link
Member

All seems fine now, thanks.

melissalinkert added a commit that referenced this pull request Aug 20, 2014
Add reader for PicoQuant .bin files.
@melissalinkert melissalinkert merged commit b858647 into ome:develop Aug 20, 2014
@snizzleorg
Copy link

Hi, let me know if you need any additional bin files for testing.

@imunro
Copy link
Contributor Author

imunro commented Aug 21, 2014

@snizzleorg I think that more test files would be very useful. Thanks.

@imunro imunro deleted the develop-PQBin branch August 21, 2014 20:03
@imunro
Copy link
Contributor Author

imunro commented Aug 22, 2014

@melissalinkert Are you happy for this to be rebased to 5.0 ?

@melissalinkert
Copy link
Member

@imunro: yes, go ahead.

@sbesson
Copy link
Member

sbesson commented Aug 23, 2014

--rebased-to #1287

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

Successfully merging this pull request may close these issues.

None yet

5 participants