-
Notifications
You must be signed in to change notification settings - Fork 456
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
pull request #514 breaks DICOM conversion #962
Comments
Could you provide an input J2K which breaks ? You can use: |
Please find a sample attached as jp2k_test.zip To reproduce:
Comments |
@malaterre : my simple addition of two printf() calls reveals the source of the problem, though I do not know the solution. Essentially, running this with the default program
What perplexes me about this code is that it should never get to this point if the stream is not seekable, as earlier we should exit:
So either the call to |
It seems the problem was my implementation of
|
Update OpenJPEG seek to work with modern versions of OpenJPEG, see uclouvain/openjpeg#962
Hello,
Our dcm2niix github project uses openjpeg to decode JPEG2000 images embedded in DICOM files. However, version 2.2 breaks support for many images due to
#514
Therefore, we are stuck on 2.1. Does @mayeut or anyone else have a suggestion of how we can proceed. The only way we can use 2.2 is to set m_nb_tile_parts_correction_checked and recompile, but of course this would hinder others who use the library and want the patch for Adobe images. The ideal solution would seem to be an option that allows the user to set the m_nb_tile_parts_correction_checked property at run-time, depending on their needs (or an updated check that works with proprietary DCMJP2K which seems to use their own branch of openJPEG). In my mind, an ideal solution that would allow us to compile with older (2.1) as well as a future version would look something like this:
opj_set_default_decoder_parameters(¶ms);
#if OPJ_VERSION_MAJOR == 2
#if OPJ_VERSION_MINOR >= 3
params->m_specific_param.m_decoder.m_nb_tile_parts_correction_checked = 0;
#endif
#endif
Any other advice appreciated. Thanks for all the hard work creating this library.
The text was updated successfully, but these errors were encountered: