Giter VIP home page Giter VIP logo

fmjpeg2koj's People

Contributors

draconpern avatar hunyadi avatar john-jam avatar sameeul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fmjpeg2koj's Issues

The build fails over linux.

Linker fails to link against the references in openjpeg libraries. If line 16,17,18 are commented out in CMakelists.txt then the build succeeds. Submitting the error and the CMakelists.txt.

Error:
$ ninja
[1/6] Linking CXX shared library libfmjpeg2k.so.1.0.2
FAILED: : && /usr/bin/c++ -fPIC -shared -Wl,-soname,libfmjpeg2k.so.1 -o libfmjpeg2k.so.1.0.2 CMakeFiles/fmjpeg2k.dir/djcodecd.o CMakeFiles/fmjpeg2k.dir/djcodece.o CMakeFiles/fmjpeg2k.dir/djcparam.o CMakeFiles/fmjpeg2k.dir/djdecode.o CMakeFiles/fmjpeg2k.dir/djencode.o CMakeFiles/fmjpeg2k.dir/djrparam.o CMakeFiles/fmjpeg2k.dir/djutils.o CMakeFiles/fmjpeg2k.dir/memory_file.o -L/home/umar/.local/lib /usr/lib/libi2d.so.3.6.1.abi2 /usr/lib/libdcmjpeg.so.3.6.1.abi2 /usr/lib/libijg8.so.3.6.1.abi2 /usr/lib/libijg12.so.3.6.1.abi2 /usr/lib/libijg16.so.3.6.1.abi2 /usr/lib/libdcmjpls.so.3.6.1.abi2 /usr/lib/libcmr.so.3.6.1.abi2 /usr/lib/libdcmwlm.so.3.6.1.abi2 /usr/lib/libdcmpstat.so.3.6.1.abi2 /usr/lib/libdcmrt.so.3.6.1.abi2 /usr/lib/libdcmseg.so.3.6.1.abi2 /home/umar/.local/lib/libopenjp2.so.2.3.0 -lCharLS /usr/lib/libdcmtls.so.3.6.1.abi2 /usr/lib/libdcmsr.so.3.6.1.abi2 /usr/lib/libdcmimage.so.3.6.1.abi2 -ltiff -ljpeg -lpng -lxml2 /usr/lib/libdcmdsig.so.3.6.1.abi2 -lssl -lcrypto /usr/lib/libdcmqrdb.so.3.6.1.abi2 /usr/lib/libdcmnet.so.3.6.1.abi2 -lwrap /usr/lib/libdcmimgle.so.3.6.1.abi2 /usr/lib/libdcmfg.so.3.6.1.abi2 /usr/lib/libdcmiod.so.3.6.1.abi2 /usr/lib/libdcmdata.so.3.6.1.abi2 /usr/lib/liboflog.so.3.6.1.abi2 /usr/lib/libofstd.so.3.6.1.abi2 -lpthread -lz -lm -lpthread -Wl,-rpath,/home/umar/.local/lib: && :
CMakeFiles/fmjpeg2k.dir/djcodecd.o: In function DJPEG2KDecoderBase::decodeFrame(DcmPixelSequence*, DJPEG2KCodecParameter const*, DcmItem*, unsigned int, unsigned int&, void*, unsigned int, int, unsigned short, unsigned short, unsigned short, unsigned short)': djcodecd.cc:(.text+0x21a5): undefined reference to opj_create_decompress'
djcodecd.cc:(.text+0x21ca): undefined reference to opj_set_info_handler' djcodecd.cc:(.text+0x21e8): undefined reference to opj_set_warning_handler'
djcodecd.cc:(.text+0x2206): undefined reference to opj_set_error_handler' djcodecd.cc:(.text+0x2215): undefined reference to opj_set_default_decoder_parameters'
djcodecd.cc:(.text+0x222e): undefined reference to opj_setup_decoder' djcodecd.cc:(.text+0x2246): undefined reference to opj_stream_destroy'
djcodecd.cc:(.text+0x2260): undefined reference to opj_destroy_codec' djcodecd.cc:(.text+0x22df): undefined reference to opj_read_header'
djcodecd.cc:(.text+0x2306): undefined reference to opj_stream_destroy' djcodecd.cc:(.text+0x2320): undefined reference to opj_destroy_codec'
djcodecd.cc:(.text+0x233a): undefined reference to opj_image_destroy' djcodecd.cc:(.text+0x24fe): undefined reference to opj_decode'
djcodecd.cc:(.text+0x251b): undefined reference to opj_end_decompress' djcodecd.cc:(.text+0x2542): undefined reference to opj_stream_destroy'
djcodecd.cc:(.text+0x255c): undefined reference to opj_destroy_codec' djcodecd.cc:(.text+0x2576): undefined reference to opj_image_destroy'
djcodecd.cc:(.text+0x274c): undefined reference to opj_stream_destroy' djcodecd.cc:(.text+0x2766): undefined reference to opj_destroy_codec'
djcodecd.cc:(.text+0x2780): undefined reference to opj_image_destroy' CMakeFiles/fmjpeg2k.dir/djcodece.o: In function DJPEG2KEncoderBase::compressRawFrame(unsigned char const*, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, bool, OFString const&, DcmPixelSequence*, OFList&, unsigned long&, DJPEG2KCodecParameter const*) const':
djcodece.cc:(.text+0x3054): undefined reference to opj_set_default_encoder_parameters' djcodece.cc:(.text+0x3251): undefined reference to opj_create_compress'
djcodece.cc:(.text+0x3276): undefined reference to opj_set_info_handler' djcodece.cc:(.text+0x3294): undefined reference to opj_set_warning_handler'
djcodece.cc:(.text+0x32b2): undefined reference to opj_set_error_handler' djcodece.cc:(.text+0x32e5): undefined reference to opj_setup_encoder'
djcodece.cc:(.text+0x3308): undefined reference to opj_destroy_codec' djcodece.cc:(.text+0x33ba): undefined reference to opj_start_compress'
djcodece.cc:(.text+0x3430): undefined reference to opj_encode' djcodece.cc:(.text+0x34b1): undefined reference to opj_end_compress'
djcodece.cc:(.text+0x3515): undefined reference to opj_stream_destroy' djcodece.cc:(.text+0x352f): undefined reference to opj_destroy_codec'
djcodece.cc:(.text+0x3549): undefined reference to opj_image_destroy' CMakeFiles/fmjpeg2k.dir/djcodece.o: In function DJPEG2KEncoderBase::compressRenderedFrame(DcmPixelSequence*, DicomImage*, OFString const&, OFList&, unsigned long&, DJPEG2KCodecParameter const*, unsigned int, FMJPEG2KRepresentationParameter const*) const':
djcodece.cc:(.text+0x4f37): undefined reference to opj_set_default_encoder_parameters' djcodece.cc:(.text+0x5248): undefined reference to opj_create_compress'
djcodece.cc:(.text+0x526d): undefined reference to opj_set_info_handler' djcodece.cc:(.text+0x528b): undefined reference to opj_set_warning_handler'
djcodece.cc:(.text+0x52a9): undefined reference to opj_set_error_handler' djcodece.cc:(.text+0x52dc): undefined reference to opj_setup_encoder'
djcodece.cc:(.text+0x52ff): undefined reference to opj_destroy_codec' djcodece.cc:(.text+0x53b9): undefined reference to opj_start_compress'
djcodece.cc:(.text+0x543a): undefined reference to opj_encode' djcodece.cc:(.text+0x54bb): undefined reference to opj_end_compress'
djcodece.cc:(.text+0x551f): undefined reference to opj_stream_destroy' djcodece.cc:(.text+0x552e): undefined reference to opj_destroy_codec'
djcodece.cc:(.text+0x553d): undefined reference to opj_image_destroy' CMakeFiles/fmjpeg2k.dir/djcodece.o: In function frametoimage(unsigned char const*, int, OFString, int, int, int, int, bool, opj_cparameters*, opj_image**)':
djcodece.cc:(.text+0x5a87): undefined reference to opj_image_create' CMakeFiles/fmjpeg2k.dir/memory_file.o: In function opj_stream_create_memory_stream(DecodeData*, unsigned int, bool)':
memory_file.cpp:(.text+0x35a): undefined reference to opj_stream_create' memory_file.cpp:(.text+0x387): undefined reference to opj_stream_set_user_data'
memory_file.cpp:(.text+0x39e): undefined reference to opj_stream_set_user_data_length' memory_file.cpp:(.text+0x3b4): undefined reference to opj_stream_set_read_function'
memory_file.cpp:(.text+0x3ca): undefined reference to opj_stream_set_write_function' memory_file.cpp:(.text+0x3e0): undefined reference to opj_stream_set_skip_function'
memory_file.cpp:(.text+0x3f6): undefined reference to opj_stream_set_seek_function' /usr/bin/ld: libfmjpeg2k.so.1.0.2: hidden symbol opj_read_header' isn't defined
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

