亲测ITK和VTK的配置
参考: https://blog.csdn.net/qq_32809093/article/details/109196766
cmake的下载链接: https://cmake.org/download/ https://github.com/Kitware/CMake/releases ITK的下载链接: http://www.itk.org/ITK/resources/software.html VTK的下载链接: https://vtk.org/download/
配置过程中出现的问题:
问题:Error in configuration process, project files may be invalid
解决:问题文件夹路径名太长,导致报错,将文件所在路径的长度缩短。
问题:无法获取.dll文件
VTK在手动配准属性表时,需要将
D:\AI\I_VTK\VTK_Bin\bin文件下所有的.dll文件复制到
C:\Windows\System32和C:\Windows\SysWOW64
问题:没有头文件 “itkImageIOFactoryRegisterManager.h”
解决:在项目内添加头文件 “itkImageIOFactoryRegisterManager.h”,如下:
#ifndef itkImageIOFactoryRegisterManager_h
#define itkImageIOFactoryRegisterManager_h
namespace itk {
class ImageIOFactoryRegisterManager
{
public:
explicit ImageIOFactoryRegisterManager(void (* const list[])(void))
{
for(;*list != nullptr; ++list)
{
(*list)();
}
}
};
void BMPImageIOFactoryRegister__Private();void BioRadImageIOFactoryRegister__Private();void Bruker2dseqImageIOFactoryRegister__Private();void GDCMImageIOFactoryRegister__Private();void GE4ImageIOFactoryRegister__Private();void GE5ImageIOFactoryRegister__Private();void GiplImageIOFactoryRegister__Private();void HDF5ImageIOFactoryRegister__Private();void JPEGImageIOFactoryRegister__Private();void JPEG2000ImageIOFactoryRegister__Private();void LSMImageIOFactoryRegister__Private();void MINCImageIOFactoryRegister__Private();void MRCImageIOFactoryRegister__Private();void MetaImageIOFactoryRegister__Private();void NiftiImageIOFactoryRegister__Private();void NrrdImageIOFactoryRegister__Private();void PNGImageIOFactoryRegister__Private();void StimulateImageIOFactoryRegister__Private();void TIFFImageIOFactoryRegister__Private();void VTKImageIOFactoryRegister__Private();
void (* const ImageIOFactoryRegisterRegisterList[])(void) = {
BMPImageIOFactoryRegister__Private,BioRadImageIOFactoryRegister__Private,Bruker2dseqImageIOFactoryRegister__Private,GDCMImageIOFactoryRegister__Private,GE4ImageIOFactoryRegister__Private,GE5ImageIOFactoryRegister__Private,GiplImageIOFactoryRegister__Private,HDF5ImageIOFactoryRegister__Private,JPEGImageIOFactoryRegister__Private,JPEG2000ImageIOFactoryRegister__Private,LSMImageIOFactoryRegister__Private,MINCImageIOFactoryRegister__Private,MRCImageIOFactoryRegister__Private,MetaImageIOFactoryRegister__Private,NiftiImageIOFactoryRegister__Private,NrrdImageIOFactoryRegister__Private,PNGImageIOFactoryRegister__Private,StimulateImageIOFactoryRegister__Private,TIFFImageIOFactoryRegister__Private,VTKImageIOFactoryRegister__Private,
nullptr};
const ImageIOFactoryRegisterManager ImageIOFactoryRegisterManagerInstance(ImageIOFactoryRegisterRegisterList);
}
#endif
问题:在添加“itkImageIOFactoryRegisterManager.h”后,会发现0000JPEG等不能解析时,就删除“itkImageIOFactoryRegisterManager.h”中对应的读取图片类型,就可以解决问题。
|