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 or circular regions on the Fourier transform
- Left-click and drag: Create inclusion regions (frequencies to keep)
- Right-click and drag: Create exclusion regions (frequencies to remove)
- Middle-click and drag: Pan the view
- Mouse wheel: Zoom in/out
- Toggle between rectangle and circle shape modes
- Apply inverse Fourier transform with frequency masking
- See real-time updates of the filtered image as you draw new regions
- Reset boxes or view independently
The filtered image automatically updates as you draw, providing immediate visual feedback. The widget tracks changes to the source image data and scale, keeping everything synchronized.
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
- Draw regions on the Fourier transform:
- Left-click and drag to select frequencies to keep
- Right-click and drag to exclude specific frequencies
- Use "Shape" button to toggle between rectangles and circles
- The filtered image appears automatically and updates in real-time
- Use mouse wheel to zoom, middle-click to pan
- Click "Reset Boxes" to clear all regions or "Reset View" to reset zoom/pan
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.
Metadata
Release files for napari-ft 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| napari_ft-0.1.2.tar.gz | 23.3 kB | Without provenance | Details for napari_ft-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| napari_ft-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for napari_ft-0.1.2-py3-none-any.whl |
Total release size: 38.3 kB
Release files / napari_ft-0.1.2.tar.gz
| Download URL | napari_ft-0.1.2.tar.gz |
|---|---|
| Size | 23.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbed2e9542bb4dc6427155bc37e1e8d0e2ad39c52f53fa2ca4fda00bc175bfbd
|
|
BLAKE2b-256 checksum How to use checksums |
e342f5579f31e9668401a34044ca9075436c6305a5a36b3e7f9b96f651f2a307
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / napari_ft-0.1.2-py3-none-any.whl
| Download URL | napari_ft-0.1.2-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aede2cb73eaeed938d93712da3163898fec4fca27bc251fe000c1855511c5255
|
|
BLAKE2b-256 checksum How to use checksums |
b94adcffd193ba059db7acfd617b10031043f0bc6627c222c5386e71f8319ccb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for napari-ft 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.