Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TileExporter with ImageJ TIFF can lose pixel size and channel color information #1516

Open
petebankhead opened this issue May 3, 2024 · 0 comments
Labels

Comments

@petebankhead
Copy link
Member

Bug report

Describe the bug
When using the TileExporter, pixel size and channel color information can be lost.

To Reproduce
Use the TileExporter class to export fixed-size tiles as ImageJ TIFF, e.g. with this script applied to the LuCa sample image:

def path = buildPathInProject("tiles")
mkdirs(path)
def imageData = getCurrentImageData()
new TileExporter(imageData)
    .writeTiles(path)

Open the resulting TIFFs in ImageJ and see that no calibration is set.

Expected behavior
Channel colors are preserved, and the image properties are set (pixel size and origin).

Desktop (please complete the following information):

  • OS: All
  • QuPath Version: v0.5.1 (and earlier)

Additional context
Relates to #1503 but is not identical.

The relevant code is at

// TODO: This has disadvantages, in that it loses channel names & region info

The difficulty is guaranteeing that tiles have a fixed size, rather than risking an off-by-one error, when we can only define the region with an ImageServer and RegionRequest that can have an arbitrary downsample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant