Last active
January 19, 2023 10:52
-
-
Save petebankhead/3515fed13a5fdbcd5cf5fb7abe52dd15 to your computer and use it in GitHub Desktop.
Create a scatterplot of cell measurements in QuPath v0.2.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Example showing how to create an interactive scatterplot for the cells in the current viewer | |
* in QuPath v0.2.0. | |
* | |
* 'Interactive' here means that double-clicking a point on the scatterplot selects the specific cell. | |
* | |
* Warning! This is an early, work-in-progress feature subject to change in future releases. | |
* It is *not* suitable for very large numbers of cells, because each point on the scatterplot is | |
* rather 'heavy'. It should work fine with thousands of cells, but not with hundreds of thousands. | |
* | |
* @author Pete Bankhead | |
*/ | |
def viewer = getCurrentViewer() | |
def cells = getCellObjects() | |
def builder = Charts.scatterChart() | |
.viewer(viewer) | |
.title('My scatterplot') | |
.measurements(cells, 'Nucleus: Area', 'Nucleus: DAB OD mean') | |
.markerOpacity(0.5) | |
.show() | |
// Uncomment the following line to get more info about available options | |
// println describe(Charts.scatterChart()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ok a cross threshold will be already very useful, it exist some librtary in java to do it you might know probably : https://forum.image.sc/t/javafx-scatter-plot-for-imagej-a-working-example/51368