[vtkusers] vtkDICOMImageReader problem

Corrie Allen corrieallen at gmail.com
Thu Feb 14 01:57:47 EST 2008


Hi Folks,
I'm trying to make a little change to a working XCode program I've  
been messing with on my Mac.  It works fine when importing a stack of  
PNG images using the vtkPNGReader.  However, when I simply add the  
vtkDICOMImageReader header and then instantiate a DICOM reader, I get  
a stack of errors that may (or may not) be related to XCodes GCC  
compiler (the one tucked away in the Developer folder).  I've got  
another version of the program incorporating vtkDICOMImageReader that  
works fine when  I compile it in the Terminal app using GCC 4.0 (the  
one in /usr/bin- I think).  GCC_Select says I'm using GCC 4.0 as my  
default compiler.  Any advice will be appreciated .

MacBook Pro, Intel Core Duo 2.4 GHz, OSX10.4.11, GCC 4.0, VTK 5.0,  
XCode v.2.5 (ZeroLink off, building for i386 architecture)

	vtkPNGReader* reader = vtkPNGReader::New();
	reader->SetFilePrefix("/Lagearpng/lagearpng");
	reader->SetDataExtent(0,432, 0, 432, 0, 97);
	reader->Update();
	cout << "scalar data type is: " <<(reader->GetDataScalarType()) <<  
endl;
		
	//vtkDICOMImageReader * dr = vtkDICOMImageReader::New();
	//dr->SetDirectoryName( "/Wendy" );
	//dr->Update();

	Linking errors show up when the last three lines are uncommented:


/Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld:  
Undefined symbols:
DICOMParser::ReadHeader()
DICOMParser::IsDICOMFile(DICOMFile*)
DICOMParser::ClearAllDICOMTagCallbacks()
DICOMParser::OpenFile(std::basic_string<char, std::char_traits<char>,  
std::allocator<char> > const&)
DICOMParser::DICOMParser()
DICOMAppHelper::GetImageData(void*&, DICOMParser::VRTypes&, unsigned  
long&)
DICOMAppHelper::RescaledImageDataIsFloat()
DICOMAppHelper::RescaledImageDataIsSigned()
DICOMAppHelper::GetImagePositionPatientFilenamePairs 
(std::vector<std::pair<float, std::basic_string<char,  
std::char_traits<char>, std::allocator<char> > >,  
std::allocator<std::pair<float, std::basic_string<char,  
std::char_traits<char>, std::allocator<char> > > > >&, bool)
DICOMAppHelper::Clear()
DICOMAppHelper::DICOMAppHelper()
/vtkbin/include/lib/libvtkIO.a(vtkDICOMImageReader.o) reference to  
undefined DICOMParser::ReadHeader()
/vtkbin/include/lib/libvtkIO.a(vtkDICOMImageReader.o) reference to  
undefined DICOMParser::IsDICOMFile(DICOMFile*)
/vtkbin/include/lib/libvtkIO.a(vtkDICOMImageReader.o) reference to  
undefined DICOMParser::ClearAllDICOMTagCallbacks()
/vtkbin/include/lib/libvtkIO.a(vtkDICOMImageReader.o) reference to  
undefined DICOMParser::OpenFile(std::basic_string<char,  
std::char_traits<char>, std::allocator<char> > const&)
/vtkbin/include/lib/libvtkIO.a(vtkDICOMImageReader.o) reference to  
undefined DICOMParser::DICOMParser()
/vtkbin/include/lib/libvtkIO.a(vtkDICOMImageReader.o) reference to  
undefined DICOMAppHelper::GetImageData(void*&, DICOMParser::VRTypes&,  
unsigned long&)
/vtkbin/include/lib/libvtkIO.a(vtkDICOMImageReader.o) reference to  
undefined DICOMAppHelper::RescaledImageDataIsFloat()
/vtkbin/include/lib/libvtkIO.a(vtkDICOMImageReader.o) reference to  
undefined DICOMAppHelper::RescaledImageDataIsSigned()
/vtkbin/include/lib/libvtkIO.a(vtkDICOMImageReader.o) reference to  
undefined DICOMAppHelper::GetImagePositionPatientFilenamePairs 
(std::vector<std::pair<float, std::basic_string<char,  
std::char_traits<char>, std::allocator<char> > >,  
std::allocator<std::pair<float, std::basic_string<char,  
std::char_traits<char>, std::allocator<char> > > > >&, bool)
/vtkbin/include/lib/libvtkIO.a(vtkDICOMImageReader.o) reference to  
undefined DICOMAppHelper::Clear()
/vtkbin/include/lib/libvtkIO.a(vtkDICOMImageReader.o) reference to  
undefined DICOMAppHelper::DICOMAppHelper()
collect2: ld returned 1 exit status
Command /Developer/usr/bin/g++-4.0 failed with exit code 1

Build failed (1 error, 2 warnings)

Thanks for any help.
Corrie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080213/2f4ee859/attachment.htm>


More information about the vtkusers mailing list