A simple plugin to explore images fourier tranforms
Project description
napari-ft
A napari plugin for interactive Fourier transform filtering
This napari plugin was generated with copier using the napari-plugin-template (None).
Features
Interactive Fourier Transform Filter Widget
This widget allows you to:
- Select a 2D image from the napari viewer
- View its FFT-shifted Fourier transform (log magnitude) in the widget
- Interactively draw rectangular boxes on the Fourier transform by clicking and dragging
- Apply inverse Fourier transform with frequency masking (keeping only frequencies inside the boxes)
- See real-time updates of the filtered image as you draw new boxes
- Reset all boxes with a single button click
The filtered image automatically updates while you're drawing boxes, providing immediate visual feedback of your frequency selection.
How to Use
- Load a 2D image into napari viewer
- Open the widget:
Plugins -> napari-ft -> Fourier Transform Filter - Select your image from the dropdown menu
- The FFT-shifted Fourier transform appears in the widget
- Click and drag on the Fourier transform to draw boxes around frequencies you want to keep
- Click "Apply Filter" to create the filtered image (appears in viewer)
- Draw additional boxes - the filtered image updates automatically in real-time
- Click "Reset Boxes" to clear all boxes and start over
Installation
You can install napari-ft via pip:
pip install napari-ft
If napari is not already installed, you can install napari-ft with napari and Qt via:
pip install "napari-ft[all]"
Testing
To test the widget, run the included test script:
python test_ft_widget.py
This will open napari with a test image containing multiple frequency components.
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the BSD-3 license, "napari-ft" is free and open source software
Issues
If you encounter any problems, please [file an issue] along with a detailed description.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 napari_ft-0.0.3.tar.gz.
File metadata
- Download URL: napari_ft-0.0.3.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a23c83a00f28f1ebfbfc11fed9647db39d9cbcb5d0f9e415cde9fe6ebf24ad96
|
|
| MD5 |
4a0e937921ff23bda84054f0dded798c
|
|
| BLAKE2b-256 |
cf9b6f6c790b81a44c386cf5978e10438c8c0b64c6b50b4ac5bcca54cb6c2246
|
File details
Details for the file napari_ft-0.0.3-py3-none-any.whl.
File metadata
- Download URL: napari_ft-0.0.3-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5f6cd755c3a79d095d88d176cb7c0c795962d5c3d3b7119ecd2b0370dc015ae
|
|
| MD5 |
6853dbb0b5487536505e44760558b663
|
|
| BLAKE2b-256 |
3cadad94fe1857d1fdb9a86992e8af00ca14e938395b0c75f6024ffaa0580324
|