head	1.5;
access
	monica
	thoth;
symbols;
locks
	monica:1.5; strict;
comment	@// @;


1.5
date	94.11.04.21.55.59;	author monica;	state Exp;
branches;
next	1.4;

1.4
date	94.09.22.21.22.23;	author monica;	state Exp;
branches;
next	1.3;

1.3
date	94.09.21.21.52.57;	author monica;	state Exp;
branches;
next	1.2;

1.2
date	94.08.31.18.12.55;	author monica;	state Exp;
branches;
next	1.1;

1.1
date	94.08.24.02.57.08;	author monica;	state Exp;
branches;
next	;


desc
@include for most tests
@


1.5
log
@*** empty log message ***
@
text
@#include <iostream.h>
#include "ia.h"
#include "IntDI.h"
#include "FloatDI.h"
#include "BitDI.h"
#include "CplxDI.h"
#include "UcharDI.h"
// #include "FloatCI.h"
#include "RGBDI.h"
#include "ImageIter.h"
#include "ClosureI.h"
#include "Image.h"

// this is test.h  which is included by most tests.

void infsup (IA_Image<IA_Point<int>,int> a)
{
    cout << "Domain infimum is:  " << a.domain().inf() << ".\n"
	 << "Domain supremum is: " << a.domain().sup() << ".\n";
}    

void stats (IA_Image<IA_Point<int>,int> a)
{
    cout<<"\nimage has "<<a.card()<<" values\n";
    cout<<"extensive?\n";
    a.extensive()==0 ? cout<<"extensive pointset\n"
                   : cout<<"non-extensive pointset\n";
    infsup(a);
    cout << "min value is " << min(a) << "\n";
    cout << "max value is " << max(a) << "\n";
}    
void statsi (IA_Image<IA_Point<int>,int> a)
{
    cout<<"\nimage has "<<a.card()<<" values\n";
    a.extensive()==0 ? cout<<"extensive pointset\n"
                   : cout<<"non-extensive pointset\n";
    infsup(a);
    cout << "min value is " << min(a) << "\n";
    cout << "max value is " << max(a) << "\n";
}    

void infsup (IA_Image<IA_Point<int>,float> a)
{
    cout << "Domain infimum is:  " << a.domain().inf() << ".\n"
	 << "Domain supremum is: " << a.domain().sup() << ".\n";
}    

void stats (IA_Image<IA_Point<int>,float> a)
{
    cout<<"image has "<<a.card()<<" values\n";
    a.extensive()==0 ? cout<<"extensive pointset\n"
                   : cout<<"non-extensive pointset\n";
    infsup(a);
    cout << "min value is " << min(a) << "\n";
    cout << "max value is " << max(a) << "\n";
}    

void infsup (IA_Image<IA_Point<int>,IA_Bit> a)
{
    cout << "Domain infimum is:  " << a.domain().inf() << ".\n"
	 << "Domain supremum is: " << a.domain().sup() << ".\n";
}    

void stats (IA_Image<IA_Point<int>,IA_Bit> a)
{
    cout<<"image has "<<a.card()<<" values\n";
    a.extensive()==0 ? cout<<"extensive pointset\n"
                   : cout<<"non-extensive pointset\n";
    infsup(a);
}    

void infsup (IA_Image<IA_Point<int>,IA_RGB> a)
{
    cout << "Domain infimum is:  " << a.domain().inf() << ".\n"
	 << "Domain supremum is: " << a.domain().sup() << ".\n";
}    

void stats (IA_Image<IA_Point<int>,IA_RGB> a)
{
    cout<<"image has "<<a.card()<<" values\n";
    a.extensive()==0 ? cout<<"extensive pointset\n"
                   : cout<<"non-extensive pointset\n";
    infsup(a);
}    

void infsup (IA_Image<IA_Point<int>,u_char> a)
{
    cout << "Domain infimum is:  " << a.domain().inf() << ".\n"
	 << "Domain supremum is: " << a.domain().sup() << ".\n";
}    

void stats (IA_Image<IA_Point<int>,u_char> a)
{
    cout<<"image has "<<a.card()<<" values\n";
    a.extensive()==0 ? cout<<"extensive pointset\n"
                   : cout<<"non-extensive pointset\n";
    infsup(a);
}    

void infsup (IA_Image<IA_Point<int>,complex> a)
{
    cout << "Domain infimum is:  " << a.domain().inf() << ".\n"
	 << "Domain supremum is: " << a.domain().sup() << ".\n";
}    

