head	1.7;
access;
symbols
	bobbase:1.7
	bob:1.7.1
	r2_1:1.7
	r2_0:1.7
	r1_1_beta:1.6
	r1_1_alpha:1.5
	r1_0:1.5
	r0_11:1.5
	r0_10:1.5
	r0_9:1.3;
locks
	thoth:1.7.1.2
	thoth:1.7; strict;
comment	@// @;


1.7
date	94.08.22.15.20.29;	author thoth;	state Exp;
branches
	1.7.1.1;
next	1.6;

1.6
date	94.07.25.17.26.39;	author thoth;	state Exp;
branches;
next	1.5;

1.5
date	94.01.31.15.45.38;	author thoth;	state Exp;
branches;
next	1.4;

1.4
date	94.01.07.15.10.00;	author thoth;	state Exp;
branches;
next	1.3;

1.3
date	93.10.05.19.33.08;	author thoth;	state Exp;
branches;
next	1.2;

1.2
date	93.09.27.15.49.59;	author thoth;	state Exp;
branches;
next	1.1;

1.1
date	93.09.15.12.52.40;	author thoth;	state Exp;
branches;
next	;

1.7.1.1
date	94.12.28.18.02.30;	author thoth;	state Exp;
branches;
next	1.7.1.2;

1.7.1.2
date	95.01.13.19.37.42;	author thoth;	state Exp;
branches;
next	;


desc
@Float discrete image declaration.
@


1.7
log
@DOS-inspired name rework.
@
text
@// Emacs: -*- C++ -*-

//
//	Copyright 1993, Center for Computer Vision and Visualization,
//	University of Florida.  All rights reserved.
//


//
// $Log: FloatDI.h,v $
// Revision 1.6  1994/07/25  17:26:39  thoth
// Name sanitization
//
// Revision 1.5  1994/01/31  15:45:38  thoth
// Image<IntPoint,float> can now be converted to CoreImage<IntPoint,complex>
//
// Revision 1.4  1994/01/07  15:10:00  thoth
// Image class is now CoreImage and named image types are
// Image<P,T>.
//
// Revision 1.3  1993/10/05  19:33:08  thoth
// Move to new Closure naming convention.
//
// Revision 1.2  1993/09/27  15:49:59  thoth
// op= with a constant now works.
//
// Revision 1.1  93/09/15  12:52:40  thoth
// Initial revision
// 
// Revision 1.4  93/05/27  11:21:48  thoth
// Copyright Notices
// 
// Revision 1.3  93/05/26  17:00:47  thoth
// Provide some compositions that will be frequently used.
// 
// Revision 1.2  93/04/29  11:19:48  thoth
// Workaround for CFront implementation ugliness.
// 
// Revision 1.1  93/04/17  18:59:25  thoth
// Initial revision
// 


#ifndef FloatDI_h_
#define FloatDI_h_

#include "CoreImage.h"

#define SUPPRESS_INCLUDE
#include "Image.h"
#undef SUPPRESS_INCLUDE
#include "IntDI.h"		// for chi relations

#include	<complex.h>	// for the complex conversion

class IA_Image<IA_Point<int>,float>: public IA_CoreImage<IA_Point<int>,float>
{
  public:
    IA_Image():IA_CoreImage<IA_Point<int>,float>() {}

    IA_Image(const IA_Image& im)
    :IA_CoreImage<IA_Point<int>,float>(im) {}
    IA_Image(IA_Set<IA_Point<int> > ps, float value)
    :IA_CoreImage<IA_Point<int>,float>(ps,(float)value) {}
    IA_Image(IA_Set<IA_Point<int> > ps, float *vp, unsigned sz,
			  int giveaway=0)
    :IA_CoreImage<IA_Point<int>,float>(ps, vp, sz, giveaway) {}

    IA_Image(const IA_ClosureI<IA_Point<int>,float> &img)
    :IA_CoreImage<IA_Point<int>,float>(img) {}

    IA_Image(IA_Set<IA_Point<int> > ps, float (*f)(const IA_Point<int>&))
    :IA_CoreImage<IA_Point<int>,float>(ps,f) {}

    IA_Image( const IA_CoreImage<IA_Point<int>,float> &d)
    :IA_CoreImage<IA_Point<int>,float>(d) {}

    virtual ~IA_Image(){ }

    IA_Image& operator=(float v) {
	float	temp=v;		// workaround CFront problem
	(IA_CoreImage<IA_Point<int>,float>&)*this = temp;
	return *this;
    }
#include	"FloatIOps.h"
#if 0
    static IA_Image read_PGM(istream &);
    static IA_Image read_PGM(const char *fname);

    ostream& write_PGM(ostream &, unsigned) const;
    ostream& write_PGM(ostream &) const;
    void write_PGM(const char *fname, unsigned) const;
    void write_PGM(const char *fname) const;
#endif
};

