Skip to content
This repository was archived by the owner on Jun 23, 2026. It is now read-only.

NVDLI/jupyter_clickable_image_widget

 
 

Repository files navigation

Important

This repository was archived by NVIDIA Deep Learning Institute on 2026-06-23. It is no longer maintained, and issues or pull requests are not being reviewed. For current NVIDIA DLI open-source training materials, visit https://github.com/NVDLI. This repository is a historical fork. For ongoing development, refer to the upstream project.

Jupyter Clickable Image Widget

This repository contains an image widget (much like the ipywidgets.Image), but will send messages when the image is clicked.

Setup

To install the widget type the following in a terminal

sudo npm install -g typescript
git clone https://github.com/jaybdub/jupyter_clickable_image_widget
cd jupyter_clickable_image_widget
sudo python3 setup.py build
sudo npm run build
sudo pip3 install .
sudo jupyter labextension install .
sudo jupyter labextension install @jupyter-widgets/jupyterlab-manager

Usage

from jupyter_clickable_image_widget import ClickableImageWidget


image_widget = ClickableImageWidget()

def on_message(_, content, _):
    if content['event'] == 'click':
        data = content['eventData']
        alt_key = data['altKey']
        ctrl_key = data['ctrlKey']
        shift_key = data['shiftKey']
        x = data['offsetX']
        y = data['offsetY']
        
        # do something...
        
image_widget.on_msg(on_message)

About

Archived: historical NVDLI fork, no longer maintained.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 67.6%
  • TypeScript 24.3%
  • JavaScript 8.1%