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

resolution very bad with mrxs format #187

Closed
matfallet opened this issue Jul 20, 2018 · 11 comments
Closed

resolution very bad with mrxs format #187

matfallet opened this issue Jul 20, 2018 · 11 comments

Comments

@matfallet
Copy link

Dear all, I try to display my image from my scanner (3DHistech) in mrxs with Qupath. The resolution is very bad in comparison to my image view with case viewer. Is there anything to set in he software ?
If I want to process the area of my labelling (fluorescence) above a threshold, how can I do it ?

Thanks, Mathieu

@petebankhead
Copy link
Member

Unfortunately there is very limited support for .mrxs images; I don't know of any open source libraries that can handle this particular file format. Some brightfield images in .mrxs format can be read with OpenSlide, but fluorescence probably cannot.

There is some further information here.

I suspect that only the thumbnail image is being read, not the full thing. In the absence of compatible open source reader for .mrxs files, it unfortunately isn't possible to work with them in QuPath.

@petebankhead
Copy link
Member

There is also some relevant information at #106 and #49

@matfallet
Copy link
Author

matfallet commented Jul 20, 2018 via email

@Svidro
Copy link

Svidro commented Jul 20, 2018

I would recommend first trying to change the settings within the Pannoramic scan software concerning the file format. I don't believe we ever got 16bit JPEGXR working, but some 8bit compression options can be read.

@petebankhead
Copy link
Member

It may work if it is 8-bit RGB (i.e. three channels), and does not use JPEG-XR compression. However if the original data is 16-bit, or has more channels, then there is the risk of a considerable loss of information on conversion.

It would be fantastic if the company behind the format could offer a solution - ideally through Bio-Formats (since QuPath and many other software applications already support Bio-Formats). Otherwise, it is sadly the case that people depending on certain scanners using proprietary file formats may not be able to analyze their data with QuPath, or open source tools.

@Svidro
Copy link

Svidro commented Jul 20, 2018

True, I think I had to split any 4 channel images into two images, each using a subset of the channels (nuclear + 2 other and nuclear +1 other). Fairly awkward, but can be made to work with enough convincing. Since the images are (should be) the exact same pixel-wise you can end up with all of the data you need.

Certainly not ideal, and I do wish they would improve support for their format.

@matfallet
Copy link
Author

matfallet commented Jul 23, 2018 via email

@petebankhead
Copy link
Member

The contents of TIFF images can be quite variable, some compatible and some not. QuPath doesn't handle the file formats itself, but rather uses OpenSlide, Bio-Formats or ImageJ.

Because all three libraries 'think' they can handle TIFF files, and a decision is made based on a basic parsing of the metadata, I'm not sure which one will actually be trying (and failing) in your case. If you have the Bio-Formats extension installed, then you can customize whether or not it is used (or ignored) preferentially using the preferences described at the bottom of this page: https://github.com/qupath/qupath-bioformats-extension

By either always using Bio-Formats or never using Bio-Formats for .tif, you might have more success in reading this specific TIFF in QuPath.

Regarding 'a way to calculate the intensity for fluorescence above a threshold' do you want the mean fluorescence intensity, or something else? I would expect that the mean is quite dependent on the threshold value chosen. In any case, there's currently no built-in command to get exactly this in QuPath directly, and you may need to rely on ImageJ. Four ways you might approach this are:

  • Using Send region to ImageJ interactively
  • Via an ImageJ macro run through QuPath
  • Using a Groovy script, somewhat like this one
  • Using a script, macro or Simple tissue detection to generate the QuPath annotation first, then within QuPath calling Analyze → Calculate features → Add intensity features (experimental)

@matfallet
Copy link
Author

matfallet commented Jul 23, 2018 via email

@Svidro
Copy link

Svidro commented Jul 23, 2018

Depending on the size, I would usually do something like that by sending a downsampled whole image to ImageJ to create and return a "tissue annotation." Then, tile that first annotation into further annotation tiles, and send each tile to ImageJ at full resolution. Use only your channel of interest to return detection objects for areas over your threshold. Removing all of the tile annotations would then leave you with your initial "full" annotation and a whole list of detection objects, which you could sum the area of and compare to the full annotation for a percent positive. The whole thing should be script-able.

If you want to look at methods though or get help with scripting, I would recommend the Google Group forum.

@petebankhead
Copy link
Member

Closing this due to lack of activity, and it's mostly around file formats (i.e. OpenSlide and Bio-Formats).
For further discussion, there's also now http://forum.image.sc/tags/qupath

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

No branches or pull requests

3 participants