示例#1
0
  public SpotTool() {

    super();

    try {
      topSystem = PlottingFactory.createPlottingSystem();
      rightSystem = PlottingFactory.createPlottingSystem();
    } catch (Exception e) {
      logger.error("Cannot create plotting systems!", e);
    }
  }
 private void setColourMapChoicePreference(String value) {
   // update the preference
   getPreferenceStore().setValue(PreferenceConstants.IMAGEEXPLORER_COLOURMAP, value);
   IPlottingSystem system = PlottingFactory.getPlottingSystem(getPlaybackViewPreference());
   if (system == null) return;
   // update the palette data
   final Collection<ITrace> traces = system.getTraces();
   if (traces != null)
     for (ITrace trace : traces) {
       if (trace instanceof IPaletteTrace) {
         IPaletteTrace palette = (IPaletteTrace) trace;
         palette.setPalette(schemeName);
       }
     }
 }
示例#3
0
  /** Update the widget with the correct roi information */
  public void update() {
    this.plottingSystem = PlottingFactory.getPlottingSystem(viewName);
    if (plottingSystem != null) {
      Collection<IRegion> regions = plottingSystem.getRegions();
      if (regions.size() > 0) {
        IRegion region = (IRegion) regions.toArray()[0];
        if (roiViewer == null) createRegionComposite(regionComposite, region.getRegionType());
        roiViewer.setTableValues(region.getROI());

        if (nameText != null) nameText.setText(region.getName());
        regionName = region.getName();
        this.region = region;
        region.addROIListener(ROIWidget.this);
      }
    }
  }