Changeset 3692 for trunk/Ohana/src/opihi/cmd.data/tv.c
- Timestamp:
- Apr 8, 2005, 5:38:38 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.data/tv.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.data/tv.c
r2843 r3692 7 7 double a1, a2, max, min, zero, range; 8 8 float *in; 9 char *out, *outbuffer, * p, *tmpstring;9 char *out, *outbuffer, *root; 10 10 int Ximage, Nimage; 11 11 Coords coords; … … 56 56 out = outbuffer; 57 57 58 status = write (Ximage, "READ", 4); /* tell Ximage to look for the incoming image */58 SendGraphCommand (Ximage, 4, "READ"); /* tell Ximage to look for the incoming image */ 59 59 60 60 /* convert from (float) internal rep to 1 byte chars -- depends on how many colors Kii owns*/ … … 81 81 82 82 /* done with the conversion, now send Ximage the converted picture */ 83 sprintf (buffer, "%8d %8d 8 1 %f %f ", buf[0].matrix.Naxis[0], buf[0].matrix.Naxis[1], 0.0, 1.0); 84 sprintf (buffer2, "NBYTES: %6d ", strlen (buffer)); 85 write (Ximage, buffer2, 16); 86 write (Ximage, buffer, strlen (buffer)); 87 88 sprintf (buffer, "%f %f %f %f %d ", zero, range, min, max, size); 89 sprintf (buffer2, "NBYTES: %6d ", strlen (buffer)); 90 write (Ximage, buffer2, 16); 91 write (Ximage, buffer, strlen (buffer)); 83 SendGraphMessage (Ximage, "%8d %8d 8 1 %f %f", buf[0].matrix.Naxis[0], buf[0].matrix.Naxis[1], 0.0, 1.0); 84 SendGraphMessage (Ximage, "%f %f %f %f %d ", zero, range, min, max, size); 85 SendGraphMessage (Ximage, "%f %f %g %g %g ", coords.crval1, coords.crpix1, coords.cdelt1, coords.pc1_1, coords.pc1_2); 86 SendGraphMessage (Ximage, "%f %f %g %g %g ", coords.crval2, coords.crpix2, coords.cdelt2, coords.pc2_1, coords.pc2_2); 92 87 93 sprintf (buffer, "%f %f %g %g %g ", coords.crval1, coords.crpix1, coords.cdelt1, coords.pc1_1, coords.pc1_2); 94 sprintf (buffer2, "NBYTES: %6d ", strlen (buffer)); 95 write (Ximage, buffer2, 16); 96 write (Ximage, buffer, strlen (buffer)); 97 98 sprintf (buffer, "%f %f %g %g %g ", coords.crval2, coords.crpix2, coords.cdelt2, coords.pc2_1, coords.pc2_2); 99 sprintf (buffer2, "NBYTES: %6d ", strlen (buffer)); 100 write (Ximage, buffer2, 16); 101 write (Ximage, buffer, strlen (buffer)); 102 103 p = strrchr (buf[0].file, '/'); 104 if (p == (char *) NULL) p = buf[0].file; 105 else p++; 106 tmpstring = strcreate (p); 107 sprintf (buffer, "%s %s %s ", coords.ctype, tmpstring, buf[0].name); 108 free (tmpstring); 109 sprintf (buffer2, "NBYTES: %6d ", strlen (buffer)); 110 write (Ximage, buffer2, 16); 111 write (Ximage, buffer, strlen (buffer)); 88 root = filerootname (buf[0].file); 89 SendGraphMessage (Ximage, "%s %s %s ", coords.ctype, root, buf[0].name); 112 90 113 91 write (Ximage, outbuffer, size); 114 115 92 free (outbuffer); 116 93 … … 118 95 set_str_variable ("TV", argv[1]); 119 96 return (TRUE); 120 121 97 } 122 98
Note:
See TracChangeset
for help on using the changeset viewer.
