Commit e50d63dd4f5e081d9a115158b18a4b9ca4974137

Authored by Elodie Bourrec
1 parent 7dd4dc3d
Exists in master

Image : Change name to "prop".

SkyObject : add variations about color with priority
Reader / Writer/ Mask : modifications about UUID Only generated when writing file mask.
Visu : displaying objects with priorities colors.
src/osp/Image.java
@@ -698,21 +698,21 @@ System.out.println("Im 247 cat : "+cat); @@ -698,21 +698,21 @@ System.out.println("Im 247 cat : "+cat);
698 * Used to create a new object when using a manual selection-clic on image 698 * Used to create a new object when using a manual selection-clic on image
699 * Or when loaded by local catalog or from a server. 699 * Or when loaded by local catalog or from a server.
700 * @param isRef : true if the object is a reference. 700 * @param isRef : true if the object is a reference.
701 - * @param from : Where the object has been obtained. "Cat : catalog, Loc : Local catalog, Sel: Manual selection"  
702 - * @param fromLib : Libelle of where the object comes from 701 + * @param f : load catalog number.
  702 + * @param props : <String> List of properties when local cat, or catalog name when download from server.
703 * @param pos : Position of the object. 703 * @param pos : Position of the object.
704 * @param wcObject : Object world coordinates in J2000 704 * @param wcObject : Object world coordinates in J2000
705 * @param priority : Object priority 705 * @param priority : Object priority
706 */ 706 */
707 // public void addObject(int id, boolean isRef, int f, String from, Point2D.Double pos, WorldCoords wcObject, int prior) { 707 // public void addObject(int id, boolean isRef, int f, String from, Point2D.Double pos, WorldCoords wcObject, int prior) {
708 - public void addObject(String id, boolean isRef, int f, String from, Point2D.Double pos, WorldCoords wcObject, int prior) { 708 + public void addObject(String id, boolean isRef, int f, String props, Point2D.Double pos, WorldCoords wcObject, int prior) {
709 709
710 //System.out.println(" Image addObj 2 "+id); 710 //System.out.println(" Image addObj 2 "+id);
711 711
712 // if (id==-1) id=listObjects.size(); 712 // if (id==-1) id=listObjects.size();
713 713
714 if (id=="-1") id=String.valueOf(listObjects.size()); 714 if (id=="-1") id=String.valueOf(listObjects.size());
715 - listObjects.add(new SkyObject(id, listObjects.size(), isRef, f, from, pos, wcObject,prior)); 715 + listObjects.add(new SkyObject(id, listObjects.size(), isRef, f, props, pos, wcObject,prior));
716 } 716 }
717 717
718 /** 718 /**
src/osp/Mask.java
@@ -197,7 +197,7 @@ public class Mask extends Observable implements MaskInterface, Observer { @@ -197,7 +197,7 @@ public class Mask extends Observable implements MaskInterface, Observer {
197 leftCornerDeg = new Point2D.Double(); 197 leftCornerDeg = new Point2D.Double();
198 validated = false; 198 validated = false;
199 setOrientation(0.0); 199 setOrientation(0.0);
200 - setM_uuid(); 200 + // setM_uuid();
201 history = new MaskHistory(this); 201 history = new MaskHistory(this);
202 } 202 }
203 /** 203 /**
src/osp/Reader.java
@@ -200,11 +200,11 @@ public class Reader { @@ -200,11 +200,11 @@ public class Reader {
200 200
201 try { 201 try {
202 202
203 - if (maskElement.getChild("maskUUID")!= null)  
204 - {  
205 - m_uuid=maskElement.getChild("maskUUID").getText();;  
206 - }  
207 - else m_uuid="N/A"; 203 +// if (maskElement.getChild("maskUUID")!= null)
  204 +// {
  205 +// m_uuid=maskElement.getChild("maskUUID").getText();;
  206 +// }
  207 +// else m_uuid="N/A";
208 //System.out.println("Reader loadMask UUID = "+m_uuid); 208 //System.out.println("Reader loadMask UUID = "+m_uuid);
209 209
210 maskCenter.x = Double.parseDouble(maskElement.getChild("center").getChild("x").getValue()); 210 maskCenter.x = Double.parseDouble(maskElement.getChild("center").getChild("x").getValue());
@@ -248,8 +248,8 @@ public class Reader { @@ -248,8 +248,8 @@ public class Reader {
248 currentMask.addObserver(pater.getVisuPanel()); 248 currentMask.addObserver(pater.getVisuPanel());
249 currentMask.addObserver(pater.getSelectPanel()); 249 currentMask.addObserver(pater.getSelectPanel());
250 currentMask.addObserver(pater.getOspeControl()); 250 currentMask.addObserver(pater.getOspeControl());
251 - if (m_uuid.equals("N/A")) currentMask.setM_uuid();  
252 - else currentMask.set_uuid_fromF(m_uuid); 251 +// if (m_uuid.equals("N/A")) currentMask.setM_uuid();
  252 +// else currentMask.set_uuid_fromF(m_uuid);
253 } 253 }
254 } 254 }
255 return noError; 255 return noError;
@@ -853,8 +853,8 @@ public class Reader { @@ -853,8 +853,8 @@ public class Reader {
853 currentImage.addMask(maskCenterConv); 853 currentImage.addMask(maskCenterConv);
854 854
855 Mask currentMask = currentImage.getCurrentMask(); 855 Mask currentMask = currentImage.getCurrentMask();
856 - if (m_uuid.equals("N/A")) currentMask.setM_uuid();  
857 - else currentMask.set_uuid_fromF(m_uuid); 856 +// if (m_uuid.equals("N/A")) currentMask.setM_uuid();
  857 +// else currentMask.set_uuid_fromF(m_uuid);
858 858
859 currentMask.setCenterWc(maskAlpha, maskDelta); 859 currentMask.setCenterWc(maskAlpha, maskDelta);
860 currentMask.setOmega(maskAngle); 860 currentMask.setOmega(maskAngle);
src/osp/SkyObject.java
@@ -56,20 +56,27 @@ public class SkyObject @@ -56,20 +56,27 @@ public class SkyObject
56 * @param iR true if the object is a reference object, false otherwise 56 * @param iR true if the object is a reference object, false otherwise
57 * @param p Center of the object (in image coordinates) 57 * @param p Center of the object (in image coordinates)
58 * @param pRecalc Center of the object once recalculated (in image coordinates) 58 * @param pRecalc Center of the object once recalculated (in image coordinates)
  59 + * @param c Color following priority.
59 */ 60 */
60 - public SkyObject(int n, boolean iR, Point2D.Double p, Point2D.Double pRecalc) 61 + public SkyObject(int n, boolean iR, Point2D.Double p, Point2D.Double pRecalc, Color c)
61 { 62 {
62 // System.out.print("SkyObj 1 "+n+" "); 63 // System.out.print("SkyObj 1 "+n+" ");
63 numIm = n; 64 numIm = n;
64 - isRef = iR; 65 + isRef = iR;
  66 +
65 posPix = new Point2D.Double(); 67 posPix = new Point2D.Double();
66 setPosPix(p); 68 setPosPix(p);
67 - setPosPixRecalc(pRecalc);  
68 - Color c=Color.BLUE;  
69 - if (pRecalc!= null)  
70 - c=Color.green; 69 +
  70 +// if (pRecalc!= null)
  71 +// {
  72 +// System.out.println("SkyObj - pRecal "+pRecalc.getX()+" "+pRecalc.getY());
  73 +// setPosPixRecalc(pRecalc);
  74 +// c=Color.green;
  75 +// }
  76 +
71 if (isRef )c=Color.red; 77 if (isRef )c=Color.red;
72 - setColor(c); 78 + // System.out.println("SkyObj -"+n+" const temp color "+c.toString());
  79 + this.setColor(c);
73 // WorldCoords coords = new WorldCoords(wc.getRA(),wc.getDec()); 80 // WorldCoords coords = new WorldCoords(wc.getRA(),wc.getDec());
74 // setObjWorldCenter(coords); 81 // setObjWorldCenter(coords);
75 // setObjWorldRecalc(coords); 82 // setObjWorldRecalc(coords);
@@ -83,15 +90,15 @@ public class SkyObject @@ -83,15 +90,15 @@ public class SkyObject
83 * @param id Object id from a project or a catalog 90 * @param id Object id from a project or a catalog
84 * @param n Object number in project 91 * @param n Object number in project
85 * @param iR true if the object is a reference object, false otherwise 92 * @param iR true if the object is a reference object, false otherwise
86 - * @param f nbCat : number of catalogs loaded  
87 - * @param fr from Origin catalog. 93 + * @param fi nbCat : number of catalogs loaded
  94 + * @param props Object Properties/catalog name/ ...
88 * @param p Center of the object (in canvas coordinates) 95 * @param p Center of the object (in canvas coordinates)
89 * @param wc Object world coordinates in J2000 96 * @param wc Object world coordinates in J2000
90 * @param prior Object priority 97 * @param prior Object priority
91 */ 98 */
92 99
93 // public SkyObject(int idO, int n, boolean iR, int fi, String fr, Point2D.Double p, WorldCoords wc, int prior) 100 // public SkyObject(int idO, int n, boolean iR, int fi, String fr, Point2D.Double p, WorldCoords wc, int prior)
94 - public SkyObject(String idO, int n, boolean iR, int fi, String fr, Point2D.Double p, WorldCoords wc, int prior) 101 + public SkyObject(String idO, int n, boolean iR, int fi, String props, Point2D.Double p, WorldCoords wc, int prior)
95 102
96 { 103 {
97 //System.out.println(" SkyObj 2 num "+n+" id "+idO); 104 //System.out.println(" SkyObj 2 num "+n+" id "+idO);
@@ -99,7 +106,7 @@ public class SkyObject @@ -99,7 +106,7 @@ public class SkyObject
99 numIm=n; 106 numIm=n;
100 isRef = iR; 107 isRef = iR;
101 group=fi; 108 group=fi;
102 - prop=fr; 109 + prop=props;
103 posPix = new Point2D.Double(); 110 posPix = new Point2D.Double();
104 setPosPix(p); 111 setPosPix(p);
105 posPixRecalc = null; 112 posPixRecalc = null;
@@ -107,8 +114,24 @@ public class SkyObject @@ -107,8 +114,24 @@ public class SkyObject
107 objWorldRecalc=new WorldCoords(0,0); 114 objWorldRecalc=new WorldCoords(0,0);
108 priority = prior; 115 priority = prior;
109 Color c=Color.blue; 116 Color c=Color.blue;
110 - if (isRef )c=Color.red; 117 + switch (prior)
  118 + {
  119 + case 1:
  120 + c=Color.RED;
  121 + break;
  122 + case 2:
  123 + c=Color.WHITE;
  124 + break;
  125 + default:
  126 + c=Color.BLUE;
  127 + break;
  128 + }
  129 +
  130 + if (isRef )c=Color.RED;
  131 +
111 setColor(c); 132 setColor(c);
  133 +
  134 + // System.out.println("SkyObj - "+n+ " const Norm color "+c.toString());
112 } 135 }
113 136
114 137
@@ -249,9 +272,14 @@ public class SkyObject @@ -249,9 +272,14 @@ public class SkyObject
249 */ 272 */
250 public boolean isCenterRecalc () 273 public boolean isCenterRecalc ()
251 { 274 {
252 - Color c = new Color(0, 255, 0);  
253 - this.setColor(c);  
254 - return posPixRecalc != null; 275 + boolean err=false;
  276 + if (posPixRecalc != null)
  277 + {
  278 + Color c = new Color(0, 255, 0);
  279 + this.setColor(c);
  280 + err=true;
  281 + }
  282 + return err;
255 283
256 } 284 }
257 285
@@ -284,6 +312,26 @@ public Color getColor() { @@ -284,6 +312,26 @@ public Color getColor() {
284 * Set the color the object will be drawn with 312 * Set the color the object will be drawn with
285 * @param col : color 313 * @param col : color
286 */ 314 */
  315 +public void setColorWithPriority(int p) {
  316 +Color c;
  317 + switch (p)
  318 + {
  319 + case 1:
  320 + c=Color.RED;
  321 + break;
  322 + case 2:
  323 + c=Color.WHITE;
  324 + break;
  325 + default:
  326 + c=Color.BLUE;
  327 + break;
  328 + }
  329 + this.col=c;
  330 +}
  331 +/**
  332 + * Set the color the object will be drawn with
  333 + * @param col : color
  334 + */
287 public void setColor(Color col) { 335 public void setColor(Color col) {
288 this.col = col; 336 this.col = col;
289 } 337 }
src/osp/Writer.java
@@ -274,6 +274,10 @@ public class Writer { @@ -274,6 +274,10 @@ public class Writer {
274 Attribute selectedSlit = new Attribute("selectedSlit", String.valueOf(m.getSelectedSlit())); 274 Attribute selectedSlit = new Attribute("selectedSlit", String.valueOf(m.getSelectedSlit()));
275 e_mask.setAttribute(selectedSlit); 275 e_mask.setAttribute(selectedSlit);
276 276
  277 +
  278 + String mUUID=m.getS_uuid();
  279 + if (mUUID.isEmpty()) m.setM_uuid();
  280 +
277 Element e_maskUUID = new Element("maskUUID"); 281 Element e_maskUUID = new Element("maskUUID");
278 e_maskUUID.setText(m.getS_uuid()); 282 e_maskUUID.setText(m.getS_uuid());
279 e_mask.addContent(e_maskUUID); 283 e_mask.addContent(e_maskUUID);
@@ -347,9 +351,9 @@ public class Writer { @@ -347,9 +351,9 @@ public class Writer {
347 Attribute selectedSlit = new Attribute("selectedSlit", String.valueOf(m.getSelectedSlit())); 351 Attribute selectedSlit = new Attribute("selectedSlit", String.valueOf(m.getSelectedSlit()));
348 e_mask.setAttribute(selectedSlit); 352 e_mask.setAttribute(selectedSlit);
349 353
350 - Element e_maskUUID = new Element("maskUUID");  
351 - e_maskUUID.setText(m.getS_uuid());  
352 - e_mask.addContent(e_maskUUID); 354 +// Element e_maskUUID = new Element("maskUUID");
  355 +// e_maskUUID.setText(m.getS_uuid());
  356 +// e_mask.addContent(e_maskUUID);
353 357
354 // Mask properties in the image selected 358 // Mask properties in the image selected
355 /** Mask coordinates RA - DEC */ 359 /** Mask coordinates RA - DEC */
src/osp/ui/OSPE_VisuPanel.java
@@ -901,8 +901,9 @@ public class OSPE_VisuPanel extends JPanel implements Observer, @@ -901,8 +901,9 @@ public class OSPE_VisuPanel extends JPanel implements Observer,
901 { 901 {
902 SkyObject sk = fov.getCurrentImage().getListObjects().get(numObj); 902 SkyObject sk = fov.getCurrentImage().getListObjects().get(numObj);
903 sk.setPosPixRecalc(null); 903 sk.setPosPixRecalc(null);
904 - String src=sk.getSrc().replace(" (R)", "");  
905 - sk.setSrc(src); 904 + sk.setColorWithPriority(sk.getPriority());
  905 +// String src=sk.getSrc().replace(" (R)", "");
  906 +// sk.setSrc(src);
906 updateByHand(); 907 updateByHand();
907 //updateByHand("V revert cent"); 908 //updateByHand("V revert cent");
908 909
@@ -2289,7 +2290,8 @@ public class OSPE_VisuPanel extends JPanel implements Observer, @@ -2289,7 +2290,8 @@ public class OSPE_VisuPanel extends JPanel implements Observer,
2289 pos = positonCalcul(sk.getPosition()); 2290 pos = positonCalcul(sk.getPosition());
2290 2291
2291 sk.setPosPixRecalc(pos); 2292 sk.setPosPixRecalc(pos);
2292 - 2293 + sk.setColor(Color.GREEN);
  2294 +
2293 icc.imageToCanvasCoords(pos, false); 2295 icc.imageToCanvasCoords(pos, false);
2294 2296
2295 sk.setObjWorldRecalc(getWorldCoords(pos.getX(), pos.getY())); 2297 sk.setObjWorldRecalc(getWorldCoords(pos.getX(), pos.getY()));
@@ -2297,12 +2299,14 @@ public class OSPE_VisuPanel extends JPanel implements Observer, @@ -2297,12 +2299,14 @@ public class OSPE_VisuPanel extends JPanel implements Observer,
2297 /** 2299 /**
2298 * Information that the object center has been recalculated 2300 * Information that the object center has been recalculated
2299 */ 2301 */
2300 - if (!sk.getSrc().endsWith("(R)"))  
2301 - {  
2302 - String src=sk.getSrc();  
2303 - sk.setSrc(src + " (R)");  
2304 - }  
2305 - 2302 +// String src="";
  2303 +// if (!sk.getSrc().isEmpty()) src=sk.getSrc();
  2304 +//
  2305 +// if (!sk.getSrc().endsWith("(R)"))
  2306 +// {
  2307 +// sk.setSrc(src + " (R)");
  2308 +// }
  2309 +//
2306 /** 2310 /**
2307 * Update object position in the image associated List, when affected to a slit. 2311 * Update object position in the image associated List, when affected to a slit.
2308 */ 2312 */
@@ -2475,7 +2479,8 @@ public class OSPE_VisuPanel extends JPanel implements Observer, @@ -2475,7 +2479,8 @@ public class OSPE_VisuPanel extends JPanel implements Observer,
2475 SkyObject sk = fov.getCurrentImage().getListObjects().get(i); 2479 SkyObject sk = fov.getCurrentImage().getListObjects().get(i);
2476 //System.out.print(("visu Plot Obj"+sk.getNum()+" -")); 2480 //System.out.print(("visu Plot Obj"+sk.getNum()+" -"));
2477 2481
2478 - SkyObject tempObject = new SkyObject(-1, sk.isRef(), sk.getPosPix(), sk.getPosPixRecalc()); 2482 + SkyObject tempObject = new SkyObject(-1, sk.isRef(), sk.getPosPix(), sk.getPosPixRecalc(),sk.getColor());
  2483 +
2479 2484
2480 //SkyObject tempObject = new SkyObject(-1, sk.isRef(), sk.getSrc(), sk.getCatLibFrom(), sk.getPosPix(), 2485 //SkyObject tempObject = new SkyObject(-1, sk.isRef(), sk.getSrc(), sk.getCatLibFrom(), sk.getPosPix(),
2481 // sk.getObjWorldCenter(), sk.getPosPixRecalc(), sk.getPriority()); 2486 // sk.getObjWorldCenter(), sk.getPosPixRecalc(), sk.getPriority());
@@ -2503,30 +2508,31 @@ public class OSPE_VisuPanel extends JPanel implements Observer, @@ -2503,30 +2508,31 @@ public class OSPE_VisuPanel extends JPanel implements Observer,
2503 */ 2508 */
2504 private void drawSquareAroundObject(int i, SkyObject tempObject) { 2509 private void drawSquareAroundObject(int i, SkyObject tempObject) {
2505 2510
2506 - Color c=tempObject.getColor(); 2511 + Color cl=tempObject.getColor();
  2512 +//System.out.println("Visu DrawSqObj - "+i+" color "+cl.toString());
2507 2513
2508 listCanvasObjects1.add(divaImageGraphics.makeFigure( 2514 listCanvasObjects1.add(divaImageGraphics.makeFigure(
2509 new Line2D.Double(tempObject.getPosition().x - 5, 2515 new Line2D.Double(tempObject.getPosition().x - 5,
2510 tempObject.getPosition().y - 5, tempObject.getPosition().x + 5, 2516 tempObject.getPosition().y - 5, tempObject.getPosition().x + 5,
2511 - tempObject.getPosition().y - 5), c, c, lWidth)); 2517 + tempObject.getPosition().y - 5), cl, cl, lWidth));
2512 divaImageGraphics.add(listCanvasObjects1.get(i)); 2518 divaImageGraphics.add(listCanvasObjects1.get(i));
2513 2519
2514 listCanvasObjects2.add(divaImageGraphics.makeFigure( 2520 listCanvasObjects2.add(divaImageGraphics.makeFigure(
2515 new Line2D.Double(tempObject.getPosition().x + 5, 2521 new Line2D.Double(tempObject.getPosition().x + 5,
2516 tempObject.getPosition().y - 5, tempObject.getPosition().x + 5, 2522 tempObject.getPosition().y - 5, tempObject.getPosition().x + 5,
2517 - tempObject.getPosition().y + 5), c, c, lWidth)); 2523 + tempObject.getPosition().y + 5), cl, cl, lWidth));
2518 divaImageGraphics.add(listCanvasObjects2.get(i)); 2524 divaImageGraphics.add(listCanvasObjects2.get(i));
2519 2525
2520 listCanvasObjects3.add(divaImageGraphics.makeFigure( 2526 listCanvasObjects3.add(divaImageGraphics.makeFigure(
2521 new Line2D.Double(tempObject.getPosition().x + 5, 2527 new Line2D.Double(tempObject.getPosition().x + 5,
2522 tempObject.getPosition().y + 5, tempObject.getPosition().x - 5, 2528 tempObject.getPosition().y + 5, tempObject.getPosition().x - 5,
2523 - tempObject.getPosition().y + 5), c, c, lWidth)); 2529 + tempObject.getPosition().y + 5), cl, cl, lWidth));
2524 divaImageGraphics.add(listCanvasObjects3.get(i)); 2530 divaImageGraphics.add(listCanvasObjects3.get(i));
2525 2531
2526 listCanvasObjects4.add(divaImageGraphics.makeFigure( 2532 listCanvasObjects4.add(divaImageGraphics.makeFigure(
2527 new Line2D.Double(tempObject.getPosition().x - 5, 2533 new Line2D.Double(tempObject.getPosition().x - 5,
2528 tempObject.getPosition().y + 5, tempObject.getPosition().x - 5, 2534 tempObject.getPosition().y + 5, tempObject.getPosition().x - 5,
2529 - tempObject.getPosition().y - 5), c, c, lWidth)); 2535 + tempObject.getPosition().y - 5), cl, cl, lWidth));
2530 divaImageGraphics.add(listCanvasObjects4.get(i)); 2536 divaImageGraphics.add(listCanvasObjects4.get(i));
2531 } 2537 }
2532 2538
@@ -2538,25 +2544,25 @@ public class OSPE_VisuPanel extends JPanel implements Observer, @@ -2538,25 +2544,25 @@ public class OSPE_VisuPanel extends JPanel implements Observer,
2538 */ 2544 */
2539 private void drawCrossOnObject(int i, SkyObject tempObject) { 2545 private void drawCrossOnObject(int i, SkyObject tempObject) {
2540 Point2D.Double pt = new Point2D.Double(); 2546 Point2D.Double pt = new Point2D.Double();
2541 - Color c=tempObject.getColor(); 2547 + Color cl=tempObject.getColor();
2542 pt = tempObject.getPosition(); 2548 pt = tempObject.getPosition();
2543 2549
2544 // c = new Color(255, 0, 0); 2550 // c = new Color(255, 0, 0);
2545 2551
2546 listCanvasObjects1.add(divaImageGraphics.makeFigure(new Line2D.Double(pt.x, pt.y - 10, 2552 listCanvasObjects1.add(divaImageGraphics.makeFigure(new Line2D.Double(pt.x, pt.y - 10,
2547 - pt.x, pt.y + 10), c, c, lWidth)); 2553 + pt.x, pt.y + 10), cl, cl, lWidth));
2548 divaImageGraphics.add(listCanvasObjects1.get(i)); 2554 divaImageGraphics.add(listCanvasObjects1.get(i));
2549 2555
2550 listCanvasObjects2.add(divaImageGraphics.makeFigure(new Line2D.Double(pt.x - 10, pt.y, 2556 listCanvasObjects2.add(divaImageGraphics.makeFigure(new Line2D.Double(pt.x - 10, pt.y,
2551 - pt.x + 10, pt.y), c, c, lWidth)); 2557 + pt.x + 10, pt.y), cl, cl, lWidth));
2552 divaImageGraphics.add(listCanvasObjects2.get(i)); 2558 divaImageGraphics.add(listCanvasObjects2.get(i));
2553 2559
2554 listCanvasObjects3.add(divaImageGraphics.makeFigure(new Line2D.Double(pt.x, pt.y - 10, 2560 listCanvasObjects3.add(divaImageGraphics.makeFigure(new Line2D.Double(pt.x, pt.y - 10,
2555 - pt.x, pt.y + 10), c, c, lWidth)); 2561 + pt.x, pt.y + 10), cl, cl, lWidth));
2556 divaImageGraphics.add(listCanvasObjects3.get(i)); 2562 divaImageGraphics.add(listCanvasObjects3.get(i));
2557 2563
2558 listCanvasObjects4.add(divaImageGraphics.makeFigure(new Line2D.Double(pt.x - 10, pt.y, 2564 listCanvasObjects4.add(divaImageGraphics.makeFigure(new Line2D.Double(pt.x - 10, pt.y,
2559 - pt.x + 10, pt.y), c, c, lWidth)); 2565 + pt.x + 10, pt.y), cl, cl, lWidth));
2560 divaImageGraphics.add(listCanvasObjects4.get(i)); 2566 divaImageGraphics.add(listCanvasObjects4.get(i));
2561 2567
2562 } 2568 }
@@ -2629,7 +2635,7 @@ public class OSPE_VisuPanel extends JPanel implements Observer, @@ -2629,7 +2635,7 @@ public class OSPE_VisuPanel extends JPanel implements Observer,
2629 * Add an object on image 2635 * Add an object on image
2630 * 2636 *
2631 * @param type : type of the object (if it came from catalog, local cat or manually) 2637 * @param type : type of the object (if it came from catalog, local cat or manually)
2632 - * @param fromLib : Libelle of where it comes from (catalog name ...) 2638 + * @param props : Libelle of where it comes from (catalog name, ...) or properties when it come from local catalog
2633 * @param c : coordinates of the object in image coordinates.<br> 2639 * @param c : coordinates of the object in image coordinates.<br>
2634 * For the objects from catalog or from local import, 2640 * For the objects from catalog or from local import,
2635 * the position is converted from world to image. 2641 * the position is converted from world to image.
@@ -2640,7 +2646,7 @@ public class OSPE_VisuPanel extends JPanel implements Observer, @@ -2640,7 +2646,7 @@ public class OSPE_VisuPanel extends JPanel implements Observer,
2640 */ 2646 */
2641 2647
2642 // public void addObject(int id, int type,String fromLib, Point2D.Double c, int priority) { 2648 // public void addObject(int id, int type,String fromLib, Point2D.Double c, int priority) {
2643 - public void addObject(String id, int type,String fromLib, Point2D.Double c, int priority) { 2649 + public void addObject(String id, int type,String props, Point2D.Double c, int priority) {
2644 2650
2645 this.icc = new ImageCoordinateConverter(getNavigatorImageDisplay()); 2651 this.icc = new ImageCoordinateConverter(getNavigatorImageDisplay());
2646 WorldCoords wcoord; 2652 WorldCoords wcoord;
@@ -2677,7 +2683,7 @@ public class OSPE_VisuPanel extends JPanel implements Observer, @@ -2677,7 +2683,7 @@ public class OSPE_VisuPanel extends JPanel implements Observer,
2677 Image im=fov.getCurrentImage(); 2683 Image im=fov.getCurrentImage();
2678 2684
2679 //System.out.print ("Visu Addobj "+ im.getNbrObjects() ); 2685 //System.out.print ("Visu Addobj "+ im.getNbrObjects() );
2680 - fov.getCurrentImage().addObject(id,false, type, fromLib, c, wcoord, priority); 2686 + fov.getCurrentImage().addObject(id,false, type, props, c, wcoord, priority);
2681 fov.getCurrentImage().getLastObject().setObjWorldCenter(wcoord); 2687 fov.getCurrentImage().getLastObject().setObjWorldCenter(wcoord);
2682 2688
2683 fov.getTheBrain().computeBary(fov.getCurrentImage().getListObjects()); 2689 fov.getTheBrain().computeBary(fov.getCurrentImage().getListObjects());