con4.c

来自「图像中非刚性曲线的蛇形检测算法」· C语言 代码 · 共 79 行

C
79
字号
/****************************************************************************
 File Name  : con4.c
 Purpose    : 1. contour duplication
	      2. snaxel copying
 Release    : Version 1.0
 Date	    : Aug 31,1995

GSNAKE API is jointly developed by the Information Technology Institute (ITI), Singapore, and the School of Applied Science, Nanyang Technological
University (NTU), Singapore. 

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.

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 :

		asschan@ntu.ac.sg
		kflai@iti.gov.sg
***************************************************************************/


#include "gsnake.h"
#include "xwindow.h"


void printhelp();
void testmain(char *,char *);


main( int argc, char **argv )
{
	int row, col;
	
	if (argc<3) printhelp();
	else
	{
		testmain(argv[1], argv[2]);
		return(0);
	}
}


void testmain(char *file1, char *file2)
{

	CONTOUR con1;
	CONTOUR *con3 = NULL;
	CONTOUR con2;	

	printf("\nReading contour 1 from %s", file1);
	printf("\nReading contour 2 from %s",file2);
	if ( (con1.read(file1)) ||  (con2.read(file2)) ) exit(-1);
	
	
	printf("\n\n**** Contour 1 co-ordinates ****\n");
	con1.print();
	printf("\n\n**** Contour 2 co-ordinates ****\n");
	con2.print();
	printf("\nPress enter to continue");
	getchar();
	
	printf("\nCreating new contour from contour 1.");
	con3 = con1.duplicate(con3);
	con3->print();
	
	printf("\nCopying snaxel information only from contour 2");
	con3 = con2.duplicate(con3, 1);
	printf("\nPrinting contour information\n");
	con1.print();
	con3->print();
	getchar(); 
}

void printhelp()
{
	printf("\n\nCopying of snaxel and contour information");
	printf("\n Usage :OOcon4 <contour file 1> <contour file 2> ");
	printf("\n Contour file : Specimen contour file\n\n");	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?