Skip to main content

A collection of tools and helpers to work with the JetRaw compression libraries.

Project description

🚀 JetRaw_tools

Welcome to jetraw_tools! This repository contains a collection of supplementary tools to work with the JetRaw compression tool. JetRaw is an innovative image compression format that allows a file reduction ~70-80% while keeping absolute original image resolution. The reasoning for developing these complementary tools was that our team mainly worked with nd2 images of high order (TZCXY) and we needed to preserve the metadata of the images.

🛠️ Installation

To install jetraw_tools, follow these simple steps:

  1. Make sure you have Python installed on your system (version 3.8 or higher).
  2. Install the Jetraw app and add it to the PATH environment as described in the JetRaw.
  3. Install this repository to your local machine using the following command:
pip install jetraw_tools

Or directly from the repository:

pip install git+https://github.com/phisanti/jetraw_tools.git

Dependencies

The package requires the following main dependencies:

  • nd2
  • ome-types
  • tifffile
  • numpy
  • typer

These will be automatically installed when you install the package.

📖 Usage

Once installed, you can use the jetraw-tools from the command line or from a python script.

Initial Configuration

Before using jetraw-tools for the first time, you need to configure it with your calibration file, identifiers, and license key:

jetraw-tools settings

The configuration tool will guide you through each step with interactive prompts, making setup straightforward even for first-time users. This command will:

  • Create the ~/.config/jetraw_tools folder if it doesn't exist
  • Copy a calibration .dat file to the configuration folder
  • Store a list of camera identifiers for easy reference
  • Detect and configure Jetraw and DPCore installation paths
    • Automatically finds installed binaries when possible
    • Allows manual entry of installation directories if needed
  • Add your license key for JetRaw functionality

Compression and Decompression

You can directly compress an image via:

jetraw-tools compress /path/to/image_or_folder --calibration_file "calibration_file.dat" -i "identifier" --extension ".ome.tiff"

The calibration file and identifier are required for compression. You can provide these parameters with each command or configure them once using the settings command.

By default, compressed files are saved in a new folder with your original folder's name plus the _compressed suffix. For custom output locations, use the --output parameter.

After configuration, the default calibration .dat file, identifier, and paths don't need to be specified each time you run the tool. Therefore, you can run simpler commands like:

jetraw-tools compress "sample_images/" --extension ".ome.tiff"
jetraw-tools decompress "sample_images/" --extension ".ome.p.tiff"

📋 Options

Compression/Decompression Command

jetraw-tools compress [TARGETPATH] [OPTIONS]
jetraw-tools decompress [TARGETPATH] [OPTIONS]

Available Options:

  • --calibration_file: Path to calibration .dat file (if not provided, it will use the default one from the configuration)
  • -i, --identifier: Image capture mode identifier (if not provided, it will use the first one from the configuration)
  • --extension: Input image file extension (default: .nd2 for compress, .ome.p.tiff for decompress)
  • --ncores: Number of cores to use (default: 0 for auto-detection)
  • -o, --output: Specify a custom output folder for processed images
  • --metadata/--no-metadata: Process metadata (default: True)
  • --json: Save metadata as JSON (default: False for compress)
  • --key: Pass license key to JetRaw (if not provided, it will use the stored one from the configuration)
  • --remove: Delete original images after compression (default: False)
  • --op/--no-op: Omit processed files (default: True)
  • -v, --verbose: Enable detailed logging output (default: False)
  • --version: Show version and exit

Settings Command

jetraw-tools settings

📜 Disclaimer

This library is not affiliated with Dotphoton or Jetraw in any way, but we are grateful for their support.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jetraw_tools-0.7.2.tar.gz (34.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jetraw_tools-0.7.2-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

Details for the file jetraw_tools-0.7.2.tar.gz.

File metadata

  • Download URL: jetraw_tools-0.7.2.tar.gz
  • Upload date:
  • Size: 34.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for jetraw_tools-0.7.2.tar.gz
Algorithm Hash digest
SHA256 76effb1e5ecb318be1e721ef8ca40babdafea4c4506e1ba1e5817e34fa0d4781
MD5 c3a4f8374f809a1def7f5cc64c5bb92b
BLAKE2b-256 c6815cc9f43f100d16698b1c3749db4972fffd2de5975f1f0930e260df6c5aa8

See more details on using hashes here.

Provenance

The following attestation bundles were made for jetraw_tools-0.7.2.tar.gz:

Publisher: python-publish.yml on phisanti/jetraw_tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jetraw_tools-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: jetraw_tools-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 37.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for jetraw_tools-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ef238dc0e217b14a302c536fce2a28288c8d2623a027def5b004845a5d089acd
MD5 68b26827bf87b08189e063d20ae266f8
BLAKE2b-256 668f9a3e82697087bfbc8636c428ab53264c822fd3db6cac7cad39233f5c0107

See more details on using hashes here.

Provenance

The following attestation bundles were made for jetraw_tools-0.7.2-py3-none-any.whl:

Publisher: python-publish.yml on phisanti/jetraw_tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page