head	1.3;
access;
symbols;
locks; strict;
comment	@// @;


1.3
date	94.10.11.00.33.56;	author rjj;	state Exp;
branches;
next	1.2;

1.2
date	94.09.02.01.47.52;	author rjj;	state Exp;
branches;
next	1.1;

1.1
date	94.09.01.00.12.56;	author rjj;	state Exp;
branches;
next	;


desc
@Placing under RCS.  This should be the source corresponding to UM 1.0
@


1.3
log
@Modified to use 'return 0;' rather than 'exit(0);'.
@
text
@// template_example.04.c
//
// Demonstrates image algebra approach to inverse smoothing of an image.
//

#include "DDTempl.h"
#include "IntConv.h"
#include "histogram.c"


int main() {
    
    IA_Image<IA_Point<int>,u_char> a, out_uchar;
    
    // read and display source image
    
    a = IA_Image< IA_Point<int>,u_char>::read_PGM(cin);

    // Here we use the closure constructor for templates.
    // Since IA_HistogramTemplate is derieved from IA_ClosureDT<I>
    //   it is a closure also.

    // The histogram template is parameterized by the image
    //   we want the histogram of, in this case image a.

    IA_DDTemplate< IA_Image<IA_Point<int>,int> >
	h( IA_HistogramTemplate< IA_Image<IA_Point<int>,u_char> >(a) );

    // Now define an image which is simply the template sum
    //   of the histogram template.  
    IA_Image<IA_Point<int>,int>
	a_histogram( sum( a.domain(),
			  h,
			  IA_boxy_pset( IA_Point<int>(min(a)),
					IA_Point<int>(max(a)) )
			  ) );

    cout << a_histogram << endl;

    return 0;
}
@


1.2
log
@Modified to be iac++ v2.0 compliant.
@
text
@a5 1
#include <stdlib.h>
d15 1
a15 1
// read and display source image
d40 1
a40 1
    exit( 0 );
@


1.1
log
@Initial revision
@
text
@a0 2
// Emacs: -*- C++ -*-

d6 1
d8 1
a8 1
#include "IntConvolutions.h"
d12 1
a12 1
main() {
d40 2
@