CMakeLists.txt

Request for commercial license

Hi guys,

Sorry for posting this request in the issue section. I want do buy a commercial license for this library. I tried to contact you, but don't get any response. Can you please send me an offer or post how to get a different license?

Nice work

I tried to do this a few years ago, but it was pretty messy.
What steps do I need to take to get an openjpeg-enabled build of DCMTK ?
Just put this folder with the other codecs ?

Also, how did you test encode/decode ?

dcm2pnm with j2k files

Hi,

First thank you for your source good.
I am facing with one issue.
I used your dcmcjp2k then I implemented dcm2pnm with your j2k lib to created bitmap from these dcm j2k files.
Then I tried to created bitmap with 3 images:
One called 8bits (8 bits allocated, 7 bits stored, high bits 7).
One called 12bits (16 bits allocated, 12 bits stored, high bits 11).
One called 16bits (16 bits allocated, 15 bits stored, high bits 14).

The conversion to bitmap file for 8 bits and 12 bits working.
But the 16bits create a bad file (image distorted) see the linked file.

I opened as well the file 16bits with Osirix, Weasis and MicroDICOM.
Do you have an idea what it?

Thanks,

Adil
16bits
weasis16bits

Mod for C++14 +

..../djcodecd.cc:26:
/usr/include/dcmtk/config/osconfig.h:1145:2: error: invalid preprocessing directive #errorDCMTK
1145 | #error\
| ^~~~~~
1146 | DCMTK was configured to use C++14 features, but your compiler does not or was not configured to provide them. cmake_minimum_required(VERSION 3.12)

