Hi,
In the code below (org.dawb.workbench.plotting.tools.InfoPixelTool), the
point.getCoordinateSystem() does not compile, there is no such method in
org.dawb.common.ui.plot.region.IRegion. Is the newest file missing from
github, or is something wrong in my workspace?
Gábor
@Override
public void mousePressed(MouseEvent evt) {
if (!isActive()) return;
final Collection<IRegion> regions =
getPlottingSystem().getRegions();
if (regions==null || regions.isEmpty()) logger.debug("no region
selected");
try {
// add a point region
final IRegion point =
getPlottingSystem().createRegion(RegionUtils.getUniqueName("Point",
getPlottingSystem()), RegionType.POINT);
final PointROI regionBounds= new PointROI();
double[] values =
point.getCoordinateSystem().getPositionValue(evt.x, evt.y);
regionBounds.setPoint(values);
point.setROI(regionBounds);
point.setMobile(true);
point.setTrackMouse(true);
getPlottingSystem().addRegion(point);
} catch (Exception e) {
logger.error("Cannot create point!", e);
}
}
|