/** * Select a list and deselect the others * @param e item event (originated by a list) * @param i list index */ void listSelected(final ItemEvent e, final int i) { drawExamples(); displayImage.setColor(Color.YELLOW); for(int j = 0; j < numOfClasses; j++) { if (j == i) { final Roi newRoi = examples[i].get(exampleList[i].getSelectedIndex()); // Set selected trace as current ROI newRoi.setImage(displayImage); displayImage.setRoi(newRoi); } else exampleList[j].deselect(exampleList[j].getSelectedIndex()); } displayImage.updateAndDraw(); }
/** * Select a list and deselect the others * @param e item event (originated by a list) * @param i list index */ void listSelected(final ItemEvent e, final int i) { drawExamples(); displayImage.setColor(Color.YELLOW); for(int j = 0; j < numOfClasses; j++) { if (j == i) { final Roi newRoi = examples[i].get(exampleList[i].getSelectedIndex()); // Set selected trace as current ROI newRoi.setImage(displayImage); displayImage.setRoi(newRoi); } else exampleList[j].deselect(exampleList[j].getSelectedIndex()); } displayImage.updateAndDraw(); }
/** * Select a list and deselect the others * * @param e item event (originated by a list) * @param i list index */ void listSelected(final ItemEvent e, final int i) { // find the right slice of the corresponding ROI win.drawExamples(); displayImage.setColor(Color.YELLOW); for(int j = 0; j < wekaSegmentation.getNumOfClasses(); j++) { if (j == i) { final Roi newRoi = wekaSegmentation.getExamples(i, displayImage.getCurrentSlice()) .get(exampleList[i].getSelectedIndex()); // Set selected trace as current ROI newRoi.setImage(displayImage); displayImage.setRoi(newRoi); } else exampleList[j].deselect(exampleList[j].getSelectedIndex()); } displayImage.updateAndDraw(); }
else { c = Toolbar.getForegroundColor(); imp.setColor(c);
else { c = Toolbar.getForegroundColor(); imp.setColor(c);
/** * Select a list and deselect the others * * @param e item event (originated by a list) * @param i list index */ void listSelected(final ItemEvent e, final int i) { // find the right slice of the corresponding ROI win.drawExamples(); displayImage.setColor(Color.YELLOW); for(int j = 0; j < wekaSegmentation.getNumOfClasses(); j++) { if (j == i) { final Roi newRoi = wekaSegmentation.getExamples(i, displayImage.getCurrentSlice()) .get(exampleList[i].getSelectedIndex()); // Set selected trace as current ROI newRoi.setImage(displayImage); displayImage.setRoi(newRoi); } else exampleList[j].deselect(exampleList[j].getSelectedIndex()); } displayImage.updateAndDraw(); }
getMask(); ip.reset(ip.getMask()); } setColor(Toolbar.getForegroundColor()); Undo.setup(Undo.FILTER, this); updateAndDraw();
getMask(); ip.reset(ip.getMask()); } setColor(Toolbar.getForegroundColor()); Undo.setup(Undo.FILTER, this); updateAndDraw();