void stats (IA_Image<IA_Point<int>,complex> a)
{
    cout<<"image has "<<a.card()<<" values\n";
    a.extensive()==0 ? cout<<"extensive pointset\n"
                   : cout<<"non-extensive pointset\n";
    infsup(a);
}    

//??void infsup (IA_Image<IA_Point<double>,float> a)
//??{
//??    cout << "Domain infimum is:  " << a.domain().inf() << ".\n"
//??	 << "Domain supremum is: " << a.domain().sup() << ".\n";
//??}    

//??void stats (IA_Image<IA_Point<double>,float> a)
//??{
//??    cout<<"image has "<<a.card()<<" values\n";
//??    a.extensive()==0 ? cout<<"extensive pointset\n"
//??                   : cout<<"non-extensive pointset\n";
//??    infsup(a);
//??}    

// binary operator yielding image
#define p1(a,op,op2,b)\
                   cout<< "\n\t";\
                   cout<< "\n\t"<< op << "\n\t";\
		   cout<< "\n\t result: ";\
		   stats(a op2 b);\
		   cout<< "\n";
		   
//binary operator yielding image
#define p1b(a,astr,op,op2,b,bstr)\
                   cout<< "\n\t";\
                   cout<< astr << op << bstr << "\n\t";\
		   cout<< "\n\t result: ";\
		   stats(a op2 b);\
		   cout<< "\n";

//for boolean operators on an image
#define p2(a,op,op2)\
                   cout<< "\n\t";\
		   stats(a);\
                   cout<< "\n\t"<< op << "\n\t";\
		   (op2 a)==0 ? cout <<"\tresult:False\n" \
		                    : cout <<"\tresult:True\n" 

//for boolean operators between 2 images
#define p3(a,astr,op,op2,b,bstr)\
                   cout<< "\n\t";\
                   cout<< astr << op << bstr << "\n\t";\
		   (a op2 b)==0 ? cout <<"\tresult:False\n" \
		                    : cout <<"\tresult:True\n" 

//member function on an image
#define p4(op,op2,a)\
		   cout<< "\n\t" << op <<"\t" ;\
                   cout <<"\n\t result:" << a.op2() << "\n"
                  
    
//function on two images
#define p5(f,f2,b,c)\
                   cout<<"\n\t"<<f<<"("<< b<<","<<c<<")\n";\
		   cout<<"\t result:" << f2(b,c) <<"\n"

//function on two images
#define p5i(func,funcstr,a,astr,b,bstr)\
                   cout<< "\n\t";\
                   cout<< funcstr << "(" << astr << "," << bstr << ")\n\t";\
		   cout<< "\n\t result: ";\
		   statsi(func(a,b));\
		   cout<<" Sum:  "<<sum(func(a,b));\
		   cout<< "\n";

//function on two images
#define p5b(func,funcstr,a,astr,b,bstr)\
                   cout<< "\n\t";\
                   cout<< funcstr << "(" << astr << "," << bstr << ")\n\t";\
		   cout<< "\n\t result: ";\
		   statsi(IA_Image<IA_Point<int>, IA_Bit> (func(a,b)));\
		   cout<<" Sum:  "<<sum(func(a,b));\
		   cout<< "\n";

//function on two images
#define p5bin(func,funcstr,a,astr,b,bstr)\
                   cout<< "\n\t";\
                   cout<< funcstr << "(" << astr << "," << bstr << ")\n\t";\
		   cout<< "\n\t result: ";\
		   func(a,b)==0 ? cout <<"\tresult:False\n" \
		                    : cout <<"\tresult:True\n"; \
		   cout<< "\n";

//function on one image
#define p9(f,f2,b,bstr)\
                   cout<<"\n\t"<<f<<"("<<bstr<<")\n";\
		   cout<<"\t result:" << f2(b) <<"\n"








@


1.4
log
@*** empty log message ***
@
text
@d180 9
@


1.3
log
@*** empty log message ***
@
text
@d179 9
@


1.2
log
@better output
@
text
@d32 9
d170 9
d183 8
@


1.1
log
@Initial revision
@
text
@d6 1
a6 1
#include "ComplexDI.h"
d8 1
a8 1
#include "FloatCI.h"
d45 2
d127 8
d144 1
a144 1
#define p3(a,op,op2,b)\
d146 1
a146 1
                   cout<< "\n\t"<< op << "\n\t";\
d162 2
a163 2
#define p9(f,f2,b)\
                   cout<<"\n\t"<<f<<"("<<b<<")\n";\
@
