cmake3.8.0+VTK7.1.1+ITK4.11.1+VS2015的安装,编译和配置
1. 资源
2.⽂件夹
2.2cmake
2,2VTK
其中
source_code中存放下载的ZIP⽂件以及解压缩之后的⽂件
relea中存放cmake编译后的⽂件
VTK-bin中存放VS编译后的⽂件
2.3 ITK
3.1安装运⾏cmake,双击
3.2编译配置
小肠经
上⾯为三个需要设置的地⽅
步骤:选好⽂件夹→选vs版本→configure→设置上⾯三个地⽅→configure到上⾯都没有红⾊→generate→以管理员的⾝份运⾏VS打开.sln⽂件(以VTK为例)
4 VS中的编译操作
孕妇咳嗽吃什么
步骤:
点击all build→重新⽣成,直到所有的成功→点击install,仅⽣成,直到所有的都成功结果
5 VS中的配置局部属性表(VTK为例)
5.1 将VS2015 VTK_bin中bin⽂件以及ITK_bin中的bin⽂件添加到系统环境变量
5.2新建VC++空项⽬ project1→点击下⾯的属性管理器→右击Debug |x64,添加新项⽬属性表→将属性表保存在VTK总的⽂件夹中→设置VC++⽬录中的包含⽬录以及库⽬录,如图所⽰
→设置c/c++中的常规中的附加包含⽬录,如图所⽰
→设置链接器中的输⼊中的附加依赖项(依赖项的⽅法添加为:打开D:\TOOLS\VTK\VTK_bin\lib将⽂件夹中所有的.lib⽂件名添加到⾥⾯)
6测试
6.1VTK测试程序
//
// This simple example shows how to do basic rendering and pipeline
// creation using C++.
//
#include "vtkCylinderSource.h"
#include "vtkPolyDataMapper.h"
#include "vtkActor.h"
#include "vtkRenderer.h"
#include "vtkRenderWindow.h"
出纳交接表模板#include "vtkRenderWindowInteractor.h"
#include "vtkProperty.h"
#include "vtkCamera.h"
#include <vtkAutoInit.h>
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingOpenGL2)
VTK_MODULE_INIT(vtkRenderingOpenGL2)
VTK_MODULE_INIT(vtkInteractionStyle);
VTK_MODULE_INIT(vtkRenderingFreeType);
int main()
{
// This creates a polygonal cylinder model with eight circumferential facets. //
vtkCylinderSource *cylinder = vtkCylinderSource::New();
cylinder->SetResolution(8);
// The mapper is responsible for pushing the geometry into the graphics // library. It may also do color mapping, if scalars or other attributes
// are defined.
//
vtkPolyDataMapper *cylinderMapper = vtkPolyDataMapper::New();
cylinderMapper->SetInputConnection(cylinder->GetOutputPort());
// The actor is a grouping mechanism: besides the geometry (mapper), it // also has a property, transformation matrix, and/or texture map.
// Here we t its color and rotate it -22.5 degrees.
vtkActor *cylinderActor = vtkActor::New();
cylinderActor->SetMapper(cylinderMapper);
cylinderActor->GetProperty()->SetColor(1.0000, 0.3882, 0.2784);
cylinderActor->RotateX(30.0);
cylinderActor->RotateY(-45.0);
实验室科学// Create the graphics structure. The renderer renders into the
/
/ render window. The render window interactor captures mou events // and will perform appropriate camera or actor manipulation
// depending on the nature of the events.
//
vtkRenderer *ren1 = vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
renWin->AddRenderer(ren1);
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
// Add the actors to the renderer, t the background and size
//
ren1->AddActor(cylinderActor);
ren1->SetBackground(0.1, 0.2, 0.4);
renWin->SetSize(200, 200);
// We'll zoom in a little by accessing the camera and invoking a "Zoom"
// method on it.
ren1->RetCamera();
ren1->GetActiveCamera()->Zoom(1.5);
renWin->Render();
胃酸过多吃什么食物好// This starts the event loop and as a side effect caus an initial render. iren->Start();
// Exiting from here, we have to delete all the instances that
// have been created.
cylinder->Delete();网络互动营销
cylinderMapper->Delete();
cylinderActor->Delete();
ren1->Delete();
renWin->Delete();
马来西亚旅游签证
iren->Delete();烧大肠的做法
return 0;
}