use of qupath.lib.gui.tma.TMASummaryViewer in project qupath by qupath.
the class Commands method launchTMADataViewer.
/**
* Open new window with the TMA data viewer.
* @param qupath current {@link QuPathGUI} instance (may be null).
*/
public static void launchTMADataViewer(QuPathGUI qupath) {
Stage stage = new Stage();
if (qupath != null)
stage.initOwner(qupath.getStage());
TMASummaryViewer tmaViewer = new TMASummaryViewer(stage);
ImageData<BufferedImage> imageData = qupath.getImageData();
if (imageData != null && imageData.getHierarchy().getTMAGrid() != null)
tmaViewer.setTMAEntriesFromImageData(imageData);
try {
Screen screen = Screen.getPrimary();
stage.setWidth(screen.getBounds().getWidth() * 0.75);
stage.setHeight(screen.getBounds().getHeight() * 0.75);
} catch (Exception e) {
logger.error("Exception setting stage size", e);
}
stage.show();
}
Aggregations