Tools for FISH analysis
pip install -e .
fishtools compress
is a command-line interface (CLI) tool that converts TIFF, JP2, and DAX image files to JPEG XL (JXL) files.fishtools decompress
is a CLI tool that converts JXL files back to DAX files.
To use fishtools
, simply run the fishtools
command followed by the subcommand and path to the directory containing TIFF, JP2, or DAX files that you want to convert:
fishtools compress path/to/directory
By default, fishtools compress
will convert all TIFF, JP2, and DAX files in the specified directory and its subdirectories. The converted JXL files will be saved in the same directory as the original files with the same name but with a .jxl
extension.
You can also specify the quality level of the JXL files using the --quality
or -q
option. The quality level should be an integer between -inf and 100, where 100 is lossless. The default quality level is 99 (about 10x reduction in file size).
When the lossless option is selected, the output file is a .tif
file with JPEG-XR encoding so that the file can be opened in ImageJ/BioFormats.
BioFormats in ImageJ does not support JPEG-XL yet. It does support JPEG-XR which provides the same performance for lossless compression. JPEG-XR does not compress >8-channel images (compression scheme not in the specification).
If you want to delete the original files after conversion, you can use the --delete
or -d
option.
To use fishtools decompress
, simply run the fishtools decompress
command followed by the path to the JXL file or directory containing JXL files that you want to convert.
By default, fishtools decompress
will convert all JXL files in the specified directory and its subdirectories.
The converted DAX files will be saved in the same directory as the original JXL files with the same name but with a .dax
extension.
Convert all TIFF, JP2, and DAX files in a directory and its subdirectories to lossless TIFFs with JPEG-XR encoding:
fishtools compress path/to/directory
Convert all TIFF, JP2, and DAX files in a directory to JPEG-XL files and delete the original files:
fishtools compress path/to/directory --quality 99 --delete
Convert a single JXL file to DAX:
fishtools decompress path/to/file.jxl
Convert all JXL files in a directory to DAX:
fishtools decompress path/to/directory
This project is licensed under the MIT License.