GraphicPy
GraphicPy is a MedICS extension for visual, node-based Python programming. You assemble a graph of nodes on a canvas, connect outputs to inputs, run the graph, and optionally export it as Python code.
Use it to prototype image-processing and data pipelines without writing boilerplate wiring by hand.
Open GraphicPy
- Start MedICS.
- Open GraphicPy from the extensions / toolboxes list (category Visual Programming).
- GraphicPy opens as a tab with three main areas:
- Nodes Explorer (left) — available node types
- Canvas (center) — the graph you build
- Properties (right, hidden until you double-click a node)
The top toolbar has Graph, Edit, and code actions (Show Code, Refresh Code, Run Code, Open in PyEditor). GraphicPy follows the MedICS light and dark themes.
Build a graph
Add nodes
Use any of these:
| Action | How |
|---|---|
| Drag from the explorer | Drag a node name from Nodes Explorer onto the canvas |
| Double-click in the explorer | Drops the node at the center of the view |
| Search | Press Shift+A, type a name, press Enter |
The explorer is grouped by category (Basic Nodes, Custom Nodes, Math & Arrays, Image Processing, and so on). Use the filter box to search. Hover a node name to see its signature and docstring.
Connect nodes
- Drag from an output port (right side of a node) to an input port (left side).
- Disconnect by dragging the pipe away, or use Edit → Clear Connections.
- Pipe style: right-click the canvas → Pipes → Curved / Straight / Angle.
Select, move, and pan
| Gesture | Result |
|---|---|
| Left-click a node | Select |
| Left-drag a node | Move |
| Left-drag on empty canvas | Pan |
| Left-click empty canvas | Clear selection |
| Middle-drag, or Alt+left-drag | Marquee-select / move |
| Alt+middle-drag | Zoom |
| Alt+Shift+left-drag | Cut pipes (slicer) |
| Mouse wheel | Zoom |
Layout and view
- Ctrl+L — auto-layout (top to bottom)
- L — auto-layout (bottom to top)
- F — fit selection in view
- = / - — zoom in / out
- H — reset zoom
Run a graph
Most function nodes have Run and AutoRun on the node itself.
- Wire inputs (or type values in the node’s fields).
- Click Run on that node.
- Downstream nodes that need the result stay stale until you run them (or turn AutoRun on).
AutoRun (on) re-runs the node when its inputs change. Use it for small, fast nodes; leave it off for slow image or ML calls.
Status icons on a node show success, error, or stale output. Hover the info icon on a canvas node (or an explorer item) for documentation. Double-click a node to open Properties (values, ports, and Info).
Typical first graph
- Add a VAR node and set a value (number, string, or expression).
- Add a Print node and connect VAR’s output to Print’s input.
- Click Run on Print — the value appears in the MedICS console / status.
For images, try Open File Dialog → an image-processing node (for example from cv2 or skimage) → ImageDisplay.
Built-in nodes
These always appear under Basic Nodes:
| Node | Role |
|---|---|
| VAR | Constant or typed value |
| Print a value | |
| If-Else / If-Else-End | Branching |
| For Loop / For Loop Collector | Iteration |
| Unpack | Split a sequence into ports |
| Kwargs | Build a key = value dict for **kwargs ports |
| IntSlider / FloatSlider | Interactive numeric input |
| Open / Save File or Folder Dialog | Paths from the OS file dialog |
| ImageDisplay | Preview an image |
| Save to ws | Write a value into the MedICS workspace |
| BackDrop | Visual grouping on the canvas |
Custom nodes
Turn a Python function into a node:
- In Nodes Explorer, click Create Node.
- Write one or more top-level functions (parameters become inputs, the return value becomes the output).
- Click Test to check syntax.
- Create saves the file under
customNodes/and refreshes the Custom Nodes list. Create && Add also drops the first new node on the canvas.
To change an existing custom node, right-click it in the Nodes Explorer and choose Edit.
Example:
def scale_image(image, gain=1.0):
"""Multiply image intensity by gain."""
return image * gain
That becomes a node with ports image and gain, and one output.
Package nodes (auto-wrapper)
GraphicPy can wrap functions from installed Python packages (NumPy, OpenCV, scikit-image, SciPy, pandas, and others) so they appear as nodes.
- Manage Packages in the explorer opens the package list.
- Enable only the packages you need, then Reload.
- Add Package installs a pip package and adds it to the wrapper config.
- Disabled packages are not registered, which keeps startup faster.
If a package is not installed in the MedICS environment, its nodes will not load. Install the library first, then reload nodes.
Generated Python code
The graph can be turned into a Python script.
| Toolbar | What it does |
|---|---|
| Show Code | Opens a code panel under the canvas (with line numbers) |
| Refresh Code | Regenerates the script from the current graph |
| Run Code | Sends the script to the MedICS Jupyter console |
| Open in PyEditor | Opens the script in the PyEditor toolbox |
From the Graph menu you can also Preview, Export to Python Code, or Import from Python Code.
Shortcuts: Ctrl+Shift+P preview, Ctrl+Shift+E export, Ctrl+Shift+I import.
Save and load sessions
Use the Graph menu (or shortcuts):
| Action | Shortcut |
|---|---|
| Open session | Ctrl+O |
| Save | Ctrl+S |
| Save As | Ctrl+Shift+S |
| Import session | Graph → Import… |
| Clear session | Graph → Clear Session… |
Session files store node positions, connections, and property values so you can continue later.
Keyboard shortcuts
Canvas
| Shortcut | Action |
|---|---|
| Shift+A | Search and add a node |
| Del | Delete selected nodes / pipes |
| Ctrl+C / X / V | Copy / cut / paste |
| Alt+C | Duplicate |
| Ctrl+A | Select all |
| Ctrl+Shift+A | Unselect all |
| D | Enable / disable selected nodes |
| Ctrl+D | Clear connections on selection |
| Ctrl+Shift+X | Extract selected nodes |
| Ctrl+L | Auto-layout (down) |
| F | Fit to selection |
| Ctrl+1 / 2 / 3 | Curved / straight / angled pipes |
Graph and view
| Shortcut | Action |
|---|---|
| Ctrl+S / Ctrl+Shift+S / Ctrl+O | Save / Save As / Open |
| = / - / H | Zoom in / out / reset |
| Alt+1 / 2 / 3 | Grid: none / lines / dots |
| Shift+1 / 2 | Horizontal / vertical layout mode |
Tips
- Filter the explorer instead of scrolling long package lists.
- Keep AutoRun off on expensive nodes; run them explicitly.
- Hover explorer items or the canvas info icon for docs without opening Properties.
- After changing custom node files or package settings, click Reload.
- Light and dark appearance follow MedICS Settings → Theme.
Requirements
GraphicPy runs inside MedICS as an extension (Python 3.11+). It uses NodeGraphQt for the canvas. Package nodes need the corresponding libraries installed in the same environment as MedICS (for example numpy, opencv-python, scikit-image).
Install or update the extension with your usual MedICS extension workflow (or uv pip install / pip install from this repository when developing).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file medics_ext_graphicpy-202609020339-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: medics_ext_graphicpy-202609020339-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3531a0abe3c3c5ceef475f1da56755e6e7c7907a5f951b02e1ee090c0040ebe1
|
|
| MD5 |
40ec051f63fff17a154cbf9ee1b98bbc
|
|
| BLAKE2b-256 |
2038433be964de5145c4f2d6f019f2ce040c8a88298a281e18ebf0a0a0676d9e
|