Convert from OpenCV to Dicom.

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
jorge.quintero
Posts: 2
Joined: Wed, 2017-06-07, 15:03

Convert from OpenCV to Dicom.

#1 Post by jorge.quintero »

Hello everybody,

I'm newbie in DCMTK. I'm doing a program that read a webcam using OpenCV and then send it to Slicer using OpenIgtlink.

My problem is that I don't get to include the DCMTK library in my program. In my C++ program I have:

Code: Select all

#include "igtlOSUtil.h"
#include "igtlImageMessage2.h"
#include "igtlClientSocket.h"


#include "dcmtk/dcmdata/dctk.h"

int main(int argc, char* argv[])
{
....

DcmFileFormat format;

....
and I try to compile with the next command:

Code: Select all


g++ *.c* -o openSeek `pkg-config libseek --libs --cflags` -I/usr/local/include/dcmtk/ -L/usr/local/lib -fpermissive -pthread -ldcmdata

but I get the next error message:

Code: Select all

/usr/bin/ld: /usr/local/lib/libdcmdata.a(dcistrmz.cc.o): referencia sin definir al símbolo 'inflateInit2_'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libz.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
I don't know what is happening.

Can somebody help me?

Thank you very much
Jorge

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: Convert from OpenCV to Dicom.

#2 Post by Jan Schlamelcher »

You probably need to also link against the zlib, i.e.

Code: Select all

-lz
should do the trick.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 1 guest