con4.c
Upload User: shhuayu888
Upload Date: 2013-03-28
Package Size: 1788k
Code Size: 2k
Category:

Windows Develop

Development Platform:

Unix_Linux

  1. /****************************************************************************
  2.  File Name  : con4.c
  3.  Purpose    : 1. contour duplication
  4.       2. snaxel copying
  5.  Release    : Version 1.0
  6.  Date     : Aug 31,1995
  7. GSNAKE API is jointly developed by the Information Technology Institute (ITI), Singapore, and the School of Applied Science, Nanyang Technological
  8. University (NTU), Singapore. 
  9. These software programs are available to the user without any license or royalty fees. Permission is hereby granted to use, copy, modify, and distribute this software and its documentation for any purpose. ITI and NTU gives no warranty, express, implied, or statuary for the software and/or documentation provided, including, without limitation, waranty of merchantibility and warranty of fitness for a particular purpose. The software provided hereunder is on an "as is"  basis, and ITI and NTU has no obligation to provide maintenance, support, updates, enhancements, or modifications.
  10. GSNAKE API is available for any UNIX compatible system. User feedback, bugs, or software and manual suggestions should be sent via electronic mail to one of the following, who may or may not act on them as he/she desires :
  11. asschan@ntu.ac.sg
  12. kflai@iti.gov.sg
  13. ***************************************************************************/
  14. #include "gsnake.h"
  15. #include "xwindow.h"
  16. void printhelp();
  17. void testmain(char *,char *);
  18. main( int argc, char **argv )
  19. {
  20. int row, col;
  21. if (argc<3) printhelp();
  22. else
  23. {
  24. testmain(argv[1], argv[2]);
  25. return(0);
  26. }
  27. }
  28. void testmain(char *file1, char *file2)
  29. {
  30. CONTOUR con1;
  31. CONTOUR *con3 = NULL;
  32. CONTOUR con2;
  33. printf("nReading contour 1 from %s", file1);
  34. printf("nReading contour 2 from %s",file2);
  35. if ( (con1.read(file1)) ||  (con2.read(file2)) ) exit(-1);
  36. printf("nn**** Contour 1 co-ordinates ****n");
  37. con1.print();
  38. printf("nn**** Contour 2 co-ordinates ****n");
  39. con2.print();
  40. printf("nPress enter to continue");
  41. getchar();
  42. printf("nCreating new contour from contour 1.");
  43. con3 = con1.duplicate(con3);
  44. con3->print();
  45. printf("nCopying snaxel information only from contour 2");
  46. con3 = con2.duplicate(con3, 1);
  47. printf("nPrinting contour informationn");
  48. con1.print();
  49. con3->print();
  50. getchar(); 
  51. }
  52. void printhelp()
  53. {
  54. printf("nnCopying of snaxel and contour information");
  55. printf("n Usage :OOcon4 <contour file 1> <contour file 2> ");
  56. printf("n Contour file : Specimen contour filenn");
  57. }