Skip to content

Tutorial B visualization

Thierry Fredrich edited this page Oct 3, 2017 · 7 revisions

Introduction

In order to visualize the simulation results we followed two separate approaches: on the one hand we support wrapping the simulation results to povray and on the other hand export it in a paraview compatible format. In the Tutorial A simulation section we created the following files which will be used here:

  • vessels-default-typeI-7x9L130-sample00.h5
  • fakeTum-default-typeI-sample00-default.h5
  • tumBulk-default-typeI-sample00-bulktissue_tutorial.h5
  • o2_vessels-default-typeI-7x9L130-sample00_default.h5

povray

How to get it?

Usage

  • help: submitPovrayRender -h

Our povray wrapper automatically recognizes the kind of simulation you provide an runs the renderer accordingly.

Examples

Vessels

submitPovrayRender vessels-default-typeI-7x9L130-sample00.h5 vessels

creates the outputfile vessels-default-typeI-7x9L130-sample00vessels_pressure.png

Faketumor

submitPovrayRender -f fakeTum-default-typeI-sample00-default.h5 out0001

creates the outputfile fakeTum-default-typeI-sample00-default-out0001.png_slice.png. Note: the -f flag tells the program to ignore uncirculated vessels in the representation.

Bulk Tumors

submitPovrayRender tumBulk-default-typeI-sample00-bulktissue_tutorial.h5 out0002

creates the outputfile tumBulk-default-typeI-sample00-bulktissue_tutorial-out0002.png_slice.png

All images should look similar to what we published.

Detailed O2

submitPovrayRender o2_vessels-default-typeI-7x9L130-sample00_default.h5 po2/vessels

creates the outputfiles o2_vessels-default-typeI-7x9L130-sample00_default-po2_vessels_hboconc.png,o2_vessels-default-typeI-7x9L130-sample00_default-po2_vessels_po2vessels.png,o2_vessels-default-typeI-7x9L130-sample00_default-po2_vessels_saturation.png

ParaView

How to get it?

Get data in ParaView compatible format?

In the Tutorial - Simulation section we showed how to create a .h5 file which contains vessel information. Assume it is named "vessels-q2d_mini_test_Pdefault-typeI-13x5L130-sample00.h5".

python2 /path/to/tumorcode_install/tc_install/py/krebs/hdfvessels2vtk.py vessels-q2d_mini_test_Pdefault-typeI-13x5L130-sample00.h5 vessels

after successful execution you should get file named: "vessels-q2d_mini_test_Pdefault-typeI-13x5L130-sample00-vessels-vessels.vtk".

Open paraview, right click into the Pipeline Browser and open the just created file. Click Apply.

To render the data as tubes click:

  • Filters-->Alphabetical-->Tubes
  • Apply
  • in the Properties register chose: Vary Radius: "By Absolute Scalar
  • Apply
  • in the Coloring register chose: "pressure at node"

To get so some quantitative information e.g. about the pressure distribution within the network click:

  • Filters-->Data analysis-->Histogram
  • Apply
  • in the Properties register chose: Select Input Array: "pressure_at_node"
  • Apply

Clone this wiki locally