Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build VTK for iPhone?

I'm trying to make an iPhone/iPad application that uses VTK to visualize DICOM images and present them on the screen. The problem is no matter what I do, I am not able to build VTK to work on the device (it works correctly on the simulator).

Is there any way to build VTK for the iPhone/iPad?

Thank you very much for your help! :)

like image 410
Karasutengu Avatar asked Dec 31 '25 22:12

Karasutengu


2 Answers

VTK can render using the Open GL API, or more recently Manta. The iPhone (and other devices such as Android) use OpenGL ES, which is essentially a subset of OpenGL targeted at embedded systems. Until VTK is ported to use OpenGL ES as an alternative backend it will not be possible to use VTK on mobile devices. I am not familiar with the iPhone simulator, but I imagine that VTK is still able to use OpenGL in the simulator. Porting is possible, but it would not be a trivial thing to do.

like image 110
Marcus D. Hanwell Avatar answered Jan 03 '26 13:01

Marcus D. Hanwell


Remove the tag -DIOS_SIMULATOR_ARCHITECTURES=''

Just use below:

cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_FRAMEWORK_INSTALL_PREFIX=$prefix/lib -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DVTK_IOS_BUILD=ON -DModule_vtkFiltersModeling=ON ..
like image 39
Karanbir Singh Avatar answered Jan 03 '26 12:01

Karanbir Singh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!