I actually had to go to v17 to get it to build.

In CMakeLists.txt:
Change:
set (CMAKE_CXX_STANDARD 11)
To:
set (CMAKE_CXX_STANDARD 17)

Decoding J2K RGB files - invalid value for 'PhotometricInterpretation' (YBR_RCT)

Hello,

I'm having an issue when trying to decode RGB JPEG2000 files by using this codec. DCMTK console log is as follows:

E: invalid value for 'PhotometricInterpretation' (YBR_ICT)

or

E: invalid value for 'PhotometricInterpretation' (YBR_RCT)

The problem is with many files, but to this post I attach two of them (YBR_RCT anf YBR_ICT).
All of failing files share the same image-related attributes:
"BitsStored" -> 8,
"BitsAllocated" -> 8,
"HighBit" -> 7,
"SamplesPerPixel" -> 3

"PhotometricInterpretation" -> YBR_ICT or YBR_RCT

I am able to read MONOCHROME2 JPEG2000 files with your codec.

Example files:
https://drive.google.com/open?id=10JsJpsp3zNc2vUBdEkn8QK3UmL0Tq9HT

I'd be really grateful if you could help me.
Cheers,
M

The use of INCLUDE_* macros is deprecated

Many of the c files in this repo have instructions like this in dcmjp2k.cc:

#define INCLUDE_CSTDLIB
#define INCLUDE_CSTDIO
#define INCLUDE_CSTRING

Those instructions are not supported by newer versions of dcmtk and are causing errors during compilation.
They should be replaced by:

#include <cstdlib>
#include <cstdio>
#include <cstring>

and others, respectfully

conda package

Hi, I have created a recipe for a conda package of fmjpeg2koj. Do you plan to create a Github tag so that we can refer to that tag to build the package?

Here is the recipe PR (conda-forge/staged-recipes#22639)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.