trame

repository·master·Indexed 20 days ago

https://github.com/kitware/trame

A Python-based framework for building desktop-like web applications, interactive dashboards, and 3D visualizations using VTK and ParaView. It supports local, remote, and cloud deployment, offering three 3D rendering approaches: Client View, Remote View (VtkRemoteView), and Local View (VtkLocalView). The framework integrates with Vuetify, Altair, Matplotlib, and Plotly, and provides tools for Docker deployment and static asset extraction.

Tokens
76.6K
Snippets
267
Records
382
Agent score
71%

What's inside trame

  1. Overview of the ParFlow Conceptual Modeler example

    master

    The ParFlow Conceptual Modeler is a specialized Python/trame application designed for 3D geological modeling. It allows users to build complex subsurface models from interface and orientation data.

    Key features include:

    • Implicit Geology Generation: Uses GemPy to generate subsurface geology automatically.
    • Interactive Exploration: Enables geoscientists to explore layered earth structures interactively within a web browser.
    • Workflow: Moves away from hand-building every surface by leveraging implicit modeling techniques.
  2. Overview of trame Slicer

    master

    trame Slicer is a Python library designed to bridge the 3D Slicer core components with the trame web framework. It enables developers to build modern, Vue-based web applications that leverage powerful medical imaging functionalities such as:

    • Segmentation
    • Registration
    • Volume Rendering
    • Markups interactions

    Key Benefits:

    • Web-Native Access: Deploy Slicer's capabilities directly through Python without requiring local installations on the client side.
    • Reduced Client Hardware Demands: Workloads are offloaded to the server, making advanced features like AI segmentation accessible on low-power devices.
    • Data Security: DICOM files and large datasets remain securely on the server, supporting performance and compliance by ensuring patient data does not leave the secure environment.
  3. Overview of VERA Core

    master

    VERA Core is a visualization application built using VTK and trame. It is designed for exploring output from VERA (Virtual Environment for Reactor Applications), a multi-physics nuclear reactor simulation framework.

    Key capabilities include:

    • Instantaneous 2D and 3D views.
    • 1D plots.
    • Alphanumeric data exploration.
    • Web-based interface for large-scale reactor analysis results.
  4. Overview of trame for interactive web-based visualization

    master

    trame is a Python package designed to bridge the gap between complex data visualization and intuitive web development. It allows developers to create sophisticated web interfaces for 3D rendering and visualization by leveraging open-source frameworks like VTK and ParaView.

    Key capabilities include:

    • Seamless Integration: Easily incorporate advanced 3D rendering into web projects.
    • Micro-workflows: Streamline user interactions through specialized micro-workflow features.
    • Customizable Templates: Use templates for effortless configuration and enhanced usability.
    • Scalability: Provides a flexible platform for sharing complex simulations and insights online.
  5. Customize 3D Slicer rendering with LayerDisplayableManager

    master

    The SlicerLayerDisplayableManager module allows developers to extend the 3D Slicer rendering pipeline more easily. It is useful for implementing custom interaction logic, such as hover-based highlighting for models in a scene, with minimal code.

    For detailed API references and implementation examples, refer to the official Layer Displayable Manager documentation.

  6. Explore trame getting started examples

    master

    The examples/00_howdoi/ directory contains several patterns for building trame applications:

    • CLI: Using Command Line Arguments to provide configuration or files to load.
    • Download: Triggering client-side file downloads via button clicks.
    • Dynamic: Using asyncio to dynamically update state on the server, which is then reflected on the client.
    • Interactive: Linking method calls to button clicks and modifying state directly from widgets.
    • Static: Injecting raw HTML content as strings into the UI.
    • Table: Displaying Pandas DataFrames in a table with dynamic content filtering.
    • Upload: Allowing users to select local files via the UI to make them available on the server for processing.
  7. Monitor simulations live with Trame + Catalyst

    master

    trame-catalyst is a specialized trame application designed for live-monitoring running simulations that are connected via ParaView Catalyst.

    By using ParaView Catalyst, the application performs in-situ analysis, which avoids the I/O bottleneck associated with writing every simulation time step to disk. Because trame uses remote rendering, the simulation can be viewed from any device via a web browser without requiring client-side installations or powerful local GPUs.

  8. Use trame to build cross-platform simulation GUIs

    master

    trame is a Python package designed to build interactive visual applications accessible via web browsers. It allows developers to create robust applications that can be deployed across various environments without changing the code.

    Deployment targets include:

    • Desktop applications
    • Jupyter tools
    • HPC (High-Performance Computing) applications
    • Client/server cloud applications (accessible via phones, tablets, laptops, and desktops)
  9. Evolution of trame versions

    master

    trame has evolved through major versions to improve developer experience and architecture:

    • v1: Focused on providing 'magic' functionality for rapid development.
    • v2: Focused on best practices, streamlining APIs, and enabling composition. It introduced the trame suite (comprising trame and various trame-* modules) to replace the deprecated PyWebVue. In the current suite, each Python module contains both its client and server-side components to ensure they remain in sync.
    • v3: Focuses on enabling the Vue 3 client while minimizing the default bundle size.
  10. trame deployment environments and capabilities

    master

    trame follows a "write once, use everywhere" design pattern. The same Python code can be used to deploy applications across various environments without modification:

    • Desktop Applications: Running locally as a standalone tool.
    • Jupyter Utilities: Integrated directly into Jupyter notebooks.
    • HPC & Cloud Applications: Traditional client/server web applications used in high-performance computing or cloud environments.

    Supported client devices include phones, tablets, laptops, and desktops.

  11. What is trame and how is it used?

    master

    trame is a Python-based integration framework designed to help non-web-developers create powerful, complex client-server web applications. It is specifically tailored for large-scale data processing and visualization.

    Key characteristics:

    • Web Integration: It weaves together visual analytics tools, web technologies (including GUI tools), and the Python ecosystem.
    • Leveraged Technologies: It transparently uses VTK, ParaView, ParaViewWeb, and VTK.js.
    • Target Audience: Developers who want to build web-based scientific visualization applications without needing deep expertise in web technologies or frameworks.

    For getting started, refer to the trame tutorial.

  12. What is trame and how does it fit into scientific workflows?

    master

    trame is a visual workflow integration framework designed to bridge the gap between complex computational processes (like AI, simulations, and experiments) and interactive visual analysis.

    It acts as a modular platform that allows developers to:

    1. Build components: Create individual tools for data manipulation or visualization.
    2. Combine components: Assemble these tools into complex, interactive workflows.
    3. Deliver seamlessly: Deploy these workflows across multiple environments, including:
      • Desktop applications
      • Jupyter notebooks
      • Web browsers

    By using trame, developers can transform long post-processing cycles (which can take months) into immediate, adaptive visual exploration, significantly shortening the time-to-discovery.