[ITK] ITK_USE_EXTERNAL_GDCM link errors

Rijssel-2, M.J. van M.J.vanRijssel-2 at umcutrecht.nl
Fri May 8 10:23:51 EDT 2015


Dear ITK community,

First of all: you're doing a great job developing and maintaining ITK!

Since I'm working with 4D (3D+time, from DCE-MRI) DICOM files, I'd like to use ITK with the latest GDCM release. (The release notes for GDCM 2.2.4 indicate 'Better support for Time Series stored in Enhanced MR Image Storage', which seems to be exactly what I need.) ITK's default DICOM reader (GDCM 1.2??), doesn't handle these files properly: it complains about 0-spacing which is not supported. (It is true that consecutive slices have 0 spacing in z, they belong to different time points. I'm not sure how common this kind of sorting (time before z) actually is...)

I've obtained ITK using git clone and checked out to the release branch, as suggested here<http://www.itk.org/Wiki/ITK/Git/Download>, so I guess I'm using ITK v4.7rc02. I've obtained GDCM in a similar fashion (cloned from git://git.code.sf.net/p/gdcm/gdcm and checked out to release). Then I built GDCM and ITK setting the ITK_USE_SYSTEM_GDCM flag ON and providing the GDCM_DIR (CMake 3.2.0-rc2, Visual Studio 2012, Win7 x64). Both GDCM and ITK compiled without errors. However, once I try to build one of my ITK-based projects (solutions), I get link errors, e.g. (full output in attached VSoutput.txt):

1>ITKIOGDCM-4.7.lib(itkGDCMImageIO.obj) : error LNK2019: unresolved external symbol "public: static char const * __cdecl gdcm::System::GetLastSystemError(void)" (?GetLastSystemError at System@gdcm@@SAPEBDXZ) referenced in function "public: __cdecl gdcm::ByteValue::ByteValue(char const *,class gdcm::VL const &)" (??0ByteValue at gdcm@@QEAA at PEBDAEBVVL@1@@Z)
1>gdcmMSFF.lib(gdcmImageHelper.obj) : error LNK2001: unresolved external symbol "public: static char const * __cdecl gdcm::VR::GetVRString(enum gdcm::VR::VRType)" (?GetVRString at VR@gdcm@@SAPEBDW4VRType at 12@@Z)

I've also attached CMakeLists.txt and CMakeCache.txt of my project. It seems to me that the compiler should be able to find the libraries, and I think it does, since the GDCM bin directory is listed in the linker's 'Additional Library Directories' (VS, Project, Properties, Configuration Properties, Linker).

What did I miss? In an earlier attempt to deal with these files I've successfully linked DCMTK to ITK in a similar fashion, which did work. (FYI: Unfortunately DCMTK doesn't handle these files properly, it stacks all the slices in z as if they belong to a single time point. I could try to work from there, try to separate them according to some DICOM tag, but I decided to try the latest GDCM first.)

Many thanks in advance!

Kind regards,

Mike van Rijssel

[Beschrijving: cid:EEA90C32-0871-49FB-AB50-67779C278527 at ds.umcutrecht.nl]

PhD Candidate | Department of Radiology | Image Sciences Institute & 7T  MR group | Office E 02.554
Universitair Medisch Centrum Utrecht  | Heidelberglaan 100 | Mail Room Q 02.445 | 3584CX UTRECHT
T +31 (0)88 75 67761 | E mike at isi.uu.nl<mailto:mike at isi.uu.nl> | www.umcutrecht.nl<http://www.umcutrecht.nl/>


------------------------------------------------------------------------------

De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is
uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht
ontvangt, wordt u verzocht de inhoud niet te gebruiken en de afzender direct
te informeren door het bericht te retourneren. Het Universitair Medisch
Centrum Utrecht is een publiekrechtelijke rechtspersoon in de zin van de W.H.W.
(Wet Hoger Onderwijs en Wetenschappelijk Onderzoek) en staat geregistreerd bij
de Kamer van Koophandel voor Midden-Nederland onder nr. 30244197.

Denk s.v.p aan het milieu voor u deze e-mail afdrukt.

------------------------------------------------------------------------------

This message may contain confidential information and is intended exclusively
for the addressee. If you receive this message unintentionally, please do not
use the contents but notify the sender immediately by return e-mail. University
Medical Center Utrecht is a legal person by public law and is registered at
the Chamber of Commerce for Midden-Nederland under no. 30244197.

Please consider the environment before printing this e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150508/33d30614/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 27860 bytes
Desc: image001.jpg
URL: <http://public.kitware.com/pipermail/community/attachments/20150508/33d30614/attachment-0001.jpg>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: VSoutput.txt
URL: <http://public.kitware.com/pipermail/community/attachments/20150508/33d30614/attachment-0003.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://public.kitware.com/pipermail/community/attachments/20150508/33d30614/attachment-0004.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeCache.txt
URL: <http://public.kitware.com/pipermail/community/attachments/20150508/33d30614/attachment-0005.txt>


More information about the Community mailing list