inline int operator!=(const IA_CoreImage<IA_Point<int>,float> &lhs,
	       const IA_CoreImage<IA_Point<int>,float> &rhs) {
    return ! (lhs == rhs);
}
inline int operator!=(const IA_CoreImage<IA_Point<int>,float> &lhs, float rhs) {
    return ! (lhs == rhs);
}
inline int operator!=(float lhs, const IA_CoreImage<IA_Point<int>,float> &rhs) {
    return ! (rhs == lhs);
}

// compiler clue to allow inexact matches on a function template
ostream& operator <<(ostream&, const IA_CoreImage<IA_Point<int>,float>&);

inline IA_Image<IA_Point<int>,float> compose
	(double (*f)(double), const IA_CoreImage<IA_Point<int>,float>& fi)
{
    return compose(f, fi, (float*)0, (double*)0, (double*)0);
}

inline IA_Image<IA_Point<int>,float> compose
	(double (*f)(double), const IA_Image<IA_Point<int>,float>& fi)
{
    return compose(f, (IA_CoreImage<IA_Point<int>,float>&)fi,
		   (float*)0, (double*)0, (double*)0);
}

#endif
@


1.7.1.1
log
@removed never-implemented I/O members.
image operations are friends of FBI now.
@
text
@a10 3
// Revision 1.7  1994/08/22  15:20:29  thoth
// DOS-inspired name rework.
//
d85 10
a95 2

#include	"FloatIOps.h"
@


1.7.1.2
log
@CoreImage has been re-merged with Image.  All special stuff should be
friends of FBI now.
@
text
@a10 4
// Revision 1.7.1.1  1994/12/28  18:02:30  thoth
// removed never-implemented I/O members.
// image operations are friends of FBI now.
//
d50 1
a50 1
//#include "Image.h"
d59 1
a59 2
#if 0
class IA_Image<IA_Point<int>,float>: public IA_Image<IA_Point<int>,float>
d62 1
a62 1
    IA_Image():IA_Image<IA_Point<int>,float>() {}
d65 1
a65 1
    :IA_Image<IA_Point<int>,float>(im) {}
d67 1
a67 1
    :IA_Image<IA_Point<int>,float>(ps,(float)value) {}
d70 1
a70 1
    :IA_Image<IA_Point<int>,float>(ps, vp, sz, giveaway) {}
d73 1
a73 1
    :IA_Image<IA_Point<int>,float>(img) {}
d76 1
a76 1
    :IA_Image<IA_Point<int>,float>(ps,f) {}
d78 2
a79 2
    IA_Image( const IA_Image<IA_Point<int>,float> &d)
    :IA_Image<IA_Point<int>,float>(d) {}
d85 1
a85 1
	(IA_Image<IA_Point<int>,float>&)*this = temp;
