mergechannels 0.5.3__cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ # Import Rust functions
2
+ from typing import Literal # noqa: F401
3
+
4
+ from ._internal import apply_color_map, merge
5
+ from ._luts import COLORMAPS as _COLORMAPS
6
+ from .mergechannels import ( # type: ignore
7
+ dispatch_multi_channel,
8
+ dispatch_single_channel,
9
+ )
10
+
11
+ COLORMAPS = _COLORMAPS
12
+
13
+
14
+ __all__ = [
15
+ 'dispatch_single_channel',
16
+ 'dispatch_multi_channel',
17
+ 'merge',
18
+ 'apply_color_map',
19
+ 'COLORMAPS',
20
+ ]
@@ -0,0 +1,63 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import TYPE_CHECKING, Literal, Sequence, Union
4
+
5
+ import numpy as np
6
+
7
+ from mergechannels._blending import BLENDING_OPTIONS
8
+ from mergechannels._luts import COLORMAPS
9
+
10
+ if TYPE_CHECKING:
11
+ from cmap import Colormap as CmapColormap
12
+ from matplotlib.colors import Colormap as MatplotlibColormap
13
+ from nptyping import (
14
+ NDArray,
15
+ Shape,
16
+ UInt8,
17
+ )
18
+
19
+ Number = Union[int, float]
20
+
21
+ def apply_color_map(
22
+ arr: np.ndarray,
23
+ color: Union[
24
+ COLORMAPS,
25
+ NDArray[Shape['3, 255'], UInt8],
26
+ MatplotlibColormap,
27
+ CmapColormap,
28
+ ],
29
+ percentiles: tuple[Number, Number] | None = None,
30
+ saturation_limits: tuple[Number, Number] | None = None,
31
+ ) -> np.ndarray: ...
32
+ def merge(
33
+ arrs: Sequence[np.ndarray],
34
+ colors: Sequence[COLORMAPS],
35
+ blending: BLENDING_OPTIONS = 'max',
36
+ percentiles: Sequence[tuple[float, float]] | None = None,
37
+ saturation_limits: Sequence[tuple[float, float]] | None = None,
38
+ ) -> np.ndarray: ...
39
+ def dispatch_single_channel(
40
+ array_reference: np.ndarray,
41
+ cmap_name: Union[COLORMAPS, None],
42
+ cmap_values: Union[
43
+ NDArray[Shape['3, 255'], UInt8],
44
+ MatplotlibColormap,
45
+ CmapColormap,
46
+ None,
47
+ ],
48
+ limits: tuple[Number, Number] | None = None,
49
+ ) -> np.ndarray: ...
50
+ def dispatch_multi_channel(
51
+ array_references: Sequence[np.ndarray],
52
+ cmap_names: Sequence[Union[COLORMAPS, None]],
53
+ cmap_values: Sequence[
54
+ Union[
55
+ NDArray[Shape['3, 255'], UInt8],
56
+ MatplotlibColormap,
57
+ CmapColormap,
58
+ None,
59
+ ]
60
+ ],
61
+ blending: Literal[BLENDING_OPTIONS],
62
+ limits: Sequence[tuple[Number, Number]] | None = None,
63
+ ) -> np.ndarray: ...
@@ -0,0 +1,3 @@
1
+ from typing import Literal
2
+
3
+ BLENDING_OPTIONS = Literal['max', 'sum', 'mean', 'min']
@@ -0,0 +1,127 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import (
4
+ TYPE_CHECKING,
5
+ Sequence,
6
+ Tuple,
7
+ Union,
8
+ )
9
+
10
+ import numpy as np
11
+
12
+ from ._blending import BLENDING_OPTIONS
13
+ from ._luts import COLORMAPS
14
+ from .mergechannels import ( # type: ignore
15
+ dispatch_multi_channel,
16
+ dispatch_single_channel,
17
+ )
18
+
19
+ if TYPE_CHECKING:
20
+ from cmap import Colormap as CmapColormap
21
+ from matplotlib.colors import Colormap as MatplotlibColormap
22
+ from nptyping import (
23
+ NDArray,
24
+ Shape,
25
+ UInt8,
26
+ )
27
+
28
+
29
+ def _parse_cmap_arguments(
30
+ color: Union[
31
+ COLORMAPS,
32
+ NDArray[Shape['3, 255'], UInt8],
33
+ MatplotlibColormap,
34
+ CmapColormap,
35
+ ],
36
+ ) -> Tuple[Union[COLORMAPS, None], Union[NDArray[Shape['3, 256'], UInt8], None]]:
37
+ """
38
+ Parse the color argument and return the corresponding cmap name and cmap values
39
+
40
+ Args:
41
+ color: a user-specified argument which may be the name of mergechannels colormap,
42
+ a ndarray lookup table, and matplotlib colormap, or a cmap colormap.
43
+
44
+ Returns:
45
+ A tuple specifying the corresponding mergechannels colormap name (or None if N/A),
46
+ and an array of the lookup table (or None if N/A)
47
+ """
48
+ if isinstance(color, str):
49
+ return color, None
50
+ else:
51
+ try: # try to convert from a matplotlib colormap
52
+ if not color._isinit: # type: ignore
53
+ color._init() # type: ignore
54
+ cmap_values = (color._lut[: color.N, :3] * 255).astype('uint8') # type: ignore
55
+ except AttributeError: # try to convert from a cmaps ColorMap
56
+ try:
57
+ cmap_values = (np.asarray(color.lut()[:, :3]) * 255).astype('uint8') # type: ignore
58
+ except AttributeError: # must be a list of lists or an array castable to u8 (256, 3)
59
+ cmap_values = np.asarray(color).astype('uint8') # type: ignore
60
+
61
+ if not (
62
+ isinstance(cmap_values, np.ndarray)
63
+ and cmap_values.shape == (256, 3)
64
+ and cmap_values.dtype == np.uint8
65
+ ):
66
+ raise ValueError(
67
+ 'Expected a matplotlib colormap, a cmaps colormap, or an object directly castable to '
68
+ f'an 8-bit array of shape (256, 3), got {type(cmap_values)}: {color}'
69
+ )
70
+ return None, cmap_values
71
+
72
+
73
+ def apply_color_map(
74
+ arr: np.ndarray,
75
+ color: Union[
76
+ COLORMAPS,
77
+ NDArray[Shape['3, 255'], UInt8],
78
+ MatplotlibColormap,
79
+ CmapColormap,
80
+ ],
81
+ percentiles: Union[tuple[float, float], None] = None,
82
+ saturation_limits: Union[tuple[float, float], None] = None,
83
+ ) -> np.ndarray:
84
+ """
85
+ apply a color map to an array
86
+ """
87
+ if saturation_limits is None:
88
+ if percentiles is None:
89
+ percentiles = (1.1, 99.9)
90
+ low, high = np.percentile(arr, percentiles)
91
+ saturation_limits = (low, high)
92
+
93
+ cmap_name, cmap_values = _parse_cmap_arguments(color)
94
+
95
+ return dispatch_single_channel(
96
+ array_reference=arr,
97
+ cmap_name=cmap_name,
98
+ cmap_values=cmap_values,
99
+ limits=saturation_limits,
100
+ )
101
+
102
+
103
+ def merge(
104
+ arrs: Sequence[np.ndarray],
105
+ colors: Sequence[COLORMAPS],
106
+ blending: BLENDING_OPTIONS = 'max',
107
+ percentiles: Sequence[tuple[float, float]] | None = None,
108
+ saturation_limits: Sequence[tuple[float, float]] | None = None,
109
+ ) -> np.ndarray:
110
+ """
111
+ apply cmaps to arrays and blend the colors
112
+ """
113
+ cmap_names, cmap_values = zip(*[_parse_cmap_arguments(color) for color in colors])
114
+ if saturation_limits is None:
115
+ if percentiles is None:
116
+ percentiles = [(1.1, 99.9)] * len(arrs)
117
+ saturation_limits = tuple(
118
+ np.percentile(arr, ch_percentiles)
119
+ for arr, ch_percentiles in zip(arrs, percentiles) # type: ignore
120
+ )
121
+ return dispatch_multi_channel(
122
+ array_references=arrs,
123
+ cmap_names=cmap_names,
124
+ cmap_values=cmap_values,
125
+ blending=blending,
126
+ limits=saturation_limits, # type: ignore
127
+ )
mergechannels/_luts.py ADDED
@@ -0,0 +1,175 @@
1
+ from typing import Literal
2
+
3
+ COLORMAPS = Literal[
4
+ '16_colors',
5
+ '3-3-2 RGB',
6
+ '3color-BMR',
7
+ '3color-CGY',
8
+ '3color-RMB',
9
+ '3color-YGC',
10
+ '5_ramps',
11
+ '6_shades',
12
+ 'BOP blue',
13
+ 'BOP orange',
14
+ 'BOP purple',
15
+ 'Blue',
16
+ 'Circus Cherry',
17
+ 'Circus Cyan',
18
+ 'Circus Green',
19
+ 'Circus Ink Black',
20
+ 'Circus Ink Cherry',
21
+ 'Circus Ink Cyan',
22
+ 'Circus Ink Green',
23
+ 'Circus Ink Mint',
24
+ 'Circus Ink Purple',
25
+ 'Circus Ink Yellow',
26
+ 'Circus Mint',
27
+ 'Circus Purple',
28
+ 'Circus Yellow',
29
+ 'Cyan',
30
+ 'Cyan Hot',
31
+ 'Duo Cherry',
32
+ 'Duo Cyan',
33
+ 'Duo Green',
34
+ 'Duo Intense Cherry',
35
+ 'Duo Intense Cyan',
36
+ 'Duo Intense Green',
37
+ 'Duo Intense Mint',
38
+ 'Duo Intense Purple',
39
+ 'Duo Intense Yellow',
40
+ 'Duo Mint',
41
+ 'Duo Purple',
42
+ 'Duo Yellow',
43
+ 'Fire',
44
+ 'Grays',
45
+ 'Grays g=0.25',
46
+ 'Grays g=0.25 inverted',
47
+ 'Grays g=0.50',
48
+ 'Grays g=0.50 inverted',
49
+ 'Grays g=0.75',
50
+ 'Grays g=0.75 inverted',
51
+ 'Grays g=1.00 inverted',
52
+ 'Grays g=1.25',
53
+ 'Grays g=1.25 inverted',
54
+ 'Grays g=1.50',
55
+ 'Grays g=1.50 inverted',
56
+ 'Grays g=1.75',
57
+ 'Grays g=1.75 inverted',
58
+ 'Grays g=2.00',
59
+ 'Grays g=2.00 inverted',
60
+ 'Green',
61
+ 'Green Fire Blue',
62
+ 'HiLo',
63
+ 'I Blue',
64
+ 'I Bordeaux',
65
+ 'I Cyan',
66
+ 'I Forest',
67
+ 'I Green',
68
+ 'I Magenta',
69
+ 'I Purple',
70
+ 'I Red',
71
+ 'I Yellow',
72
+ 'ICA',
73
+ 'ICA2',
74
+ 'ICA3',
75
+ 'Ice',
76
+ 'Ink Black',
77
+ 'Ink Cherry',
78
+ 'Ink Cyan',
79
+ 'Ink Green',
80
+ 'Ink Mint',
81
+ 'Ink Purple',
82
+ 'Ink Wash Black',
83
+ 'Ink Wash Cherry',
84
+ 'Ink Wash Cyan',
85
+ 'Ink Wash Green',
86
+ 'Ink Wash Mint',
87
+ 'Ink Wash Purple',
88
+ 'Ink Wash Yellow',
89
+ 'Ink Yellow',
90
+ 'Magenta',
91
+ 'Magenta Hot',
92
+ 'OIMB1',
93
+ 'OIMB2',
94
+ 'OIMB3',
95
+ 'OPF fresh',
96
+ 'OPF orange',
97
+ 'OPF purple',
98
+ 'Orange Hot',
99
+ 'Parabolic RGB',
100
+ 'Phase Bold Green-Magenta',
101
+ 'Phase Bold Ink Green-Magenta',
102
+ 'Phase Bold Ink Mint-Cherry',
103
+ 'Phase Bold Ink Yellow-Cyan',
104
+ 'Phase Bold Mint-Cherry',
105
+ 'Phase Bold Yellow-Cyan',
106
+ 'Phase Green-Magenta',
107
+ 'Phase Ink Green-Magenta',
108
+ 'Phase Ink Mint-Cherry',
109
+ 'Phase Ink Yellow-Cyan',
110
+ 'Phase Mint-Cherry',
111
+ 'Phase Yellow-Cyan',
112
+ 'Pop blue',
113
+ 'Pop blue inverted',
114
+ 'Pop cherry',
115
+ 'Pop cherry inverted',
116
+ 'Pop cyan',
117
+ 'Pop cyan inverted',
118
+ 'Pop green',
119
+ 'Pop green inverted',
120
+ 'Pop lavender inverted',
121
+ 'Pop magenta',
122
+ 'Pop magenta inverted',
123
+ 'Pop mint',
124
+ 'Pop mint inverted',
125
+ 'Pop purple',
126
+ 'Pop purple inverted',
127
+ 'Pop red',
128
+ 'Pop red inverted',
129
+ 'Pop yellow',
130
+ 'Pop yellow inverted',
131
+ 'Quartetto MYGB Blue',
132
+ 'Quartetto MYGB Green',
133
+ 'Quartetto MYGB Magenta',
134
+ 'Quartetto MYGB Yellow',
135
+ 'Quartetto RYGB Blue',
136
+ 'Quartetto RYGB Green',
137
+ 'Quartetto RYGB Red',
138
+ 'Quartetto RYGB Yellow',
139
+ 'Rainbow RGB',
140
+ 'Red',
141
+ 'Red Hot',
142
+ 'Red/Green',
143
+ 'Spectrum',
144
+ 'Thermal',
145
+ 'Turbo',
146
+ 'Yellow',
147
+ 'Yellow Hot',
148
+ 'betterBlue',
149
+ 'betterCyan',
150
+ 'betterGreen',
151
+ 'betterOrange',
152
+ 'betterRed',
153
+ 'betterYellow',
154
+ 'blue_orange_icb',
155
+ 'brgbcmyw',
156
+ 'cool',
157
+ 'edges',
158
+ 'gem',
159
+ 'glasbey',
160
+ 'glasbey_inverted',
161
+ 'glasbey_on_dark',
162
+ 'glow',
163
+ 'mpl-inferno',
164
+ 'mpl-magma',
165
+ 'mpl-plasma',
166
+ 'mpl-viridis',
167
+ 'phase',
168
+ 'physics',
169
+ 'royal',
170
+ 'sepia',
171
+ 'smart',
172
+ 'thal',
173
+ 'thallium',
174
+ 'unionjack',
175
+ ]
mergechannels/py.typed ADDED
File without changes
@@ -0,0 +1,420 @@
1
+ Metadata-Version: 2.4
2
+ Name: mergechannels
3
+ Version: 0.5.3
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.9
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Programming Language :: Python :: Free Threading
16
+ Requires-Dist: numpy>=1.25,<2.1 ; python_full_version == '3.9.*'
17
+ Requires-Dist: numpy>=1.25,<2.3 ; python_full_version == '3.10.*'
18
+ Requires-Dist: numpy>=1.25,<3 ; python_full_version == '3.11.*'
19
+ Requires-Dist: numpy>=1.26,<3 ; python_full_version == '3.12.*'
20
+ Requires-Dist: numpy>=2.0,<3 ; python_full_version == '3.13.*'
21
+ Requires-Dist: numpy>=2.4,<3 ; python_full_version == '3.14.*'
22
+ License-File: LICENSE
23
+ Summary: Apply and merge colormaps
24
+ Author-email: Zac Swider <zac.swider@gmail.com>
25
+ License: MIT
26
+ Requires-Python: >=3.9, <3.15
27
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
28
+
29
+ [![CI](https://github.com/zacswider/mergechannels/actions/workflows/CI.yml/badge.svg)](https://github.com/zacswider/mergechannels/actions/workflows/CI.yml)
30
+ ![PyPI - License](https://img.shields.io/pypi/l/mergechannels)
31
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mergechannels)
32
+ ![PyPI](https://img.shields.io/pypi/v/mergechannels)
33
+
34
+ # mergechannels
35
+
36
+ This project was originally conceived because I often find myself wanting to apply and blend colormaps to images while working from Python, and many of my favorite colormaps are distributed as [FIJI](https://imagej.net/software/fiji/) lookup tables. I also care about things likes speed and memory usage, so I was interested in seeing if I could at least match matplotlib's colormapping performance with my own hand-rolled colorizer in Rust.
37
+
38
+ The current goal of this library is to be a simple, fast, and memory-efficient way to apply and blend colormaps to images. The api should be intuitive, flexible, and simple. If this is not the case in your hands, please open an issue.
39
+
40
+
41
+ ## Installation
42
+
43
+ Install pre-compiled binaries from [PyPI](https://pypi.org/project/mergechannels/):
44
+ ```bash
45
+ pip install mergechannels
46
+ ```
47
+
48
+ Build from source on your own machine:
49
+ ```bash
50
+ pip install git+https://github.com/zacswider/mergechannels.git
51
+ ```
52
+
53
+ ## Dependencies
54
+ Mergechannels only depends on numpy, a matrix of compatible versions is shown below. Mergechannels can also interop with matplotlib and cmap (see the `Usage` sections below), but these dependencies are optional for core functionality. Mergechannels is compatible with Python 3.9-3.14, but compatiblity with free-threaded python is still a work in progress.
55
+
56
+ | Python | 1.25.0 | 1.26.0 | 2.0.0 | 2.1.0 | 2.2.0 | 2.3.0 | 2.4.0 |
57
+ |--------|--------|--------|-------|-------|-------|-------|-------|
58
+ | 3.9 | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
59
+ | 3.10 | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
60
+ | 3.11 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
61
+ | 3.12 | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
62
+ | 3.13 | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |
63
+ | 3.14 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
64
+ | 3.14t | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
65
+
66
+ ## Usage
67
+ *NOTE*: `skimage`, `matplotlib`, and `cmap` are not dependencies of this project, but are used in the examples below to fetch data/colormaps, and display images.
68
+
69
+
70
+ ### apply a different colormap to each channel
71
+ The primary entrypoint for merging multiple channels is with `mergechannels.merge`. This function expects a sequence of arrays, a sequence of colormaps, a blending approach, and optionally a sequence of pre-determined saturation limits. The arrays is expected to be either u8 or u16 and 2 or 3D.
72
+
73
+ ```python
74
+ from skimage import data
75
+ import matplotlib.pyplot as plt
76
+ import mergechannels as mc
77
+
78
+ cells, nuclei = data.cells3d().max(axis=0)
79
+
80
+ fig, axes = plt.subplots(1, 3)
81
+ for ax in axes: ax.axis('off')
82
+ a, b, c = axes
83
+ a.imshow(cells, cmap='gray')
84
+ b.imshow(nuclei, cmap='gray')
85
+ c.imshow(mc.merge([cells, nuclei], ['Orange Hot', 'Cyan Hot']))
86
+ ```
87
+ ![simple channel blending](https://raw.githubusercontent.com/zacswider/README_Images/main/simple_channel_merge.png)
88
+
89
+ #### What constitutes a colormap?
90
+ Colormaps can be the literal name of one of the FIJI colormaps compiled into the mergechannels binary (see a list as the bottom of the page), a matplotlib colormap, or a [cmap](https://pypi.org/project/cmap/) colormap. The example below creates a similar blending as above, but by explicitly passing pre-generated colormaps (one from the matplotlib library, one from the cmap library). These can also be combined with string literals.
91
+
92
+ ```python
93
+ import cmap
94
+ import matplotlib.pyplot as plt
95
+ from skimage import data
96
+ import mergechannels as mc
97
+
98
+ cells, nuclei = data.cells3d().max(axis=0)
99
+ blue = cmap.Colormap('seaborn:mako')
100
+ copper = plt.get_cmap('copper')
101
+
102
+ fig, axes = plt.subplots(1, 3)
103
+ for ax in axes: ax.axis('off')
104
+ a, b, c = axes
105
+ a.imshow(mc.apply_color_map(nuclei, blue))
106
+ b.imshow(mc.apply_color_map(cells, copper))
107
+ c.imshow(mc.merge([nuclei, cells], [blue, copper]))
108
+ ```
109
+ ![channel blending with external cmaps](https://raw.githubusercontent.com/zacswider/README_Images/main/external_cmaps.png)
110
+
111
+ #### What are my blending options?
112
+ The `blending` argument to `mergechannels.merge` can be one of the following:
113
+ - `'max'`: the maximum RGB value of each pixel is used. This is the default (and intuitive) behavior.
114
+ - `'min'`: the minimum RGB value of each pixel is used. This is useful when combining inverted colormaps.
115
+ - `'mean'`: the mean RGB value of each pixel is used. This is typically most useful when combinding fluorescence with brightfield, but can often require re-scaling the images after blending.
116
+ - `'sum'`: the sum of the RGB values of each pixel is used (saturating). Results in high saturation images but can often be overwhelming and difficult to interpret.
117
+
118
+ The default and intuitive behavior is the use `'max'` blending, but oftentimes minimum blending is desired when combining inverted colormaps.
119
+ ```python
120
+ from skimage import data
121
+ import matplotlib.pyplot as plt
122
+ import mergechannels as mc
123
+
124
+ cells, nuclei = data.cells3d().max(axis=0)
125
+ fig, axes = plt.subplots(1, 3, dpi=200)
126
+ for ax in axes: ax.axis('off')
127
+ a, b, c = axes
128
+ a.imshow(cells, cmap='gray')
129
+ b.imshow(nuclei, cmap='gray')
130
+ c.imshow(mc.merge([cells, nuclei],['I Blue', 'I Forest'], blending='min'))
131
+ ```
132
+ ![minimum blending with inverted colormaps](https://raw.githubusercontent.com/zacswider/README_Images/main/inverted_blending.png)
133
+
134
+ #### How can I control display brightness?
135
+ If desired, pre-determined saturation limits can be passed to `apply_color_map` to clip the images values to a range that best represents the contents of the image. These can be explicit pixel values passed with the `saturation_limits` argument, or as percentile values passed with the `percentiles` argument. If the latter, the percentile values will be used to calculate the saturation limits based on the distribution of pixel values in the images (this is sometimes referred to as "autoscaling). The default behavior is to calculate use the 1.1th percentile value as the dark point and the 99.9th percentile as the bright point.
136
+
137
+ ```python
138
+ from skimage import data
139
+ import matplotlib.pyplot as plt
140
+ import mergechannels as mc
141
+
142
+ cells, nuclei = data.cells3d().max(axis=0)
143
+ channels = [cells, nuclei]
144
+ colormaps = ['I Blue', 'I Forest']
145
+ fig, axes = plt.subplots(1, 3, dpi=300)
146
+ for ax in axes: ax.axis('off')
147
+ (a, b, c) = axes
148
+ a.imshow(mc.merge(channels, colormaps, blending='min')) # use the default autoscaling
149
+ b.imshow(
150
+ mc.merge(
151
+ channels,
152
+ colormaps,
153
+ blending='min',
154
+ saturation_limits=[
155
+ (1000, 20_000), # pre-determined dark and light points for ch1
156
+ (1000, 50_000), # pre-determined dark and light points for ch2
157
+ ],
158
+ ),
159
+ )
160
+ c.imshow(
161
+ mc.merge(
162
+ channels,
163
+ colormaps,
164
+ blending='min',
165
+ percentiles=[(
166
+ 1, # bottom 1% of pixels set to black point
167
+ 97, # top 3% of pixels set to white point
168
+ )]*len(channels), # apply this to all channels
169
+ ),
170
+ )
171
+ ```
172
+ ![adjust the brightness with explicit of percentile based approaches](https://raw.githubusercontent.com/zacswider/README_Images/main/brightness_adjust.png)
173
+
174
+
175
+ NOTE: if you are already working with appropriately scaled u8 images, you will see ~10X performance improvements (relative to the mergechannels and matplotlib naive default implementations) by passing `saturation_limits=(0, 255)` as this significantly reduces the amount of arithmetic done per pixel.
176
+
177
+
178
+ ### apply a colormap to a whole stack
179
+ ```python
180
+ from skimage import data
181
+ from matplotlib import pyplot as plt
182
+ import mergechannels as mc
183
+
184
+ volume = data.cells3d()
185
+ cells = volume[:, 0]
186
+ nuclei = volume[:, 1]
187
+ merged = mc.merge([cells, nuclei],['Orange Hot', 'Cyan Hot'])
188
+ plt.imshow(merged[24]); plt.show()
189
+ ```
190
+ ![colorize a whole stack of images](https://raw.githubusercontent.com/zacswider/README_Images/main/merged_stacks.png)
191
+
192
+
193
+ ### colorize a single image
194
+ The primary entrypoint to applying a colormap to a single image is with `apply_color_map`. this function takes an array, a colormap, and an optional percentiles argument. The arrays is expected to be either u8 or u16 and 2 or 3D.
195
+
196
+ ```python
197
+ from skimage import data
198
+ import matplotlib.pyplot as plt
199
+ import mergechannels as mc
200
+
201
+ img = data.camera()
202
+ colorized = mc.apply_color_map(img, 'Red/Green')
203
+
204
+ fig, axes = plt.subplots(1, 2)
205
+ for ax in axes: ax.axis('off')
206
+ (a, b) = axes
207
+ a.imshow(img, cmap='gray')
208
+ b.imshow(colorized)
209
+ plt.show()
210
+ print(colorized.shape, colorized.dtype)
211
+ >> (512, 512, 3) uint8
212
+ ```
213
+ ![colorize a single image](https://raw.githubusercontent.com/zacswider/README_Images/main/camera_red-green.png)
214
+
215
+ Similar to `mergechannels.merge`, `apply_color_map` will also accept colormaps directly from `matplotlib` and `cmap`, explicit saturation limits, or percentile values for autoscaling.
216
+
217
+ ## Performance
218
+
219
+ Benchmarks show that with appropriately scalled images, (i.e., if pre-determined saturation limits are passed to `mc.merge` or `mc.apply_color_map`) mergechannel is either on par or significantly faster than the underlying numpy operations used by Matplotlib. Note: you can run the benchmarks on your own machine by creating a virtual environment with the dev dependencies `uv sync --dev && source .venv/bin/activate` and running the benchmark code `py.test --benchmark-only`
220
+
221
+ ## Roadmap
222
+ mergechannels is currently incredibly simple. It can apply one or more colormaps to one or more 2/3D 8/16-bit images and that's it.
223
+ - ~~Add support to u8 and u16 images~~
224
+ - Add support for any numerical dtype
225
+ - Add option to return any colormap as a matplotlib colormap
226
+ - ~~Add option to pass external colormaps to mergechannels~~
227
+ - Parallelize colormap application on large images (if it's helpful)
228
+ - Add option to overlay binary or instance masks onto colorized images
229
+ - ~~Add support for free-threaded python~~
230
+
231
+ ## Acknowledgements
232
+
233
+ There are other great colormapping libraries available (e.g., [microfilm](https://github.com/guiwitz/microfilm), [cmap](https://github.com/pyapp-kit/cmap)) that are more feature-rich than this one, but which don't address my goals. My hope is that this project can fill an un-met niche and otherwise maintain full compatibility with these and similar libraries.
234
+
235
+ This project incorporates a number of colormaps that were hand-crafted by Christophe Leterrier and James Manton which were originally distributed [here](https://github.com/cleterrier/ChrisLUTs) and [here](https://sites.imagej.net/JDM_LUTs/) respectively.
236
+
237
+ ## Colormaps
238
+ ### FIJI built-in LUTs
239
+
240
+ <p>16_colors: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_16_colors.png" style="vertical-align: middle"></p>
241
+ <p>3-3-2 RGB: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_3-3-2 RGB.png" style="vertical-align: middle"></p>
242
+ <p>5_ramps: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_5_ramps.png" style="vertical-align: middle"></p>
243
+ <p>6_shades: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_6_shades.png" style="vertical-align: middle"></p>
244
+ <p>Blue: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Blue.png" style="vertical-align: middle"></p>
245
+ <p>Cyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Cyan.png" style="vertical-align: middle"></p>
246
+ <p>Cyan Hot: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Cyan Hot.png" style="vertical-align: middle"></p>
247
+ <p>Fire: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Fire.png" style="vertical-align: middle"></p>
248
+ <p>Grays: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Grays.png" style="vertical-align: middle"></p>
249
+ <p>Green: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Green.png" style="vertical-align: middle"></p>
250
+ <p>Green Fire Blue: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Green Fire Blue.png" style="vertical-align: middle"></p>
251
+ <p>HiLo: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_HiLo.png" style="vertical-align: middle"></p>
252
+ <p>ICA: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_ICA.png" style="vertical-align: middle"></p>
253
+ <p>ICA2: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_ICA2.png" style="vertical-align: middle"></p>
254
+ <p>ICA3: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_ICA3.png" style="vertical-align: middle"></p>
255
+ <p>Ice: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Ice.png" style="vertical-align: middle"></p>
256
+ <p>Magenta: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Magenta.png" style="vertical-align: middle"></p>
257
+ <p>Magenta Hot: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Magenta Hot.png" style="vertical-align: middle"></p>
258
+ <p>Orange Hot: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Orange Hot.png" style="vertical-align: middle"></p>
259
+ <p>Rainbow RGB: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Rainbow RGB.png" style="vertical-align: middle"></p>
260
+ <p>Red: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Red.png" style="vertical-align: middle"></p>
261
+ <p>Red Hot: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Red Hot.png" style="vertical-align: middle"></p>
262
+ <p>Red/Green: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Red%25Green.png" style="vertical-align: middle"></p>
263
+ <p>Spectrum: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Spectrum.png" style="vertical-align: middle"></p>
264
+ <p>Thermal: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Thermal.png" style="vertical-align: middle"></p>
265
+ <p>Yellow: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Yellow.png" style="vertical-align: middle"></p>
266
+ <p>Yellow Hot: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_Yellow Hot.png" style="vertical-align: middle"></p>
267
+ <p>blue_orange_icb: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_blue_orange_icb.png" style="vertical-align: middle"></p>
268
+ <p>brgbcmyw: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_brgbcmyw.png" style="vertical-align: middle"></p>
269
+ <p>cool: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_cool.png" style="vertical-align: middle"></p>
270
+ <p>edges: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_edges.png" style="vertical-align: middle"></p>
271
+ <p>gem: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_gem.png" style="vertical-align: middle"></p>
272
+ <p>glasbey: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_glasbey.png" style="vertical-align: middle"></p>
273
+ <p>glasbey_inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_glasbey_inverted.png" style="vertical-align: middle"></p>
274
+ <p>glasbey_on_dark: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_glasbey_on_dark.png" style="vertical-align: middle"></p>
275
+ <p>glow: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_glow.png" style="vertical-align: middle"></p>
276
+ <p>mpl-inferno: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_mpl-inferno.png" style="vertical-align: middle"></p>
277
+ <p>mpl-magma: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_mpl-magma.png" style="vertical-align: middle"></p>
278
+ <p>mpl-plasma: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_mpl-plasma.png" style="vertical-align: middle"></p>
279
+ <p>mpl-viridis: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_mpl-viridis.png" style="vertical-align: middle"></p>
280
+ <p>phase: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_phase.png" style="vertical-align: middle"></p>
281
+ <p>physics: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_physics.png" style="vertical-align: middle"></p>
282
+ <p>royal: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_royal.png" style="vertical-align: middle"></p>
283
+ <p>sepia: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_sepia.png" style="vertical-align: middle"></p>
284
+ <p>smart: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_smart.png" style="vertical-align: middle"></p>
285
+ <p>thal: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_thal.png" style="vertical-align: middle"></p>
286
+ <p>thallium: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_thallium.png" style="vertical-align: middle"></p>
287
+ <p>unionjack: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/builtin_luts_unionjack.png" style="vertical-align: middle"></p>
288
+
289
+ ### [My custom LUTs](https://github.com/zacswider/LUTs)
290
+
291
+ <p>OIMB1: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/zac_luts_OIMB1.png" style="vertical-align: middle"></p>
292
+ <p>OIMB2: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/zac_luts_OIMB2.png" style="vertical-align: middle"></p>
293
+ <p>OIMB3: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/zac_luts_OIMB3.png" style="vertical-align: middle"></p>
294
+ <p>betterBlue: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/zac_luts_betterBlue.png" style="vertical-align: middle"></p>
295
+ <p>betterCyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/zac_luts_betterCyan.png" style="vertical-align: middle"></p>
296
+ <p>betterGreen: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/zac_luts_betterGreen.png" style="vertical-align: middle"></p>
297
+ <p>betterOrange: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/zac_luts_betterOrange.png" style="vertical-align: middle"></p>
298
+ <p>betterRed: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/zac_luts_betterRed.png" style="vertical-align: middle"></p>
299
+ <p>betterYellow: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/zac_luts_betterYellow.png" style="vertical-align: middle"></p>
300
+
301
+ ### [Christophe Leterrier's LUTs](https://github.com/cleterrier/ChrisLUTs)
302
+
303
+ <p>3color-BMR: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_3color-BMR.png" style="vertical-align: middle"></p>
304
+ <p>3color-CGY: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_3color-CGY.png" style="vertical-align: middle"></p>
305
+ <p>3color-RMB: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_3color-RMB.png" style="vertical-align: middle"></p>
306
+ <p>3color-YGC: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_3color-YGC.png" style="vertical-align: middle"></p>
307
+ <p>BOP blue: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_BOP blue.png" style="vertical-align: middle"></p>
308
+ <p>BOP orange: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_BOP orange.png" style="vertical-align: middle"></p>
309
+ <p>BOP purple: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_BOP purple.png" style="vertical-align: middle"></p>
310
+ <p>I Blue: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_I Blue.png" style="vertical-align: middle"></p>
311
+ <p>I Bordeaux: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_I Bordeaux.png" style="vertical-align: middle"></p>
312
+ <p>I Cyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_I Cyan.png" style="vertical-align: middle"></p>
313
+ <p>I Forest: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_I Forest.png" style="vertical-align: middle"></p>
314
+ <p>I Green: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_I Green.png" style="vertical-align: middle"></p>
315
+ <p>I Magenta: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_I Magenta.png" style="vertical-align: middle"></p>
316
+ <p>I Purple: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_I Purple.png" style="vertical-align: middle"></p>
317
+ <p>I Red: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_I Red.png" style="vertical-align: middle"></p>
318
+ <p>I Yellow: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_I Yellow.png" style="vertical-align: middle"></p>
319
+ <p>OPF fresh: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_OPF fresh.png" style="vertical-align: middle"></p>
320
+ <p>OPF orange: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_OPF orange.png" style="vertical-align: middle"></p>
321
+ <p>OPF purple: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_OPF purple.png" style="vertical-align: middle"></p>
322
+ <p>Turbo: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/christ_luts_Turbo.png" style="vertical-align: middle"></p>
323
+
324
+ ### [James Manton's LUTs](https://sites.imagej.net/JDM_LUTs/)
325
+
326
+ <p>Circus Cherry: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Circus Cherry.png" style="vertical-align: middle"></p>
327
+ <p>Circus Cyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Circus Cyan.png" style="vertical-align: middle"></p>
328
+ <p>Circus Green: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Circus Green.png" style="vertical-align: middle"></p>
329
+ <p>Circus Ink Black: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Circus Ink Black.png" style="vertical-align: middle"></p>
330
+ <p>Circus Ink Cherry: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Circus Ink Cherry.png" style="vertical-align: middle"></p>
331
+ <p>Circus Ink Cyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Circus Ink Cyan.png" style="vertical-align: middle"></p>
332
+ <p>Circus Ink Green: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Circus Ink Green.png" style="vertical-align: middle"></p>
333
+ <p>Circus Ink Mint: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Circus Ink Mint.png" style="vertical-align: middle"></p>
334
+ <p>Circus Ink Purple: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Circus Ink Purple.png" style="vertical-align: middle"></p>
335
+ <p>Circus Ink Yellow: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Circus Ink Yellow.png" style="vertical-align: middle"></p>
336
+ <p>Circus Mint: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Circus Mint.png" style="vertical-align: middle"></p>
337
+ <p>Circus Purple: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Circus Purple.png" style="vertical-align: middle"></p>
338
+ <p>Circus Yellow: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Circus Yellow.png" style="vertical-align: middle"></p>
339
+ <p>Duo Cherry: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Duo Cherry.png" style="vertical-align: middle"></p>
340
+ <p>Duo Cyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Duo Cyan.png" style="vertical-align: middle"></p>
341
+ <p>Duo Green: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Duo Green.png" style="vertical-align: middle"></p>
342
+ <p>Duo Intense Cherry: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Duo Intense Cherry.png" style="vertical-align: middle"></p>
343
+ <p>Duo Intense Cyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Duo Intense Cyan.png" style="vertical-align: middle"></p>
344
+ <p>Duo Intense Green: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Duo Intense Green.png" style="vertical-align: middle"></p>
345
+ <p>Duo Intense Mint: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Duo Intense Mint.png" style="vertical-align: middle"></p>
346
+ <p>Duo Intense Purple: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Duo Intense Purple.png" style="vertical-align: middle"></p>
347
+ <p>Duo Intense Yellow: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Duo Intense Yellow.png" style="vertical-align: middle"></p>
348
+ <p>Duo Mint: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Duo Mint.png" style="vertical-align: middle"></p>
349
+ <p>Duo Purple: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Duo Purple.png" style="vertical-align: middle"></p>
350
+ <p>Duo Yellow: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Duo Yellow.png" style="vertical-align: middle"></p>
351
+ <p>Grays g=0.25: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=0.25.png" style="vertical-align: middle"></p>
352
+ <p>Grays g=0.25 inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=0.25 inverted.png" style="vertical-align: middle"></p>
353
+ <p>Grays g=0.50: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=0.50.png" style="vertical-align: middle"></p>
354
+ <p>Grays g=0.50 inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=0.50 inverted.png" style="vertical-align: middle"></p>
355
+ <p>Grays g=0.75: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=0.75.png" style="vertical-align: middle"></p>
356
+ <p>Grays g=0.75 inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=0.75 inverted.png" style="vertical-align: middle"></p>
357
+ <p>Grays g=1.00 inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=1.00 inverted.png" style="vertical-align: middle"></p>
358
+ <p>Grays g=1.25: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=1.25.png" style="vertical-align: middle"></p>
359
+ <p>Grays g=1.25 inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=1.25 inverted.png" style="vertical-align: middle"></p>
360
+ <p>Grays g=1.50: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=1.50.png" style="vertical-align: middle"></p>
361
+ <p>Grays g=1.50 inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=1.50 inverted.png" style="vertical-align: middle"></p>
362
+ <p>Grays g=1.75: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=1.75.png" style="vertical-align: middle"></p>
363
+ <p>Grays g=1.75 inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=1.75 inverted.png" style="vertical-align: middle"></p>
364
+ <p>Grays g=2.00: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=2.00.png" style="vertical-align: middle"></p>
365
+ <p>Grays g=2.00 inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Grays g=2.00 inverted.png" style="vertical-align: middle"></p>
366
+ <p>Ink Black: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Black.png" style="vertical-align: middle"></p>
367
+ <p>Ink Cherry: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Cherry.png" style="vertical-align: middle"></p>
368
+ <p>Ink Cyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Cyan.png" style="vertical-align: middle"></p>
369
+ <p>Ink Green: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Green.png" style="vertical-align: middle"></p>
370
+ <p>Ink Mint: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Mint.png" style="vertical-align: middle"></p>
371
+ <p>Ink Purple: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Purple.png" style="vertical-align: middle"></p>
372
+ <p>Ink Wash Black: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Wash Black.png" style="vertical-align: middle"></p>
373
+ <p>Ink Wash Cherry: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Wash Cherry.png" style="vertical-align: middle"></p>
374
+ <p>Ink Wash Cyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Wash Cyan.png" style="vertical-align: middle"></p>
375
+ <p>Ink Wash Green: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Wash Green.png" style="vertical-align: middle"></p>
376
+ <p>Ink Wash Mint: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Wash Mint.png" style="vertical-align: middle"></p>
377
+ <p>Ink Wash Purple: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Wash Purple.png" style="vertical-align: middle"></p>
378
+ <p>Ink Wash Yellow: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Wash Yellow.png" style="vertical-align: middle"></p>
379
+ <p>Ink Yellow: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Ink Yellow.png" style="vertical-align: middle"></p>
380
+ <p>Parabolic RGB: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Parabolic RGB.png" style="vertical-align: middle"></p>
381
+ <p>Phase Bold Green-Magenta: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Phase Bold Green-Magenta.png" style="vertical-align: middle"></p>
382
+ <p>Phase Bold Ink Green-Magenta: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Phase Bold Ink Green-Magenta.png" style="vertical-align: middle"></p>
383
+ <p>Phase Bold Ink Mint-Cherry: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Phase Bold Ink Mint-Cherry.png" style="vertical-align: middle"></p>
384
+ <p>Phase Bold Ink Yellow-Cyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Phase Bold Ink Yellow-Cyan.png" style="vertical-align: middle"></p>
385
+ <p>Phase Bold Mint-Cherry: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Phase Bold Mint-Cherry.png" style="vertical-align: middle"></p>
386
+ <p>Phase Bold Yellow-Cyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Phase Bold Yellow-Cyan.png" style="vertical-align: middle"></p>
387
+ <p>Phase Green-Magenta: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Phase Green-Magenta.png" style="vertical-align: middle"></p>
388
+ <p>Phase Ink Green-Magenta: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Phase Ink Green-Magenta.png" style="vertical-align: middle"></p>
389
+ <p>Phase Ink Mint-Cherry: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Phase Ink Mint-Cherry.png" style="vertical-align: middle"></p>
390
+ <p>Phase Ink Yellow-Cyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Phase Ink Yellow-Cyan.png" style="vertical-align: middle"></p>
391
+ <p>Phase Mint-Cherry: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Phase Mint-Cherry.png" style="vertical-align: middle"></p>
392
+ <p>Phase Yellow-Cyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Phase Yellow-Cyan.png" style="vertical-align: middle"></p>
393
+ <p>Pop blue: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop blue.png" style="vertical-align: middle"></p>
394
+ <p>Pop blue inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop blue inverted.png" style="vertical-align: middle"></p>
395
+ <p>Pop cherry: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop cherry.png" style="vertical-align: middle"></p>
396
+ <p>Pop cherry inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop cherry inverted.png" style="vertical-align: middle"></p>
397
+ <p>Pop cyan: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop cyan.png" style="vertical-align: middle"></p>
398
+ <p>Pop cyan inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop cyan inverted.png" style="vertical-align: middle"></p>
399
+ <p>Pop green: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop green.png" style="vertical-align: middle"></p>
400
+ <p>Pop green inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop green inverted.png" style="vertical-align: middle"></p>
401
+ <p>Pop lavender inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop lavender inverted.png" style="vertical-align: middle"></p>
402
+ <p>Pop magenta: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop magenta.png" style="vertical-align: middle"></p>
403
+ <p>Pop magenta inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop magenta inverted.png" style="vertical-align: middle"></p>
404
+ <p>Pop mint: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop mint.png" style="vertical-align: middle"></p>
405
+ <p>Pop mint inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop mint inverted.png" style="vertical-align: middle"></p>
406
+ <p>Pop purple: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop purple.png" style="vertical-align: middle"></p>
407
+ <p>Pop purple inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop purple inverted.png" style="vertical-align: middle"></p>
408
+ <p>Pop red: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop red.png" style="vertical-align: middle"></p>
409
+ <p>Pop red inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop red inverted.png" style="vertical-align: middle"></p>
410
+ <p>Pop yellow: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop yellow.png" style="vertical-align: middle"></p>
411
+ <p>Pop yellow inverted: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Pop yellow inverted.png" style="vertical-align: middle"></p>
412
+ <p>Quartetto MYGB Blue: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Quartetto MYGB Blue.png" style="vertical-align: middle"></p>
413
+ <p>Quartetto MYGB Green: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Quartetto MYGB Green.png" style="vertical-align: middle"></p>
414
+ <p>Quartetto MYGB Magenta: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Quartetto MYGB Magenta.png" style="vertical-align: middle"></p>
415
+ <p>Quartetto MYGB Yellow: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Quartetto MYGB Yellow.png" style="vertical-align: middle"></p>
416
+ <p>Quartetto RYGB Blue: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Quartetto RYGB Blue.png" style="vertical-align: middle"></p>
417
+ <p>Quartetto RYGB Green: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Quartetto RYGB Green.png" style="vertical-align: middle"></p>
418
+ <p>Quartetto RYGB Red: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Quartetto RYGB Red.png" style="vertical-align: middle"></p>
419
+ <p>Quartetto RYGB Yellow: <img src="https://raw.githubusercontent.com/zacswider/README_Images/main/jdm_luts_Quartetto RYGB Yellow.png" style="vertical-align: middle"></p>
420
+
@@ -0,0 +1,11 @@
1
+ mergechannels-0.5.3.dist-info/METADATA,sha256=rB9Btk7HvqqRCeXzvYM0WuBCra2x2we5o9eT7YHMXjA,38793
2
+ mergechannels-0.5.3.dist-info/WHEEL,sha256=451yaM1g3Dd0UYBKWqFcNM6gBrF24IuTGjWJqW0k7vU,145
3
+ mergechannels-0.5.3.dist-info/licenses/LICENSE,sha256=csvD60rgtSorbYEM3f8867qNyPCzmIXyFNj8h01Bd6c,1071
4
+ mergechannels/__init__.py,sha256=tZ4m5fqj8kbNsrLpHWLldNz_IfMxVcEnvS7NFzBbxaw,413
5
+ mergechannels/__init__.pyi,sha256=TbMmPArFAZu4L2_VfgW6u4-Q-cbalUxH2cXFI_EM_44,1759
6
+ mergechannels/_blending.py,sha256=mE5Cr9wvVJRcwfymg_UUZUjdIKx2mldfLU8QJT95bVM,84
7
+ mergechannels/_internal.py,sha256=53bmtgOaGfcBsWrsJbGeRH3Vr8RJEUGavZLcaCcdNH0,4004
8
+ mergechannels/_luts.py,sha256=5FEvxQk4nvYYjbWPDEHL_gYChL78SBxakDbJuHRdamc,3480
9
+ mergechannels/mergechannels.cpython-39-aarch64-linux-gnu.so,sha256=0DAzeZs9Il86rtg-B6dlYcORyCTOTi0yUoQOeZ0Bp5I,1053120
10
+ mergechannels/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ mergechannels-0.5.3.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.10.2)
3
+ Root-Is-Purelib: false
4
+ Tag: cp39-cp39-manylinux_2_17_aarch64
5
+ Tag: cp39-cp39-manylinux2014_aarch64
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Zachary Swider
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.