Changeset 31078
- Timestamp:
- Mar 29, 2011, 11:04:25 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110213/Ohana/src
- Files:
-
- 7 edited
-
kapa2/src/SetImageData.c (modified) (1 diff)
-
libkapa/include/kapa.h (modified) (1 diff)
-
libkapa/src/KiiPicture.c (modified) (1 diff)
-
opihi/cmd.data/densify.c (modified) (3 diffs)
-
opihi/cmd.data/limits.c (modified) (3 diffs)
-
opihi/lib.data/graphtools.c (modified) (2 diffs)
-
opihi/lib.shell/VectorOps.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/Ohana/src/kapa2/src/SetImageData.c
r27435 r31078 128 128 Picture_to_Image (&Xmax, &Ymax, image[0].picture.dx, image[0].picture.dy, &image[0].picture); 129 129 130 KiiSendMessage (sock, "%g %g %g %g ", Xmin, Xmax, Ymin, Ymax);130 KiiSendMessage (sock, "%g %g %g %g %d %d", Xmin, Xmax, Ymin, Ymax, image[0].picture.dx, image[0].picture.dy); 131 131 132 132 return (TRUE); -
branches/eam_branches/ipp-20110213/Ohana/src/libkapa/include/kapa.h
r30889 r31078 154 154 int KapaSetImageCoords (int fd, Coords *coords); 155 155 int KapaGetImageCoords (int fd, Coords *coords); 156 int KapaGetImageRange (int fd, double *Xmin, double *Xmax, double *Ymin, double *Ymax );156 int KapaGetImageRange (int fd, double *Xmin, double *Xmax, double *Ymin, double *Ymax, int *dX, int *dY); 157 157 158 158 /* KiiOverlay.c */ -
branches/eam_branches/ipp-20110213/Ohana/src/libkapa/src/KiiPicture.c
r27761 r31078 203 203 } 204 204 205 int KapaGetImageRange (int fd, double *Xmin, double *Xmax, double *Ymin, double *Ymax ) {205 int KapaGetImageRange (int fd, double *Xmin, double *Xmax, double *Ymin, double *Ymax, int *dX, int *dY) { 206 206 207 207 /* tell kapa to look for the incoming image */ 208 208 KiiSendCommand (fd, 4, "GIMR"); 209 209 210 KiiScanMessage (fd, "%lf %lf %lf %lf ", Xmin, Xmax, Ymin, Ymax);210 KiiScanMessage (fd, "%lf %lf %lf %lf %d %d", Xmin, Xmax, Ymin, Ymax, dX, dY); 211 211 212 212 KiiWaitAnswer (fd, "DONE"); -
branches/eam_branches/ipp-20110213/Ohana/src/opihi/cmd.data/densify.c
r29938 r31078 1 1 # include "data.h" 2 3 # define CHECKVAL(ARG) if (!isfinite(ARG)) { gprint (GP_ERR, "illegal value for %s: %f\n", #ARG, ARG); return (FALSE); } 2 4 3 5 int densify (int argc, char **argv) { 4 6 5 int i, Nx, Ny, Xb, Yb, Normalize, N ;6 floatXmin, Xmax, dX, Ymin, Ymax, dY;7 int i, Nx, Ny, Xb, Yb, Normalize, N, Xpix, Ypix, good, UseGraph; 8 double Xmin, Xmax, dX, Ymin, Ymax, dY; 7 9 float *val; 8 10 Buffer *bf; … … 16 18 } 17 19 18 if (argc != 10) { 20 UseGraph = FALSE; 21 if ((N = get_argument (argc, argv, "-graph"))) { 22 remove_argument (N, &argc, argv); 23 UseGraph = TRUE; 24 } 25 26 good = UseGraph ? (argc == 4) : (argc == 10); 27 if (!good) { 19 28 gprint (GP_ERR, "USAGE: densify buffer x y Xmin Xmax dX Ymin Ymax dY\n"); 29 gprint (GP_ERR, " OR: densify buffer x y -graph\n"); 20 30 return (FALSE); 21 31 } … … 30 40 REQUIRE_VECTOR_FLT (vy, FALSE); 31 41 32 Xmin = atof (argv[4]); 33 Xmax = atof (argv[5]); 34 dX = atof (argv[6]); 42 if (UseGraph) { 43 int kapa; 44 Graphdata graphmode; 45 if (!GetGraph (&graphmode, &kapa, NULL)) return (FALSE); 46 KapaGetImageRange (kapa, &Xmin, &Xmax, &Ymax, &Ymin, &Xpix, &Ypix); 47 Xmax = graphmode.xmax; 48 Xmin = graphmode.xmin; 49 Ymax = graphmode.ymax; 50 Ymin = graphmode.ymin; 51 dX = (Xmax - Xmin) / (Xpix - 1); 52 dY = (Ymax - Ymin) / (Ypix - 1); 53 } else { 54 Xmin = atof (argv[4]); 55 Xmax = atof (argv[5]); 56 dX = atof (argv[6]); 35 57 36 Ymin = atof (argv[7]); 37 Ymax = atof (argv[8]); 38 dY = atof (argv[9]); 58 Ymin = atof (argv[7]); 59 Ymax = atof (argv[8]); 60 dY = atof (argv[9]); 61 } 62 63 CHECKVAL(Xmin); 64 CHECKVAL(Xmax); 65 CHECKVAL(dX); 66 67 CHECKVAL(Ymin); 68 CHECKVAL(Ymax); 69 CHECKVAL(dY); 39 70 40 71 Nx = (Xmax - Xmin) / dX + 1; -
branches/eam_branches/ipp-20110213/Ohana/src/opihi/cmd.data/limits.c
r30610 r31078 3 3 int limits (int argc, char **argv) { 4 4 5 int N, APPLY ;5 int N, APPLY, dX, dY; 6 6 int kapa; 7 7 char *name; … … 28 28 if ((N = get_argument (argc, argv, "-image"))) { 29 29 remove_argument (N, &argc, argv); 30 KapaGetImageRange (kapa, &graphmode.xmin, &graphmode.xmax, &graphmode.ymax, &graphmode.ymin );30 KapaGetImageRange (kapa, &graphmode.xmin, &graphmode.xmax, &graphmode.ymax, &graphmode.ymin, &dX, &dY); 31 31 32 32 set_variable ("XMIN", graphmode.xmin); … … 34 34 set_variable ("YMIN", graphmode.ymin); 35 35 set_variable ("YMAX", graphmode.ymax); 36 37 set_variable ("KAPA_XMIN", graphmode.xmin); 38 set_variable ("KAPA_XMAX", graphmode.xmax); 39 set_variable ("KAPA_YMIN", graphmode.ymin); 40 set_variable ("KAPA_YMAX", graphmode.ymax); 41 42 set_variable ("KAPA_XPIX", dX); 43 set_variable ("KAPA_YPIX", dY); 36 44 37 45 // if (!NoClear) KapaClearSections (kapa); -
branches/eam_branches/ipp-20110213/Ohana/src/opihi/lib.data/graphtools.c
r20936 r31078 59 59 set_variable ("YMIN", graphmode[0].ymin); 60 60 set_variable ("YMAX", graphmode[0].ymax); 61 62 set_variable ("KAPA_XMIN", graphmode[0].xmin); 63 set_variable ("KAPA_XMAX", graphmode[0].xmax); 64 set_variable ("KAPA_YMIN", graphmode[0].ymin); 65 set_variable ("KAPA_YMAX", graphmode[0].ymax); 61 66 } 62 67 … … 95 100 SetGraph (graphmode); 96 101 102 set_variable ("KAPA_XMIN", graphmode[0].xmin); 103 set_variable ("KAPA_XMAX", graphmode[0].xmax); 104 set_variable ("KAPA_YMIN", graphmode[0].ymin); 105 set_variable ("KAPA_YMAX", graphmode[0].ymax); 106 97 107 set_variable ("XMIN", graphmode[0].xmin); 98 108 set_variable ("XMAX", graphmode[0].xmax); -
branches/eam_branches/ipp-20110213/Ohana/src/opihi/lib.shell/VectorOps.c
r30614 r31078 218 218 } 219 219 free (vec[0].elements.Int); 220 vec[0].elements.Flt = vo;220 vec[0].elements.Flt = temp; 221 221 vec[0].type = OPIHI_FLT; 222 222 } else { … … 229 229 } 230 230 free (vec[0].elements.Flt); 231 vec[0].elements.Int = vo;231 vec[0].elements.Int = temp; 232 232 vec[0].type = OPIHI_INT; 233 233 }
Note:
See TracChangeset
for help on using the changeset viewer.