a88 1
#endif
d92 2
a93 2
inline int operator!=(const IA_Image<IA_Point<int>,float> &lhs,
	       const IA_Image<IA_Point<int>,float> &rhs) {
d96 1
a96 1
inline int operator!=(const IA_Image<IA_Point<int>,float> &lhs, float rhs) {
d99 1
a99 1
inline int operator!=(float lhs, const IA_Image<IA_Point<int>,float> &rhs) {
d104 1
a104 1
ostream& operator <<(ostream&, const IA_Image<IA_Point<int>,float>&);
d107 1
a107 1
	(double (*f)(double), const IA_Image<IA_Point<int>,float>& fi)
d111 1
a111 1
#if 0
d115 1
a115 1
    return compose(f, (IA_Image<IA_Point<int>,float>&)fi,
a117 1
#endif
@


1.6
log
@Name sanitization
@
text
@d11 3
d85 1
a85 1
#include	"FloatImageOps.h"
@


1.5
log
@Image<IntPoint,float> can now be converted to CoreImage<IntPoint,complex>
@
text
@d11 3
d53 1
a53 1
class IA_Image<IA_IntPoint,float>: public IA_CoreImage<IA_IntPoint,float>
d56 1
a56 1
    IA_Image():IA_CoreImage<IA_IntPoint,float>() {}
d59 4
a62 4
    :IA_CoreImage<IA_IntPoint,float>(im) {}
    IA_Image(IA_IntPointSet ps, float value)
    :IA_CoreImage<IA_IntPoint,float>(ps,(float)value) {}
    IA_Image(IA_IntPointSet ps, float *vp, unsigned sz,
d64 1
a64 1
    :IA_CoreImage<IA_IntPoint,float>(ps, vp, sz, giveaway) {}
d66 2
a67 2
    IA_Image(const IA_ClosureI<IA_IntPoint,float> &img)
    :IA_CoreImage<IA_IntPoint,float>(img) {}
d69 2
a70 2
    IA_Image(IA_IntPointSet ps, float (*f)(const IA_IntPoint&))
    :IA_CoreImage<IA_IntPoint,float>(ps,f) {}
d72 2
a73 2
    IA_Image( const IA_CoreImage<IA_IntPoint,float> &d)
    :IA_CoreImage<IA_IntPoint,float>(d) {}
d79 1
a79 1
	(IA_CoreImage<IA_IntPoint,float>&)*this = temp;
d94 2
a95 2
inline int operator!=(const IA_CoreImage<IA_IntPoint,float> &lhs,
	       const IA_CoreImage<IA_IntPoint,float> &rhs) {
d98 1
a98 1
inline int operator!=(const IA_CoreImage<IA_IntPoint,float> &lhs, float rhs) {
d101 1
a101 1
inline int operator!=(float lhs, const IA_CoreImage<IA_IntPoint,float> &rhs) {
d106 1
a106 1
ostream& operator <<(ostream&, const IA_CoreImage<IA_IntPoint,float>&);
d108 2
a109 2
inline IA_Image<IA_IntPoint,float> compose
	(double (*f)(double), const IA_CoreImage<IA_IntPoint,float>& fi)
d114 2
a115 2
inline IA_Image<IA_IntPoint,float> compose
	(double (*f)(double), const IA_Image<IA_IntPoint,float>& fi)
d117 1
a117 1
    return compose(f, (IA_CoreImage<IA_IntPoint,float>&)fi,
@


1.4
log
@Image class is now CoreImage and named image types are
Image<P,T>.
@
text
@d11 4
d47 2
@


1.3
log
@Move to new Closure naming convention.
@
text
@d11 3
d37 3
d41 2
d44 1
a44 1
class IA_FloatDiscreteImage: public IA_Image<IA_IntPoint,float>
d47 1
a47 1
    IA_FloatDiscreteImage():IA_Image<IA_IntPoint,float>() {}
d49 5
a53 5
    IA_FloatDiscreteImage(const IA_FloatDiscreteImage& im)
    :IA_Image<IA_IntPoint,float>(im) {}
    IA_FloatDiscreteImage(IA_IntPointSet ps, float value)
    :IA_Image<IA_IntPoint,float>(ps,(float)value) {}
    IA_FloatDiscreteImage(IA_IntPointSet ps, float *vp, unsigned sz,
d55 1
a55 1
    :IA_Image<IA_IntPoint,float>(ps, vp, sz, giveaway) {}
d57 2
a58 2
    IA_FloatDiscreteImage(const IA_ClosureI<IA_IntPoint,float> &img)
    :IA_Image<IA_IntPoint,float>(img) {}
d60 2
a61 2
    IA_FloatDiscreteImage(IA_IntPointSet ps, float (*f)(const IA_IntPoint&))
    :IA_Image<IA_IntPoint,float>(ps,f) {}
d63 2
a64 2
    IA_FloatDiscreteImage( const IA_Image<IA_IntPoint,float> &d)
    :IA_Image<IA_IntPoint,float>(d) {}
d66 1
a66 1
    virtual ~IA_FloatDiscreteImage(){ }
d68 3
a70 2
    IA_FloatDiscreteImage& operator=(float v) {
	(IA_Image<IA_IntPoint,float>&)*this = v;
d75 2
a76 2
    static IA_FloatDiscreteImage read_PGM(istream &);
    static IA_FloatDiscreteImage read_PGM(const char *fname);
d85 2
a86 2
inline int operator!=(const IA_FloatDiscreteImage &lhs,
	       const IA_FloatDiscreteImage &rhs) {
d89 1
a89 1
inline int operator!=(const IA_FloatDiscreteImage &lhs, float rhs) {
d92 1
a92 1
inline int operator!=(float lhs, const IA_FloatDiscreteImage &rhs) {
d97 1
a97 1
ostream& operator <<(ostream&, const IA_Image<IA_IntPoint,float>&);
d99 3
a101 2
inline IA_FloatDiscreteImage compose(double (*f)(double),
				     const IA_Image<IA_IntPoint,float>& fi) {
d105 4
a108 3
inline IA_FloatDiscreteImage compose(double (*f)(double),
				     const IA_FloatDiscreteImage& fi) {
    return compose(f, (IA_Image<IA_IntPoint,float>&)fi,
@


1.2
log
@op= with a constant now works.
@
text
@d10 4
a13 1
// $Log:	FloatDI.h,v $
d49 1
a49 1
    IA_FloatDiscreteImage(const IA_OtherI<IA_IntPoint,float> &img)
d60 1
a60 1
    IA_FloatDiscreteImage& operator=(int v) {
d97 2
a98 1
    return compose(f, fi, (float*)0, (double*)0, (double*)0);
@


1.1
log
@Initial revision
@
text
@d10 4
a13 1
// $Log:	FloatDiscreteImage.h,v $
d57 4
@
