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


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

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

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

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


desc
@@


1.4
log
@*** empty log message ***
@
text
@// Emacs: -*- C++ -*-
// $Log: test008.c,v $
// Revision 1.3  1994/09/19  15:28:48  monica
// *** empty log message ***
//
// Revision 1.2  1994/08/24  00:30:59  monica
// int main & exit(0)
//
// Revision 1.1  1994/08/23  23:21:53  monica
// Initial revision
// $Id: test008.c,v 1.3 1994/09/19 15:28:48 monica Exp monica $

// test008.c     Image constructors

#include "test.h"

class clos : public IA_ClosureI<IA_Point<int>, int> {
  public:
    clos(IA_Set<IA_Point<int> > ps) 
    :IA_ClosureI<IA_Point<int>,int>(ps) {}
    ostream &print_this(ostream &o) const { return o;}
    int operator()(const IA_Point<int> &) const { return 0; }
    IA_ClosureI<IA_Point<int>,int>* clone_self() const { return 0; }
};

int main() 
{
    // we want to continue through any throws that may occur.
    IA::abort_on_throw=0;

    // declare an image

    IA_Image<IA_Point<int>,int> im1;	
                // im1 is an uninitialized image whose
    		// pixel values of type int

    im1 = read_int_PGM("/cis/research/iac++/depot/src/test_image/RCS/sr71.pgm");
    cout << "image 1\n";

    stats(im1);

    // copy constructor

    // create a duplicate of the im1 image
    IA_Image<IA_Point<int>,int> im2 = IA_Image<IA_Point<int>,int>(im1);

    cout << im1(IA_Point<int>(0,0)) << "=" << im2(IA_Point<int>(0,0))<< ".\n";

    // create a const image
    im2 = IA_Image<IA_Point<int>,int>(im1.domain(), 5);

    cout << "image 2\n";
    stats(im2);
    cout << "5=" << im2(im2.domain().inf())<< ".\n";
    cout << "5=" << im2(IA_Point<int>(0,0))<< ".\n";

    // use the closure
    clos im3(im1.domain());

    exit(0);
}
@


1.3
log
@*** empty log message ***
@
text
@d3 3
d11 1
a11 1
// $Id: test008.c,v 1.2 1994/08/24 00:30:59 monica Exp monica $
a30 4




a36 2
    stats(im1);

d38 1
d47 1
a47 3
    cout << im1[0,0] << "=" << im2[0,0]<< ".\n";

    stats(im2);
d52 1
d57 2
a58 4

//    im2 = IA_Image<IA_Point<int>,int>(IA_ClosureI<im1.domain(),int>);

    stats(im2);
@


1.2
log
@int main & exit(0)
@
text
@d3 6
a8 3
 * Revision 1.1  1994/08/23  23:21:53  monica
 * Initial revision
 * $Id: test008.c,v 1.1 1994/08/23 23:21:53 monica Exp monica $
@


1.1
log
@Initial revision
@
text
@d2 4
a5 1
// $Log$ $Id$
d20 1
a20 1
main() 
d61 2
@
