Kitware has developed the trame [1] platform to inspire developers like you to create impactful interactive browser-based visual applications. trame, a Python package, is your gateway to building powerful applications without the need for extensive web development knowledge. Its versatility is truly remarkable – it allows for creating desktop applications, Jupyter tools, HPC applications, or client/server cloud applications used with phones, tablets, laptops, and desktops without any code changes. This adaptability makes it a powerful tool for a diverse range of tasks. trame builds on top of VTK [2] and ParaView [3], as well as a set of web utilities. It allows for the easy definition of unlimited workflows in Python for pre-processing, processing, and post-processing. It seamlessly integrates modern user interface (UI) elements with three-dimensional (3D) renderings, charts, tables, and more to create a visually appealing user experience.

Figure: (a) The trame architecture allows developers access to states, events, widgets, and user interfaces (UI) through Python, hiding the complexity of web development. (b) The result is an application that can run nearly everywhere (phones, tablets, laptops, and desktops) in various computational environments (desktop, Jupyter, HPC, and Cloud).

While trame shares some similarities with tools like Plotly Dash, Bokeh, or Streamlit, its underlying foundations are distinct. Unlike traditional web servers that rely on stateless servers, a trame application utilizes a dedicated stateful server process per client. This design offers two key advantages. Firstly, it enables faster interactions, such as remote rendering of a 3D scene with VTK, by leveraging data in memory without relying on any caching infrastructure. Secondly, it ensures the application does not share objects or memory with other end users. To serve multiple end users on shared hardware, trame provides pre-configured Docker images that manage the individual processes, facilitating basic cloud deployment.

Figure: A trame application for analysis, inspection, and reduction of multi-detector data produced by the Small-Angle Neutron Scattering (SANS) instruments. The end-user uses the same code for (a) a desktop application, (b) a Jupyter utility, and (c) a traditional client/server web application for use in high-performance computing and cloud environments.

Vuetify is a UI toolkit seamlessly integrated with trame that offers a wide range of interactive widgets, enhancing the appearance of applications. It organizes the UI using a hierarchical structure of widgets, similar to HTML, but trame expresses the UI design in plain Python code. Furthermore, trame provides various integrations with popular Python libraries for different analyses and visualizations, such as VTK, ParaView, Markdown, Matplotlib, Plotly, Altair, Vega, PyDeck, and more. Even if trame lacks a specific feature, it’s usually straightforward to integrate, particularly if the components already have web implementations.

Figure: This image depicts interactive explainable artificial intelligence (XAI) toolkit [4] visualizations in a trame-based machine learning inference application that leverages PyTorch-trained models.

trame is a platform that offers two straightforward methods to connect the back-end and front-end of an application. It provides a reactive shared state infrastructure that binds variables between processing/analyzing and UI representations/visualizations. Additionally, trame allows Python methods to directly bind to user interface elements that react to end-user events like clicks, touches, or mouse interactions. This user-friendly approach and flexibility make trame a powerful tool for developers of all levels of expertise.

Figure: (a) Vuetify UI is produced automatically using the trame-simput package. (b) Custom HTML/CSS widgets and visualizations using VTK and Plotly.

With trame’s flexibility and “write once, use everywhere” design, you are the winner when you select to build on top of the trame framework.

Support and Services

Looking to take your application to new heights? Get in touch with Kitware for expert development and support services and fast-track your success with trame.

Training

Learn how to confidently use trame from the expert developers at Kitware.

Get Started

Support

Our experts can assist your team as you build your web application and establish in-house expertise.

Get Support

Custom Development

Leverage Kitware’s 25+ years of experience to quickly build your web application.

Request a Quote

References

[1] trame, Software Package, Ver. 3.6.0, Kitware, Inc., Clifton Park, NY, 2024. https://kitware.github.io/trame/, DOI 10.5281/zenodo.10957638

[2] Schroeder, W., Martin, K., and Lorensen, B. (2006), The Visualization Toolkit (4th ed.), Kitware, ISBN 978-1-930934-19-1

[3] Ahrens, J., Geveci, B., and Law, C., ParaView: An End-User Tool for Large Data Visualization, Visualization Handbook, Elsevier, 2005, ISBN-13: 9780123875822[4] Explainable AI trame application, Software Package, Ver. 2.4.2, Kitware, Inc. Clifton Park, NY, 2024. https://github.com/XAITK/xaitk-saliency-web-demo

[4] Explainable AI trame application, Software Package, Ver. 2.4.2, Kitware, Inc. Clifton Park, NY, 2024. https://github.com/XAITK/xaitk-saliency-web-demo

Leave a Reply