Mac OS X Yosemite下VTK6.1安裝及其運行效果測試

因爲以前的ThinkPad的已經用了4年多了,已逐漸不能知足當下的三維軟件開發的要求了。終於在拿到了幾個月的工資後,橫下心買了個mac,也爲從此的移動端開發作下準備。app

The Visualization Toolkit (VTK)(http://www.vtk.org/) is an open-source,   freely available software system for 3D computer graphics, image processing and  visualization. VTK consists of a C++ class library and several interpreted  interface layers including Tcl/Tk, Java, and Python. Kitware, whose team  created and continues to extend the toolkit, offers professional support and  consulting services for VTK.        VTK supports a wide variety of visualization algorithms including: scalar,  vector, tensor, texture, and volumetric methods; and advanced modeling  techniques such as: implicit modeling, polygon reduction, mesh smoothing,  cutting, contouring, and Delaunay triangulation.        VTK has an  extensive information visualization framework, has a suite of 3D interaction widgets,  supports parallel processing, and integrates with various databases on GUI  toolkits such as Qt and Tk. VTK is cross-platform and runs on Linux, Windows,  Mac and Unix platforms.ide

對VTK6.1進行編譯的步驟以下:ui

1.下載VTK源碼。編碼


2.使用CMake進行配置。scala


注意:需刪除VTK_REQUIRED_OBJCXX_FLAGS的編譯選項"-fobjc-gc",不然會出現garbage collection is no longer supporte錯誤。
orm

進行Configure和Generate。注:比當初在Windows7下要省不少時間。視頻

3.Make。ci

若是是多核處理器的話,能夠使用make -j 2,將大大地加快make的速度,花了大概不到10分鐘的時間就編譯結束了。注:需cd 到VTK_build文件夾下。開發

4.Make install。get

5.編譯Example/Tutorial/Step1項目。

在編譯此項目時,也是經過CMake進行Configure和Generate的。需設置VTK_DIR。


6.make此項目。

7.運行程序。

運行Cone.app可雙擊,或者在Termial下使用open命令進行打開,如open ./Cone.app。

8.運行結果。

9.下一步,將配置Qt+VTK+Python/CXX的開發環境。

對於剛接觸Mac系統,不少東西實在有點不習慣,如在window下qq的視頻播放器qq影音,用得很爽,但卻沒有相應的mac的版,

等有空了,並有心情的時候,將結合Qt在mac下編寫個視頻播放,它將支持經常使用的視頻編碼格式。

相關文章
相關標籤/搜索