
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
image-slide
Advanced tools
A comprehensive Python image viewer for multidimensional numpy arrays with interactive controls for navigation, contrast adjustment, and complex data visualization.
←/→: Previous/next imagePage Up/Down: Jump by 10 imagesHome/End: Go to first/last imagepip install image-slide
git clone https://github.com/GyroTools/image-slide.git
cd image-slide
pip install -e .
import numpy as np
from image_slide import ImageSlideViewer
# Create or load your numpy array of arbitrary shape
image_stack = np.random.random((10, 100, 100))
# Create and run viewer
viewer = ImageSlideViewer(image_stack, "My Images")
viewer.run()
from image_slide import image_slide
# Even simpler - direct function call
image_slide(image_stack, "My Images")
# Complex array example
n_images, height, width = 5, 100, 100
complex_stack = np.random.random((n_images, height, width)) + 1j * np.random.random((n_images, height, width))
viewer = ImageSlideViewer(complex_stack, "Complex Data")
viewer.run()
# Load from numpy file
data = np.load('your_data.npy')
image_slide(data, "Loaded Data")
# Load multiple images into stack
import glob
from PIL import Image
files = glob.glob("*.png")
images = [np.array(Image.open(f)) for f in files]
image_stack = np.array(images)
image_slide(image_stack, "Image Stack")
complex64, complex128 with magnitude/phase/real/imaginary display optionsWhen working with complex arrays, you can choose what to display:
|z| - Shows the amplitudearg(z) - Shows the phase angleRe(z) - Shows the real partIm(z) - Shows the imaginary part# Create viewer but don't show immediately
viewer = ImageSlideViewer(image_stack, "My Images")
# Set initial display parameters
viewer.contrast = 1.5
viewer.brightness = 0.2
viewer.current_complex_display = "phase" # for complex arrays
# Update display and show
viewer.update_display()
viewer.run()
| Key | Action |
|---|---|
← | Previous image |
→ | Next image |
Page Up | Jump back 10 images |
Page Down | Jump forward 10 images |
Home | Go to first image |
End | Go to last image |
import numpy as np
from image_slide import image_slide
# Simulate time series data
t = np.linspace(0, 4*np.pi, 50)
x, y = np.meshgrid(np.linspace(0, 2*np.pi, 100), np.linspace(0, 2*np.pi, 100))
time_series = np.array([np.sin(x + t[i]) * np.cos(y + t[i]) for i in range(len(t))])
image_slide(time_series, "Time Series Visualization")
# Simulate medical image stack (e.g., CT slices)
slices = np.random.random((30, 256, 256))
# Add some structure
for i, slice_img in enumerate(slices):
slices[i] = gaussian_filter(slice_img, sigma=2)
image_slide(slices, "Medical Image Stack")
# Create test pattern and its FFT
pattern = np.sin(2*np.pi*x*3) * np.cos(2*np.pi*y*2)
fft_data = np.fft.fftshift(np.fft.fft2(pattern))
# Stack original and FFT for comparison
combined = np.array([pattern, np.abs(fft_data), np.angle(fft_data)])
image_slide(combined, "FFT Analysis")
The package is designed to be used as a Python library. Import and use the viewer in your Python scripts as shown in the examples above.
git clone https://github.com/GyroTools/image-slide.git
cd image-slide
pip install -e ".[dev]"
pytest
black image_slide/
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
An interactive image viewer for multidimensional numpy arrays
We found that image-slide demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.