TiffImages.jl icon indicating copy to clipboard operation
TiffImages.jl copied to clipboard

add support for extra channels

Open chrstphrbrns opened this issue 10 months ago • 6 comments

Fixes #100

Exports three new functions

  • color -- extract the color component of an image, eg
julia> imshow(color(im));
  • nchannels -- get the total number of channels from an image (color channels + extra channels)
  • channel -- get the values from a specific channel (with the first N channels being color channels), eg
julia> imshow(channel(im, 5));

chrstphrbrns avatar Apr 05 '24 22:04 chrstphrbrns

Codecov Report

Attention: Patch coverage is 87.87879% with 12 lines in your changes missing coverage. Please review.

Project coverage is 92.36%. Comparing base (25cf338) to head (903fabd).

Files with missing lines Patch % Lines
src/types/common.jl 85.71% 5 Missing :warning:
src/types/widepixel.jl 28.57% 5 Missing :warning:
src/load.jl 87.50% 1 Missing :warning:
src/types/lazy.jl 50.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #159      +/-   ##
==========================================
- Coverage   92.68%   92.36%   -0.33%     
==========================================
  Files          13       14       +1     
  Lines        1121     1152      +31     
==========================================
+ Hits         1039     1064      +25     
- Misses         82       88       +6     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 06 '24 13:04 codecov-commenter

This is just a comment and does not block the merge, but color is one of the functions that ColorTypes exports. TiffImages users are likely to be using ColorTypes, Colors, or Images. At the very least, it would be good to have a note in the document.

kimikage avatar Apr 19 '24 23:04 kimikage

This is just a comment and does not block the merge, but color is one of the functions that ColorTypes exports. TiffImages users are likely to be using ColorTypes, Colors, or Images. At the very least, it would be good to have a note in the document.

What kind of a note? Julia already warns when two packages export the same symbol

WARNING: both ColorTypes and TiffImages export "color"; uses of it in module Main must be qualified

chrstphrbrns avatar May 14 '24 14:05 chrstphrbrns

It is not what it is, but where it is that matters.

in the document.

kimikage avatar May 14 '24 19:05 kimikage

Sorry for the delay here, I was on vacation. I'm happy with the state of this PR (thanks @chrstphrbrns for your hard work here!). I'm going to release #165 as v0.10.1 and then I'll merge this PR into master to be released as v0.11.0.

tlnagy avatar May 20 '24 16:05 tlnagy

@tlnagy any update regarding this amazing PR by @chrstphrbrns ?

juliohm avatar Aug 02 '24 19:08 juliohm

It would be really useful to have this feature in place to solve #100

@tlnagy what is your plan regarding this PR?

juliohm avatar Oct 10 '24 18:10 juliohm

Sorry, I've been swamped at my new job and haven't had much time for my Julia packages. I just released v0.10.1 and I'll release #165 as v0.10.2, rebase this branch, and if it all passes, this'll come out as v0.11.0

tlnagy avatar Oct 10 '24 18:10 tlnagy

The segmentation fault with Julia nightly on MacOS + Arm64 is concerning. @chrstphrbrns any idea why SIMD might be failing there?

tlnagy avatar Oct 10 '24 20:10 tlnagy

@tlnagy is the failure on Julia nightly blocking? We are really looking forward to this.

juliohm avatar Oct 17 '24 09:10 juliohm