[DataVisualization]Assignment 6

本文档记录了作者在Python环境下安装VTK和nibabel的过程,并详细介绍了如何利用VTK实现等值面渲染和体渲染,解决渲染过程中出现的碎片化问题。通过学习,读者可以掌握在Pycharm中配置VTK库并处理三维数据的基本步骤。
摘要由CSDN通过智能技术生成

Goal

【吐槽一下最后一次作业竟然这么硬核…
继速成pyechart后速成VTK
选了这门课之后平均一周速成一个库呢:)
光是VTK就安装了半天】

  1. 阅读了解VTK
  2. VTK实现三维体数据完整的渲染过程(如光照模型,颜色设置等)
    (1) 等值面渲染 (2) 体渲染
  3. 消除示例渲染结果中的碎片化

Preliminary

Python

VTK+nibabel安装(Pycharm)

之前踩了坑:在CSDN上搜到OS X 上VTK+Qt的配置方法…之后发现这是要装新的IDE而且是基于C++编程的环境 还以为qt只是和包 结果是Qt和PyQt不一样
还好cmake在一个文件 装错了直接扔垃圾篓里 2.9G…
(没在usr/local/里搜到任何含vtk的文件 cmake应该是没有装在这里 作为一个毫无Unix知识命令行一知半解的菜🐔真的枯了…

最后在官网上下了对应版本的python wheel
(还了解一下wheel命名格式:) python3.7就下cp37)

$me pip install /Users/..
--------------------------- Qt Data Visualization 5.7.0 --------------------------- Qt Data Visualization module provides multiple graph types to visualize data in 3D space both with C++ and Qt Quick 2. System Requirements =================== - Qt 5.2.1 or newer - OpenGL 2.1 or newer (recommended) or OpenGL ES2 (reduced feature set) - Manipulating Qt Data Visualization graphs with QML Designer requires Qt Creator 3.3 or newer Building ======== Configure the project with qmake: qmake After running qmake, build the project with make: (Linux) make (Windows with MinGw) mingw32-make (Windows with Visual Studio) nmake (OS X) make The above generates the default makefiles for your configuration, which is typically the release build if you are using precompiled binary Qt distribution. To build both debug and release, or one specifically, use one of the following qmake lines instead. For debug builds: qmake CONFIG+=debug make or qmake CONFIG+=debug_and_release make debug For release builds: qmake CONFIG+=release make or qmake CONFIG+=debug_and_release make release For both builds (Windows/OS X only): qmake CONFIG+="debug_and_release build_all" make After building, install the module to your Qt directory: make install If you want to uninstall the module: make uninstall Building as a statically linked library ======================================= The same as above applies, you will just have to add static to the CONFIG: qmake CONFIG+=static Documentation ============= The documentation can be generated with: make docs The documentation is generated into the doc folder under the build folder. Both Qt Assistant (qtdatavisualization.qch) and in HTML format (qtdatavisualization subfolder) documentation is generated. Please refer to the generated documentation for more information: doc/qtdatavisualization/qtdatavisualization-index.html Known Issues ============ - Some platforms like Android and WinRT cannot handle multiple native windows properly, so only the Qt Quick 2 versions of graphs are available in practice for those platforms. - Shadows are not supported with OpenGL ES2 (including Angle builds in Windows). - Anti-aliasing doesn't work with OpenGL ES2 (including Angle builds in Windows). - QCustom3DVolume items are not supported with OpenGL ES2 (including Angle builds in Windows). - Surfaces with non-straight rows and columns do not always render properly. - Q3DLight class (and Light3D QML item) are currently not usable for anything. - Changing most of Q3DScene properties affecting subviewports currently has no effect. - Widget based examples layout incorrectly in iOS. - Reparenting a graph to an item in another QQuickWindow is not supported. - Android builds of QML applications importing QtDataVisualization also require "QT += datavisualization" in the pro file. This is because Qt Data Visualization QML plugin has a dependency to Qt Data Visualization C++ library, which Qt Creator doesn't automatically add to the deployment package. - Only OpenGL ES2 emulation is available for software renderer (that is, when using QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL))
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值