}
else if(event.button == 1)
{
- System.out.println("Mouse left click"+event.x + "and" +event.y);
+ System.out.println("Mask number "+view.getContext().getMasks().size());
+ //view.highlightClickedSegment(event.x,event.y);
+ repaint();
}
}
public void mouseDown(MouseEvent e)
}
}
+ /**
+ * For highlighting the mouse clicked segment in Labelling Mode.
+ * @param Mosue clicked points x,y
+ */
+ public void highlightClickedSegment(int x, int y) {
+ ctx.highlightClickedSegment(x,y);
+ }
+
/**
* Re-construct the display image buffer, and dispose the old one if
*/
private File file;
+ /**
+ * For storing the mouse clicked point in Labelling mode
+ */
+ public static Point mouseClickedPoint;
+
/**
* For storing independent Segmentation objects
*/
return segmentationMaskObjects;
}
+ /**
+ * For highlighting the clicked segmentObject
+ * @param x, mouse clicked point x
+ * @param y, mouse clicked point y
+ */
+ public void highlightClickedSegment(int x, int y) {
+ mouseClickedPoint.x = x;
+ mouseClickedPoint.y = y;
+ }
+
+ public Point getMouseClickedPoint()
+ {
+ return mouseClickedPoint;
+ }
/**
* Returns the current image being segmented. This method returns an an SWT