GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • FAST | Documentation
  • Get started
  • Install FAST
  • C++ Introduction Tutorial
  • Python Introduction Tutorial
  • Text Pipelines
  • Learn FAST
  • C++ Tutorials
  • C++ Examples
  • Python Tutorials
  • Python Examples
  • API Reference
  • API Index
  • Building FAST

This view

  • Original page
  • New address

GeezerVison is showing fast-imaging.github.io — importLineMeshFromFile.cpp source | FAST | Documentation

importLineMeshFromFile.cpp source

An example of importing and visualizing a mesh containing lines from a file using the VTKMeshFileImporter

#include <FAST/Tools/CommandLineParser.hpp>
#include "FAST/Importers/VTKMeshFileImporter.hpp"
#include "FAST/Visualization/LineRenderer/LineRenderer.hpp"
#include "FAST/Visualization/SimpleWindow.hpp"

using namespace fast;

int main(int argc, char** argv) {
    CommandLineParser parser("Import line set from file");
    parser.addPositionVariable(1, "filename", Config::getTestDataPath() + "centerline.vtk");
    parser.parse(argc, argv);

    // Import line set from vtk file
    auto importer = VTKMeshFileImporter::create(parser.get("filename"));

    // Renderer
    auto renderer = LineRenderer::create()->connect(importer);

    // Setup window
    auto window = SimpleWindow3D::create()->connect(renderer);
#ifdef FAST_CONTINUOUS_INTEGRATION
    // This will automatically close the window after 5 seconds, used for CI testing
    window->setTimeout(5*1000);
#endif
    // Run entire pipeline and display window
    window->run();
}
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.