Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
Renamed bar3 (toolbar 3) to termLookupBar, added accessionId attribute to Segmentatio...
authorpreecej <preecej@localhost>
Wed, 25 Jan 2012 22:34:24 +0000 (22:34 +0000)
committerpreecej <preecej@localhost>
Wed, 25 Jan 2012 22:34:24 +0000 (22:34 +0000)
svn path=/; revision=277

Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java
Annotation/src/ie/dcu/segment/SegmentationMask.java

index 2bc5cb4990ebdc89097805fa4e4f67b7f70ec6ee..6840180f226f589f21a502322a2b5a3877b8d3db 100644 (file)
@@ -46,7 +46,7 @@ public class SegmentationView extends Composite {
        
        
        // Left and right tool bar
-       private final ToolBar bar1, bar2, bar3;
+       private final ToolBar bar1, bar2, termLookupBar;
        
        // Control to change brush size
        private final BrushControl brushControl;
@@ -120,7 +120,7 @@ public class SegmentationView extends Composite {
                painters = new PainterRegistry();
                bar1 = new ToolBar(this, SWT.RIGHT | SWT.FLAT);
                bar2 = new ToolBar(this, SWT.RIGHT | SWT.FLAT);
-               bar3 = new ToolBar(this, SWT.RIGHT | SWT.FLAT);
+               termLookupBar = new ToolBar(this, SWT.RIGHT | SWT.FLAT);
                view = new AnnotatedImageControl(this, SWT.BORDER);
                brushControl = new BrushControl(getShell(), SWT.BORDER);
                eventHandler = new EventHandler();
@@ -137,7 +137,8 @@ public class SegmentationView extends Composite {
                initTools();
                createToolbar1();
                createToolbar2();
-               createToolbar3();
+               createToolTermLookupBar();
+               //createToolTermDetailPanel();
                layoutControls();
                updatePainters();
                addListeners();
@@ -202,19 +203,20 @@ public class SegmentationView extends Composite {
                });
                bar2.pack();
        }
+       
        /**
         * Third tool bar for holding the Annotate Combo box. 
         */
-       private void createToolbar3() {
-               SwtUtils.addLabel(bar3, getAction(Tool.SetLabel).getText());
-               comboLabel = SwtUtils.addCombo(bar3, 150, SWT.SIMPLE);
+       private void createToolTermLookupBar() {
+               SwtUtils.addLabel(termLookupBar, getAction(Tool.SetLabel).getText());
+               comboLabel = SwtUtils.addCombo(termLookupBar, 150, SWT.SIMPLE);
                comboLabel.setToolTipText( getAction(Tool.SetLabel).getToolTipText());
                comboLabel.addKeyListener(new KeyAdapter() {
                        public void keyReleased(KeyEvent e) {
                                dropdownLabels(e);
                        }
                });
-               assign = SwtUtils.addButton(bar3, 50, "Assign");
+               assign = SwtUtils.addButton(termLookupBar, 52, "Assign");
                assign.addSelectionListener(new SelectionAdapter() {
         public void widgetSelected(SelectionEvent arg0) {
                if(view.getContext().isEnabled())
@@ -222,6 +224,7 @@ public class SegmentationView extends Composite {
                        if(comboLabel.getText().indexOf('{') != -1)
                        {
                                view.getContext().getEnabledMask().segmentName = comboLabel.getText().substring(0,comboLabel.getText().indexOf('{')-1);
+                               view.getContext().getEnabledMask().accessionId = comboLabel.getText().substring(comboLabel.getText().indexOf('{')+1,comboLabel.getText().length()-1);
                        }
                        else
                        {
@@ -231,7 +234,7 @@ public class SegmentationView extends Composite {
                execute(Tool.AssignButton, null);
                }
                });
-               bar3.pack();
+               termLookupBar.pack();
        }
        
        /**
@@ -297,13 +300,13 @@ public class SegmentationView extends Composite {
                gd.verticalAlignment = SWT.FILL;
                view.setLayoutData(gd);
                
-               // Layout toolbar 3
+               // Layout right panel
                gd = new GridData();
                gd.horizontalAlignment = SWT.FILL;
                gd.verticalAlignment = GridData.BEGINNING;
                gd.verticalIndent = 1;
                gd.verticalSpan = 2;
-               bar3.setLayoutData(gd);
+               termLookupBar.setLayoutData(gd);
                
        }
        
index a8e9f8ee8d4636a846cb2a71657b8a5085219ba5..bc9c35ef1b038f63f034c389978ab0cb49e8d327 100644 (file)
@@ -60,6 +60,9 @@ public class SegmentationMask extends ByteMatrix{
        
        //The name(label) associated with each segment.
        public String segmentName;
+
+       // accession id associated with the segmentName
+       public String accessionId;
        
        //The maskImage each segment.
        public Image maskImage;
@@ -69,7 +72,7 @@ public class SegmentationMask extends ByteMatrix{
        
        //Whether the segment needs to be enabled(highlighted) or not ?
        public boolean enabled;
-       
+
        /**
         * Create a segmentation mask using the specified dimensions. All pixels in
         * the mask are initially set to {@link SegmentationMask#UNKNOWN}.