读取.dcm文件itk

时间:2018-02-28 08:41:37

标签: image-processing dicom itk

我正在使用itk库来阅读我的.dcm文件,其示例位于:https://itk.org/Doxygen46/html/IO_2DicomImageReadWrite_8cxx-example.html

当我使用CMake构建此示例时,它看起来一切正常,我可以例如以.png格式编写.dcm。但是当我使用Visual Studio(2015-2013-2010)时,我面临着这些错误:

LNK1120 4 unresolved externals
LNK2019 unresolved external symbol gethostname referenced in function "public: static bool __cdecl gdcm::System::GetHostName(char * const)" (?GetHostName@System@gdcm@@SA_NQEAD@Z)  
LNK2019 unresolved external symbol WSACleanup referenced in function "public: static bool __cdecl gdcm::System::GetHostName(char * const)" (?GetHostName@System@gdcm@@SA_NQEAD@Z)   
LNK2019 unresolved external symbol WSAStartup referenced in function "public: static bool __cdecl gdcm::System::GetHostName(char * const)" (?GetHostName@System@gdcm@@SA_NQEAD@Z)   Read_Write  
LNK2019 unresolved external symbol __imp_UuidCreate referenced in function "protected: static bool __cdecl gdcm::UIDGenerator::GenerateUUID(unsigned char *)" (?GenerateUUID@UIDGenerator@gdcm@@KA_NPEAE@Z) 

gdcm似乎有问题。

1 个答案:

答案 0 :(得分:2)

关于套接字函数:似乎应该将项目链接到WS2_32.lib

关于__imp_UuidCreate:似乎是known issue