Skip to content

A simple python GUI demo to convert between XML and a table for CompCell3D parameter settings

License

Notifications You must be signed in to change notification settings

Xemin0/XML2Table

Repository files navigation

XML2Table (TkInter Version)

A demo python GUI widget meant to facilate the parameter-settings (Contact Energies) in CompCell3D Git Page using TkInter

For PyQt version Checkout the PyQt branch

It simply converts between the copy-pasted XML contents and a visual table. XML parsing is done using regular expressions.

Could be adapted for other parameter-settings in XML.

Required Python Packages

  • Python 3.10.12 (Other python should also work; and TkInter used is already an integral part of Python)
  • Numpy

Install

  • conda (currently only support python>=3.8)
conda install -c xemin0 xml2table
  • Directly clone the repo
git clone https://github.com/Xemin0/XML2Table

How to Use it

Installed from conda

simply run xml2table from command line

Cloned from Github

Navigate to xml2table/ folder then start the program by running

python xml2table.py

Either:

  • Copy-paste the contact energy section/plugin from the CC3D generated XML file into the text field on the left
  • Start from scratch by adding new cells

Then each button literally does what it says.

Major Features

  • The values and the background colors of symmetric entry pairs are dynamically synchronized.
  • The whole table's colors are updated for each change in any entry value
  • The color dynamically assigned to each entry is determined based on its relative position with respect to the min_max values of the current table

Example Image of the Widget

Major Issues:

  • The colors are not equally spaced (as in the color bar)

License

BSD-3-Clause License