Welcome to the UPPMAX Visualization Workshop 21,22/ Day one UPPMAX Introduction to Visualization and Python Read your own data using Python Visualize the data using VTK Day two Advanced visualizations 3D Stereoscopic renderings (3DIS4U)
Uppsala Multidisciplinary Center for Advanced Computational Science (UPPMAX) Is Uppsala University's resource of high- performance computers and know-how of high- performance computing (HPC). The center was founded in 2003.
System Experts System administration Hardware software
Application Experts The role of the application experts is to transfer HPC competence and computational know-how within the respective fields to the users. Computational Quantum Mechanics Algorithm and Code Development Scientific Visualization Molecular Dynamics Bioinformatics Theoretical Material Physics
HPC Resources ISIS ( ) Technical Summary 200 Compute Nodes with 800 CPU cores 1600 Gigabyte total RAM 32 Terabyte total disk 4 Tflops peak performance switched Gigabit Ethernet for all nodes 400 CPU's in 200 dual CPU, dual core, nodes IBM x3455 server 2 AMD Opteron 2220 Processors 140 nodes with 8 GB Memory 40 nodes with 4 GB memory 20 nodes with 16 GB memory 160 GB Hard disk 22.4 Gflops peak performance per node
HPC Resources Grad ( ) Technical Summary 64 Compute Nodes with 512 CPU cores 3 access Nodes with 8 CPU cores 16 Gigabyte RAM per node 18 Terabyte disk in 2 NFS servers for home directories and grid sessions 140 Terabyte disk in 8 nodes of dCache pools switched Gigabit Ethernet for all nodes
HPC Resources Set ( )Os (2007) Technical Summary 10 Compute Nodes with 10 CPUs, 20 CPU cores, and 40 threads (Power5 supports SMT) 88 Gigabyte total RAM switched Gigabit Ethernet for all nodes 10 dualcore CPU's in 10 nodes IBM p520 server IBM Power5 Processors 8 GB Memory 150 GB Hard disk XX Gflops/s peak performance per node Hardware: IBM X3455 dual Opteron 2220SE, 2.8GHz nodes. 4*10=40 cores 8GB RAM, Gigabit interconnect
HPC Resources OctoPS (2009)PowerCell (2009) IBM PowerXCell 8i cluster containing of two blades with each having two PowerXCell 8i processor on them. Each Blade is equipped with 8GB of RAM, Gigabit Ethernet interconnect and runs Linux The OctoPS cluster ("Eight Playstations") consists of eight Playstations connected with the built in Gigabit Ethernet card with a x86-based workstation as head node. The Playstation3 gaming console is equipped with the powerfull Cell/B.E. processor that can be used for High Performace Computing. Each node have access to 6 of 8 existing SPUs which gives in total 48 SPUs for the whole cluster. This generation of the Cell/B.E. processor is best suited for single precision floating point numbers and each node have around 200MB of free RAM when booted.
3DIS4U The acronym 3DIS4U stands for "Three-dimensional image studio for Uppsala" It is the Visualization Lab located at the Centre for Image Analysis 3D Stereoschopic display
Visualization 'The process of converting data in to a format that is visible, in order to understand the data better' X Y Z E_x-magn -phase E_y-magn -phase E_z-magn -phase H_x-magn -phase H_y-magn -phase H_z-magn -phase
Making the invisible visible One of the goals of visualization is to make it easier to explore data and information The viewer will gain new insights, sometimes profound and sometimes quite unexpected. OBS! The same data as in the previous slide!
Visualization techniques Still the same data...
Visualization An exploration tool for data visualization has been developed in cooperation with UPPMAX and the Institute for Space Physics The following 2 slides will show some visualizations from the program The previous one was also produced by this program
Scientific Visualization Scientific visualization is the process of exploring, transforming, and viewing data as images The dimensionality of the data is generally larger than or equal to 3 Visualization is often interactive We are not trying to create realistic images, but to visualize the data in an informative way Dependent on the task given
VTK – The Visualization ToolKit Open source, freely available software for 3D computer graphics image processing visualization Managed by Kitware, Inc. Object-oriented design (C++) High-level of abstraction Use C++, Tcl/Tk, Python, Java
True visualization system Visualization techniques for visualizing scalar fields vector fields tensor fields Polygon reduction Mesh smoothing Image processing Your own algorithms
Additional features Parallel support message passing multi-threading Stereo support Integrates with Motif, Qt, Tcl/Tk, Python/Tk, X11, Windows,... Event handling 3D widgets
3D graphics Surface rendering Volume rendering Ray casting Texture mapping (2D) Volume pro support Lights and cameras Textures Save render window to.png,.jpg,... (useful for movie creation)
VTK Dataset Types vtkStructuredPoints, vtkImageData vtkRectilinearGrid vtkStructuredGrid vtkPolyData vtkUnstructuredGrid Methods for reading and writing
Organizing structure plus attributes –Structured Points –Rectilinear Grid –Structured Grid Datasets
Unstructured Grid A collection of vertices, edges, faces, and cells whose connectivity information must be explicitly stored
Basic VTK objects to render a scene: 1.vtkRenderWindow 2.vtkRenderer 3.vtkLight 4.vtkCamera 5.vtkActor 6.vtkProperty 7.vtkMapper
Source Sources Mappers Actors Renderers Filters Window First the sources must be defined. Use data from files or predefined objects. Interactor Filter the data if necessary. Add a mapper so that the data is converted to an object. The object is converted to an actor so that the visual properties can be adjusted Add the actors to a renderer Connect the renderer to a window where the objects shall be rendered Connect the window to an interactor so we can interact with it. import vtk object = vtk.vtkOBJReader() object.SetFileName('teapot.obj') outlineFilter = vtk.vtkOutlineFilter() outlineFilter.SetInputConnection(object.GetOutputPort()) outlineMapper = vtk.vtkPolyDataMapper() outlineMapper.SetInputConnection(outlineFilter.GetOutputPort()) objectMapper = vtk.vtkPolyDataMapper() objectMapper.SetInputConnection(object.GetOutputPort()) outlineActor = vtk.vtkActor() outlineActor.SetMapper(outlineMapper) outlineActor.GetProperty().SetColor(0.5, 0.5, 0.5) objectActor=vtk.vtkActor() objectActor.SetMapper(objectMapper) objectActor.GetProperty().SetColor(0.2,0.6,0.6) ren = vtk.vtkRenderer() ren.AddActor(objectActor) ren.AddActor(outlineActor) ren.SetBackground(0.6, 0.6, 0.7) renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) renWin.SetWindowName("Teapot") renWin.SetSize(500,500) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) iren.Initialize() iren.Start()
Result
Summary + Free and open source Create graphics/visualization applications fairly fast Object oriented - easy to derive new classes Build applications using "interpretive" languages Tcl, Python, and Java Many (state-of-the-art) algorithms Heavily tested in real-world applications Large user base provides decent support Commercial support and consulting available
Software Python Read your own data files Simple to learn An interpreted language VTK (The Visualization Toolkit) Create customary visualizations Powerful Takes some time to learn...
What is your research problem? What kind of data do you produce? What do you want to see in this data? Will VTK be useful for you?
Visualization Techniques Volume rendering Data Capture, often Medical data: MRI, PET, CAT etc Methods Marching cubes Contouring Isosurfaces
Volume Rendering Ray casting is commonly used A ray is cast through every pixel in the view plane. The pixel is given a colour according to the interaction of the ray with the voxels in the volume. This is combined with the light from light sources
Multi-modal Rendering Register two volumes to each other Rays are cast into the first volume For points on cut planes, values from both volumes are blended to produce a colour that enhances both modalities MRI + PET
Surface Reconstruction from Contours
Fluids Can be rendered as particle systems But how can we better see the speed and direction of the fluid? And other parameters as temperature and pressure?
Isosurfaces Wikipedia: An isosurface is a three- dimensional analog of an isocontour. It is a surface that represents points of a constant value (e.g. pressure, temperature, velocity, density) within a volume of space; in other words, it is a level set of a continuous function whose domain is 3D-space.three- dimensionalisocontour volume level set
Examples porousmedia.shtml
Visualization of attributes Vector Oriented Line Oriented Glyph Streamline
Streamlines
Glyphs What properties can you “read” from the glyphs?
Glyphs We can add other properties… Can you imagine more ways to show properties?
Glyphs Are useful to express multidimensional data Can have different Shapes Sizes Colors Directions Positions
And many more… Your data might be visualized in a standard way (already in VTK) Fast implementation! Or you might need some application specific method But probably you can use VTK anyway!
Where can you get help with your problem? From me and my contacts!
VTK resources –Download (source and binaries) –Documentation –Mailing lists –Links –FAQ, Search –VTK Textbook –VTK User’s guide –Mastering CMake