[vtkusers] DICOM Images: vtkDicomReader & vtkGdcmReader

Michael Lynch mick.lynch at gmail.com
Sun Oct 18 17:36:10 EDT 2009


Hi Mathieu, hi vtk'ers,
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.

I wondered if anyone else had similar problems or if you could diagnose
where my error based on the message.

Thanks in advance,
Michael

ERROR MESSAGE:
---- 8< -----
[ 88%] Building CXX object
Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkImageYBRToRGB
.cxx.obj
[ 88%] Building CXX object
Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkImageRGBToYBR
.cxx.obj
[ 89%] Building CXX object
Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkGDCMPolyDataR
eader.cxx.obj
[ 89%] Building CXX object
Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkLookupTable16
.cxx.obj
[ 89%] Building CXX object
Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkImageMapToCol
ors16.cxx.obj
[ 89%] Building CXX object
Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkGDCMThreadedI
mageReader2.cxx.obj
[ 90%] Building CXX object
Utilities/VTK/CMakeFiles/vtkgdcm.dir/vtkgdcmInstantia
tor.cxx.obj
Linking CXX shared library ..\..\bin\libvtkgdcm.dll
Info: resolving vtable for gdcm::Anonymizerby linking to
__imp___ZTVN4gdcm10Anon
ymizerE (auto-import)
Info: resolving vtable for gdcm::Readerby linking to
__imp___ZTVN4gdcm6ReaderE (
auto-import)
CMakeFiles\vtkgdcm.dir\vtkGDCMImageWriter.cxx.obj(.text$_ZN4gdcm10AnonymizerC1Ev
[gdcm::Anonymizer::Anonymizer()]+0x4c): In function
`ZN12vtkAlgorithm12GetErrorC
odeEv':
C:/vtk-5.4.2/Filtering/vtkAlgorithm.h: variable 'vtable for
gdcm::Anonymizer' ca
n't be auto-imported. Please read the documentation for ld's
--enable-auto-impor
t for details.
CMakeFiles\vtkgdcm.dir\vtkGDCMPolyDataReader.cxx.obj(.text$_ZN4gdcm6ReaderC1Ev[g
dcm::Reader::Reader()]+0x3a): In function
`ZN12vtkAlgorithm12SetErrorCodeEm':
C:/gdcm-2.0.12/Utilities/VTK//vtkGDCMPolyDataReader.h: variable 'vtable for
gdcm
::Reader' can't be auto-imported. Please read the documentation for ld's
--enabl
e-auto-import for details.
Creating library file: ..\..\bin\libvtkgdcm.dll.a
collect2: ld returned 1 exit status
mingw32-make[2]: *** [bin/libvtkgdcm.dll] Error 1
mingw32-make[1]: *** [Utilities/VTK/CMakeFiles/vtkgdcm.dir/all] Error 2
mingw32-make: *** [all] Error 2
-----------8< -----------------

On Thu, Oct 8, 2009 at 12:52 PM, Michael Lynch <mick.lynch at gmail.com> wrote:

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



-- 
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091018/d247b871/attachment.htm>


More information about the vtkusers mailing list