Hi,
I ran into trouble using sunpy to read in jpeg2000 files. Looking for the source I ran across the statement on the installation page regarding support for jpeg2000 files and the anaconda distribution - "Currently Glymur / JPEG2000 support is not tested under Anaconda on any platforms. If you require JPEG2000 support either use a different install method, or contact the SunPy mailing list."
Since I'd like to use both my anaconda distribution and sunpy for examining jpeg2000 images, I'd like to see if there's a workaround for this. When I try:
dh = jp2.read(file)
I get a bunch of error messages ending in:
/export/slavin/python/anaconda/lib/python2.7/site-packages/glymur/jp2k.pyc in _populate_dparams(self, rlevel, tile, area)
1339 # Return raw codestream components instead of "interpolating" the
1340 # colormap?
-> 1341 dparam.flags |= 1 if self.ignore_pclr_cmap_cdef else 0
1342
1343 dparam.decod_format = self._codec_format
AttributeError: 'DecompressionParametersType' object has no attribute 'flags'
I think this is caused by the version of openjpeg used -- i.e. by the fact that glymur.lib.openjp2.OPENJP2 is None which leads to dparam = opj.DecompressionParametersType() and presumably does not create the attribute flags. So does anyone know to fix this? Is it about installing the right version of the openjpeg library?
Thanks for any help,
Jon