use of qupath.lib.gui.viewer.GridLines in project qupath by qupath.
the class Commands method promptToSetGridLineSpacing.
/**
* Prompt to input the spacing for the grid lines optionally displayed on viewers.
* @param options the {@link OverlayOptions} that manage the grid lines.
*/
public static void promptToSetGridLineSpacing(OverlayOptions options) {
GridLines gridLines = options.getGridLines();
ParameterList params = new ParameterList().addDoubleParameter("hSpacing", "Horizontal spacing", gridLines.getSpaceX()).addDoubleParameter("vSpacing", "Vertical spacing", gridLines.getSpaceY()).addBooleanParameter("useMicrons", "Use microns", gridLines.useMicrons());
if (!Dialogs.showParameterDialog("Set grid spacing", params))
return;
gridLines = new GridLines();
gridLines.setSpaceX(params.getDoubleParameterValue("hSpacing"));
gridLines.setSpaceY(params.getDoubleParameterValue("vSpacing"));
gridLines.setUseMicrons(params.getBooleanParameterValue("useMicrons"));
options.gridLinesProperty().set(gridLines);
}
Aggregations