【2016年7月4周】编译ITK
1、下载必备文件 InsightToolkit-4.8.1、cmake
2、cmake编译
![](https://i-blog.csdnimg.cn/blog_migrate/678291731d2403b52d2c365952e77bcc.png)
修改CMAKE_INSTALL_PREFIX配置到需要生成的目录下面去。
然后Generate
进行相应的配置
![](https://i-blog.csdnimg.cn/blog_migrate/dcb3be9f2921a87c5ae4c93490c83a15.png)
![](https://i-blog.csdnimg.cn/blog_migrate/c8e6e19810970abe9de0657a179c1eca.png)
编写相应的代码
// ConsoleApplication1.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
#include "itkimage.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
typedef itk::Image<unsigned short,3> ImageType;
ImageType::Pointer iamge = ImageType::New();
cout<<"ok"<<endl;
return 0;
}
![](https://i-blog.csdnimg.cn/blog_migrate/b2fa702d00e576c8b1d4b33052b8f375.png)
结果是正确的。