Translating Bioformats Image Filter code for BAM file metadata extraction.