Esempio n. 1
0
 public void toggleShowMeasurements() {
   if (showMeasurements.isSelected()) {
     measurements.setStructures(currentNucId, currentStructureIdx);
     measurements.setObjects(list.getSelectedValues());
     this.container.add(measurements);
   } else this.container.remove(measurements);
   core.refreshDisplay();
 }
Esempio n. 2
0
 public void hide(boolean refresh) {
   container.remove(layout);
   if (showMeasurements.isSelected()) {
     container.remove(measurements);
     showMeasurements.setSelected(false);
   }
   if (refresh) core.refreshDisplay();
 }
Esempio n. 3
0
 private void setSortKeys() {
   if (currentChannels != null && currentChannels.length == 1) {
     MeasurementKey mkey =
         new MeasurementKey(new int[] {currentChannels[0].getIdx()}, MeasurementObject.Number);
     System.out.println("Query:" + mkey.toString());
     ((ObjectManagerLayout) layout).setKeys(Core.getExperiment().getKeys().get(mkey));
   } else {
     ((ObjectManagerLayout) layout).unableSortKeys();
   }
 }
Esempio n. 4
0
 private void sort(String key, Object3DGui[] objectsGui, int structureIdx) {
   Object3DGui.setAscendingOrger(((ObjectManagerLayout) layout).getAscendingOrder());
   HashMap<Integer, BasicDBObject> objects =
       Core.getExperiment().getConnector().getObjects(currentNucId, structureIdx);
   boolean notFound = false;
   for (Object3DGui o : objectsGui) {
     BasicDBObject dbo = objects.get(o.getLabel());
     if (dbo != null) {
       if (dbo.containsField(key)) o.setValue(dbo.getDouble(key));
       else {
         o.setValue(-1);
         notFound = true;
       }
     }
   }
   if (notFound)
     ij.IJ.log("Warning measurement: " + key + " not found for one or several objects");
   Arrays.sort(objectsGui);
 }
Esempio n. 5
0
 public void show(boolean refresh) {
   container.add(layout);
   if (refresh) core.refreshDisplay();
 }