Giter Site home page Giter Site logo

vtkviewer's Introduction

VTK Viewer

VTK Viewer screenshot

Written 2012-2013 Hal Canary <http://cs.unc.edu/~hal>. Copyright 2012-2013 University of North Carolina at Chapel Hill.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Supported File Formats

  • VTK — VTK Legacy File
  • VTP — VTK Polygonal Data File
  • VTU — VTK Unstructured Grid Data File
  • VTI — VTK Image Data File
  • VTS — VTK Structured Grid Data File
  • VTR — VTK Rectilinear Grid Data File
  • PLY — Stanford Polygon File
  • OBJ — Wavefront Object file
  • STL — Stereolithography File
  • PDB — Protein Data Bank File

Volumetric datasets are converted to surfaces using vtkDataSetSurfaceFilter.

If the STEREO_TYPE environment variable is set to "CRYSTAL_EYES", "RED_BLUE", "INTERLACED", "LEFT", "RIGHT", "DRESDEN", "ANAGLYPH", "CHECKERBOARD", or "SPLITVIEWPORT_HORIZONTAL", the corresponding VTK stereo type is set via vtkRenderWindow::SetStereoType().

If there is a scalar data array defined for the dataset, it is displayed on the resulting surface with a white-to-red colormap.

If the surface lacks normals, they are added with the vtkPolyDataNormals filter.

Required Packages:

  • libvtk5.8-qt4
  • libvtk5.8
  • libqtgui4
  • cmake

Example installation instructions:

Install packages:

$ sudo apt-get install -y libvtk5.8-qt4 libvtk5.8 libqtgui4 cmake git

or

$ sudo yum install -y vtk-devel vtk-qt qt-devel cmake git

Download:

$ git clone git://github.com/HalCanary/vtkviewer.git

Build:

$ vtkviewer/posix_build.sh

Get some data to view:

$ wget http://bit.ly/15vy2Rf -O bun_zipper.ply

Run program:

$ vtkviewer/build/vtkviewer bun_zipper.ply

Controls:

  • 's' — surface
  • 'w' — wireframe
  • 'r' — reset and center camera
  • 'ctrl-q' — quit
  • 'ctrl-r' — toggle rotation
  • 'ctrl-s' — toggle stereo mode
  • 'ctrl-t' — change stereo type
  • 'ctrl-p' — screenshot

vtkviewer's People

Contributors

halcanary avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.