OpenCV3.0 Viz+VTK Creating Widgets (Visual Studio 2013, C++, OpenCV3.0)

#Vizチュートリアルの[CreatingWidgets](http://docs.opencv.org/master/d2/d64/tutorial_creating_widgets.html)を試してみました。

チュートリアルを参考にWidgetを増やして表示してみました。
showWidgetの名前を変えるだけです。
変更したmain部分だけ載せています。

#ソースコード
~~~
#include <opencv_vtk_lib.hpp>
int main()
{
	help();
	viz::Viz3d myWindow("Creating Widgets");
	WTriangle tw(Point3f(0.0, 0.0, 0.0), Point3f(1.0, 1.0, 1.0), Point3f(0.0, 1.0, 0.0), viz::Color::red());
	WTriangle tw2(Point3f(0.0, 0.0, 0.0), Point3f(1.0, 0.0, 1.0), Point3f(0.0, 1.0, 1.0), viz::Color::green());
	myWindow.showWidget("TRIANGLE", tw);
	myWindow.showWidget("TRIANGLE2", tw2);//名前を変えると追加できる
	myWindow.spin();

	return 0;
}
~~~

opencv_vtk_lib.hppの中身を以下のようにし、opencv300\build\includeの下に置く。

~~~
// ビルドモード
#ifdef _DEBUG
#define CV_VTK_EXT_STR "-gd.lib"
#else
#define CV_VTK_EXT_STR ".lib"
#endif

#pragma comment(lib, "LSDyna" CV_VTK_EXT_STR)
#pragma comment(lib, "MapReduceMPI" CV_VTK_EXT_STR)
#pragma comment(lib, "mpistubs" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkalglib" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkCharts" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkCommon" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkDICOMParser" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkexoIIc" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkexpat" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkFiltering" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkfreetype" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkftgl" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkGenericFiltering" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkGeovis" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkGraphics" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkhdf5" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkhdf5_hl" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkHybrid" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkImaging" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkInfovis" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkIO" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkjpeg" CV_VTK_EXT_STR)
#pragma comment(lib, "vtklibxml2" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkmetaio" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkNetCDF" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkpng" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkproj4" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkRendering" CV_VTK_EXT_STR)
#pragma comment(lib, "vtksqlite" CV_VTK_EXT_STR)
#pragma comment(lib, "vtksys" CV_VTK_EXT_STR)
#pragma comment(lib, "vtktiff" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkverdict" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkViews" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkVolumeRendering" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkWidgets" CV_VTK_EXT_STR)
#pragma comment(lib, "vtkzlib" CV_VTK_EXT_STR)
~~~


#開発環境
- VisualStudio2013
- OpenCV3.0
- VTK 5.10 (PCL1.7.2)


#実行結果
![Widgets.png](https://qiita-image-store.s3.amazonaws.com/0/63863/65032e7b-443a-28ca-f8cd-8d296c1be154.png)

#参考文献
OpenCV3.0の導入方法は[こちら](http://qiita.com/SatoshiRobatoFujimoto/items/c65022a5a6bf845d219b)
modulesのvizのincludeファイルはOpenCVのincludeディレクトリにコピペしておきましょう

#プロパティ設定
Additional Include Directories
$(OPENCV_DIR)\build\include;C:\Program Files (x86)\PCL 1.7.2\3rdParty\VTK\include\vtk-5.10;

Additional Library Directories
$(OPENCV_DIR)\build\x86\vc12\lib;C:\Program Files (x86)\PCL 1.7.2\3rdParty\VTK\lib\vtk-5.10;