Skip to content

Conversation

@gselzer
Copy link
Contributor

@gselzer gselzer commented Aug 5, 2025

Nice to have over in imglib2-meta.

@gselzer gselzer self-assigned this Aug 5, 2025
@gselzer gselzer added the enhancement New feature or request label Aug 5, 2025
@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/fiji-friends-weekly-dev-update-thread/103718/110

@gselzer gselzer requested a review from Copilot November 10, 2025 19:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds bidirectional conversion utilities between ImageJ's LUT objects and ImgLib2's ColorTable interface. The implementation provides a zero-copy wrapper for LUT-to-ColorTable conversion and a copying converter for ColorTable-to-LUT conversion.

  • Added LUTToColorTable.wrap() for wrapping ImageJ LUTs as ImgLib2 ColorTables without copying data
  • Added ColorTableToLUT.convert() for converting ImgLib2 ColorTables to ImageJ LUTs
  • Added comprehensive test coverage for both conversion directions

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/main/java/net/imglib2/imagej/LUTToColorTable.java Implements zero-copy wrapping of ImageJ LUT into ImgLib2 ColorTable
src/main/java/net/imglib2/imagej/ColorTableToLUT.java Implements copying conversion from ImgLib2 ColorTable to ImageJ LUT
src/test/java/net/imglib2/imagej/LUTToColorTableTest.java Tests the LUT wrapping functionality
src/test/java/net/imglib2/imagej/ColorTableToLUTTest.java Tests the ColorTable conversion functionality

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gselzer gselzer merged commit 75eed49 into main Nov 10, 2025
1 check passed
@gselzer gselzer deleted the lut-conversion branch November 10, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants