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


1.4
date	94.10.11.00.27.28;	author rjj;	state Exp;
branches;
next	1.3;

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

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

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


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


1.4
log
@Modified to use 'return 0;' rather than 'exit(0);'.
@
text
@// image_example.04.c   Image composition with point-to-point function

#include "UcharDI.h"
#include "FloatDI.h"
#include "FloatCI.h"
#include "BLInterp.h"

IA_Point<double>  rot30(const IA_Point<double>  &p) {
    static double theta = .523598776;
    return IA_Point<double>(p[0]*cos(theta) + p[1]*sin(theta),
			 p[1]*cos(theta) - p[0]*sin(theta));
}

int main() {
    // Declare  im1  as a byte valued image and assign its value by
    //   reading a PGM image created by image_example.01.c
    //   using the static image member.
    IA_Image<IA_Point<int>,u_char>
        im1 = read_uchar_PGM(cin);

    // Declare  im2  to be a real valued image whose value is based on
    //  an Binary Interpolation of  im1
    IA_Image<IA_Point<double>,float>
        im2 = IA_BLInterp<float>(IA_Image<IA_Point<int>,float>(im1));

    // Rotate the image 30 degrees and assign to  im2
    im2 = IA_Image<IA_Point<double>,float>( compose(im2, rot30) );

    // Create an byte valued image of the result
    IA_Image<IA_Point<int>,u_char>
	udi(to_uchar(im2.restrict(im1.domain())));

    // Display the results
    display( udi );

    return 0;
}
@


1.3
log
@Missing  FloatDI.h file.
@
text
@a2 1
#include <stdlib.h>
d36 1
a36 1
    exit( 0 );
@


1.2
log
@Modified to be iac++ 2.0 compliant.
Changed references to imagealgebra.h to include approapriate image .h files.
Deleted commented out source lines.
Added exit() to main().
@
text
@d5 1
@


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

d3 2
a4 1
#include "imagealgebra.h"
d14 1
a14 1
main() {
a18 1
//        im1 = IA_Image<IA_Point<int>,u_char>::read_PGM(cin);
d24 1
a24 1
        im2 = IA_BLInterp<float>(IA_FloatDiscreteImage(im1));
d35 2
@
