Commit bc39d8fb1c887cb3e7aac1c0e2cb964a0f030686

Authored by Elodie Bourrec
1 parent d684cfd2
Exists in master

Re activate object highlightening on image when selected in table.

De-activate image move to center the obect on view.
Export version 3.5
bin/Osp_Editor_3.5.jar 0 → 100644
No preview for this file type
src/osp/ui/OSPE_AboutBoxPanel.java
... ... @@ -23,7 +23,7 @@ public class OSPE_AboutBoxPanel extends JDialog {
23 23 /** Product name */
24 24 private String product = "OSP Editor";
25 25 /** Current version */
26   - private String version = "version 3.4 - August 2020";
  26 + private String version = "version 3.5 - November 2020";
27 27 /** Copyright information */
28 28 private String copyright = "Copyright (c)";
29 29 /** Comments */
... ...
src/osp/ui/OSPE_VisuPanel.java
... ... @@ -3764,18 +3764,22 @@ public class OSPE_VisuPanel extends JPanel implements Observer,
3764 3764 {
3765 3765 objChoosen.setPointed(false);
3766 3766 tableurPanel.razTableSelect();
3767   - if (fov.getCurrentImage().getSelectedMask()>=0)
3768   - {
3769   - newOrig = new Point2D.Double(0.0,0.0);
3770   - newOrig = new Point2D.Double(fov.getCurrentMaskOfCurrentImage().getCenter().x, fov.getCurrentMaskOfCurrentImage().getCenter().y);
3771   - icc.userToCanvasCoords(newOrig, false);
3772   - }
3773   - else
3774   - {
3775   - // set display center at bary point
3776   - newOrig.setLocation(fov.getTheBrain().getBary().x, fov.getTheBrain().getBary().y);
3777   - icc.imageToCanvasCoords(newOrig, false);
3778   - }
  3767 +
  3768 + // Pb when moving the image to center on object choosen. The zoom part is not part of calculation.
  3769 + // See if it's useful to have this function or not.
  3770 +
  3771 +// if (fov.getCurrentImage().getSelectedMask()>=0)
  3772 +// {
  3773 +// newOrig = new Point2D.Double(0.0,0.0);
  3774 +// newOrig = new Point2D.Double(fov.getCurrentMaskOfCurrentImage().getCenter().x, fov.getCurrentMaskOfCurrentImage().getCenter().y);
  3775 +// icc.userToCanvasCoords(newOrig, false);
  3776 +// }
  3777 +// else
  3778 +// {
  3779 +// // set display center at bary point
  3780 +// newOrig.setLocation(fov.getTheBrain().getBary().x, fov.getTheBrain().getBary().y);
  3781 +// icc.imageToCanvasCoords(newOrig, false);
  3782 +// }
3779 3783  
3780 3784 }
3781 3785 else objChoosen.setPointed(true);
... ... @@ -3789,11 +3793,11 @@ public class OSPE_VisuPanel extends JPanel implements Observer,
3789 3793 }
3790 3794 idLastObjChoosen=idObjChoosen;
3791 3795 //System.out.println(" chg Last id "+idLastObjChoosen);
3792   - WorldCoords wc=objChoosen.getObjWorldCenter();
3793   - newOrig = new Point2D.Double(wc.getX(), wc.getY());
3794   - icc.worldToCanvasCoords(newOrig, false);
  3796 +// WorldCoords wc=objChoosen.getObjWorldCenter();
  3797 +// newOrig = new Point2D.Double(wc.getX(), wc.getY());
  3798 +// icc.worldToCanvasCoords(newOrig, false);
3795 3799 }
3796   - fov.getCurrentImage().setCenter(newOrig);
  3800 + // fov.getCurrentImage().setCenter(newOrig);
3797 3801 fov.getCurrentImage().update();
3798 3802 eraseAllObjects();
3799 3803 plotAllObjects();
... ...
src/osp/utils/TableurPanel.java
... ... @@ -98,8 +98,16 @@ public class TableurPanel extends JPanel implements Observer {
98 98 public void mouseClicked(MouseEvent e) {
99 99 // TODO Auto-generated method stub
100 100 int a = table.getSelectedRow();
  101 +// int colSlit=4; // slit col num in tableurModel
  102 +// int slit=99;
101 103 if (a>=0)
102 104 {
  105 + // try to higliht slit with object -- not in function
  106 +// String sl = table.getValueAt(a, colSlit).toString();
  107 +// if (!sl.contentEquals("none"))
  108 +// {
  109 +// Integer.parseInt(sl);
  110 +// }
103 111 getObject(a);
104 112 idRow=a;
105 113 table.changeSelection(a, 0, false, false);
... ... @@ -135,7 +143,7 @@ public class TableurPanel extends JPanel implements Observer {
135 143 private void getObject(int rowNb) {
136 144 // System.out.println("tabPan rowNb "+rowNb);
137 145  
138   -// visuPanel.setImageAtObjectPosition(rowNb);
  146 + visuPanel.setImageAtObjectPosition(rowNb);
139 147  
140 148 }
141 149  
... ...