Hi Mathieu, hi vtk&#39;ers,<div><br></div><div>I have been trying for the past while to build and install GDCM 2.0 as a shared library. Unfortunately it fails when linking libvtkgdcm.dll (see error message below). I am using VTK 5.4.2 and specify the correct vtk build directory in cmake. Cmake configures and generates without any warning. I know that Cmake can correctly find vtk because it warns me that it will build GDCM in Debug as VTK has already been compiled in debug mode.</div>
<div><br></div><div>I wondered if anyone else had similar problems or if you could diagnose where my error based on the message.</div><div><br></div><div>Thanks in advance,</div><div>Michael</div><div><br></div><div>ERROR MESSAGE:</div>
<div>---- 8&lt; -----</div><div>[ 88%] Building CXX object Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkImageYBRToRGB</div><div><div><div>.cxx.obj</div><div>[ 88%] Building CXX object Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkImageRGBToYBR</div>
<div>.cxx.obj</div><div>[ 89%] Building CXX object Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkGDCMPolyDataR</div><div>eader.cxx.obj</div><div>[ 89%] Building CXX object Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkLookupTable16</div>
<div>.cxx.obj</div><div>[ 89%] Building CXX object Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkImageMapToCol</div><div>ors16.cxx.obj</div><div>[ 89%] Building CXX object Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkGDCMThreadedI</div>
<div>mageReader2.cxx.obj</div><div>[ 90%] Building CXX object Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkgdcmInstantia</div><div>tor.cxx.obj</div><div>Linking CXX shared library ..\..\bin\libvtkgdcm.dll</div><div>Info: resolving vtable for gdcm::Anonymizerby linking to __imp___ZTVN4gdcm10Anon</div>
<div>ymizerE (auto-import)</div><div>Info: resolving vtable for gdcm::Readerby linking to __imp___ZTVN4gdcm6ReaderE (</div><div>auto-import)</div><div>CMakeFiles\vtkgdcm.dir\vtkGDCMImageWriter.cxx.obj(.text$_ZN4gdcm10AnonymizerC1Ev</div>
<div>[gdcm::Anonymizer::Anonymizer()]+0x4c): In function `ZN12vtkAlgorithm12GetErrorC</div><div>odeEv&#39;:</div><div>C:/vtk-5.4.2/Filtering/vtkAlgorithm.h: variable &#39;vtable for gdcm::Anonymizer&#39; ca</div><div>n&#39;t be auto-imported. Please read the documentation for ld&#39;s --enable-auto-impor</div>
<div>t for details.</div><div>CMakeFiles\vtkgdcm.dir\vtkGDCMPolyDataReader.cxx.obj(.text$_ZN4gdcm6ReaderC1Ev[g</div><div>dcm::Reader::Reader()]+0x3a): In function `ZN12vtkAlgorithm12SetErrorCodeEm&#39;:</div><div>C:/gdcm-2.0.12/Utilities/VTK//vtkGDCMPolyDataReader.h: variable &#39;vtable for gdcm</div>
<div>::Reader&#39; can&#39;t be auto-imported. Please read the documentation for ld&#39;s --enabl</div><div>e-auto-import for details.</div><div>Creating library file: ..\..\bin\libvtkgdcm.dll.a</div><div>collect2: ld returned 1 exit status</div>
<div>mingw32-make[2]: *** [bin/libvtkgdcm.dll] Error 1</div><div>mingw32-make[1]: *** [Utilities/VTK/CMakeFiles/vtkgdcm.dir/all] Error 2</div><div>mingw32-make: *** [all] Error 2</div></div><div>-----------8&lt; -----------------</div>
<br><div class="gmail_quote">On Thu, Oct 8, 2009 at 12:52 PM, Michael Lynch <span dir="ltr">&lt;<a href="mailto:mick.lynch@gmail.com">mick.lynch@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks Mathieu,<div><br></div><div>I was using the old version from INRIA. I&#39;ll get version 2 and try that out.</div><div><br></div><div>I&#39;ll let you know how it goes.</div><div><br></div><div>Cheers,</div><div>Michael<div>
<div></div><div class="h5"><br>
<br><div class="gmail_quote">On Thu, Oct 8, 2009 at 11:44 AM, Mathieu Malaterre <span dir="ltr">&lt;<a href="mailto:mathieu.malaterre@gmail.com" target="_blank">mathieu.malaterre@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div></div><div>On Thu, Oct 8, 2009 at 5:30 PM, Michael Lynch &lt;<a href="mailto:mick.lynch@gmail.com" target="_blank">mick.lynch@gmail.com</a>&gt; wrote:<br>
&gt; hey there,<br>
&gt; I have a series of DICOM images on my system. I have the names stored in<br>
&gt; vtkStringArray. I want to display the images as a volume and have tried two<br>
&gt; different methods.<br>
&gt; 1. I looked into vtkDicomReader. And actually, if I try to open and view a<br>
&gt; single dicom then vtkDicomReader works perfectly. However, it was not able<br>
&gt; to open a series of images if I passed it the vtkStringArray. I first<br>
&gt; checked if the individual DICOM files were readable using CanReadFile...the<br>
&gt; results were positive for all files in the string array. Below is the error<br>
&gt; I got.<br>
&gt; error message:<br>
&gt; vtkDICOMImageReader.cxx, line 256<br>
&gt; vtkDICOMImageReader (0xd043180): Either a filename was not specified or the<br>
&gt; specified directory does not contain any DICOM images.<br>
&gt; I thought perhaps vtkDicomReader was not able to open a series of images so<br>
&gt; I decided to migrate to vtkGdcmReader (which I heard was more powerful).<br>
&gt; 2. So I tried to read the file selection using vtkDicomReader. The result<br>
&gt; was a little more cryptic though. I get no error message when I build or run<br>
&gt; but the volume did not appear as it should. The series of images appear as<br>
&gt; just one image, perhaps it&#39;s a problem with image spacing? My main problem<br>
&gt; is that, even though I compiled GDCM in debug, qtcreator will not run in<br>
&gt; debug when I&#39;m using vtkGdcmReader. Can anyone tell me what the problem is?<br>
&gt; I hope this is the right forum for this question. But I know this mailing<br>
&gt; list has a lot of expertise and a large responsive community...so I thought<br>
&gt; I&#39;d post here.<br>
&gt; Thanks in advance,<br>
<br>
</div></div>You are using vtkGDCMImageReader right ? Not the old vtkGdcmReader<br>
from gdcm 1.x ?<br>
<br>
Just pass in the vtkStringArray:<br>
<br>
<a href="http://gdcm.sourceforge.net/html/classvtkGDCMImageReader.html#051e8ec877c64032750d1b628be247ca" target="_blank">http://gdcm.sourceforge.net/html/classvtkGDCMImageReader.html#051e8ec877c64032750d1b628be247ca</a><br>


<br>
The list of file will NOT be reordered automatically, you need to<br>
explicitely ask for reordering:<br>
<br>
<a href="http://sourceforge.net/apps/mediawiki/gdcm/index.php?title=Using_GDCM_API#Automatic_ordering_of_slices_for_vtkGDCMImageReader.SetFileNames" target="_blank">http://sourceforge.net/apps/mediawiki/gdcm/index.php?title=Using_GDCM_API#Automatic_ordering_of_slices_for_vtkGDCMImageReader.SetFileNames</a><br>


<br>
HTH<br>
--<br>
<font color="#888888">Mathieu<br>
</font></blockquote></div><br><br clear="all"><br></div></div>-- <br>Michael <br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Michael <br>
</div>