Skip to main content

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

  1. Start MedICS.
  2. Open GraphicPy from the extensions / toolboxes list (category Visual Programming).
  3. 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.

  1. Wire inputs (or type values in the node’s fields).
  2. Click Run on that node.
  3. 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

  1. Add a VAR node and set a value (number, string, or expression).
  2. Add a Print node and connect VAR’s output to Print’s input.
  3. 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 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:

  1. In Nodes Explorer, click Create Node.
  2. Write one or more top-level functions (parameters become inputs, the return value becomes the output).
  3. Click Test to check syntax.
  4. 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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

medics_ext_graphicpy-202609020339-cp311-cp311-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.11Windows x86-64

File details

Details for the file medics_ext_graphicpy-202609020339-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for medics_ext_graphicpy-202609020339-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3531a0abe3c3c5ceef475f1da56755e6e7c7907a5f951b02e1ee090c0040ebe1
MD5 40ec051f63fff17a154cbf9ee1b98bbc
BLAKE2b-256 2038433be964de5145c4f2d6f019f2ce040c8a88298a281e18ebf0a0a0676d9e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

202609020339 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page