Skip to content

[ITK 5.1] itkJPEG2000ImageIO.cxx pulls in private openjpeg headers and uses wrong enumss #1807

@Neumann-A

Description

@Neumann-A

Description

#include "openjpeg.h"
#include "j2k.h"
#include "jp2.h"

header jk2.h and jp2.h are not getting installed by OpenJPEG. As such symbols like CODEC_<something> are not available. Remove the private headers and include only openjpeg.h and replace CODEC_<something> with OPJ_CODEC_<something> (same for the CLRSPC enums values)

Furthermore opj_stream_create_default_file_stream does not accept a filehandle any more.
https://github.com/uclouvain/openjpeg/blob/57096325457f96d8cd07bd3af04fe81d7a2ba788/src/lib/openjp2/openjpeg.h#L1212-L1213
http://www.openjpeg.org/doxygen/openjpeg_8c.html#acb36a77efa64f8332c27fc4ea6be066c

In general the OpenJPEG API seems to have changed quite a bit in the meantime (using 2.3.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:Use_Milestone_BacklogUse "Backlog" milestone instead of label for issues without a fixed deadlinetype:BugInconsistencies or issues which will cause an incorrect result under some or all circumstances

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions