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


1.10
date	94.12.30.19.17.06;	author fjsoria;	state Exp;
branches;
next	1.9;

1.9
date	94.12.22.21.36.40;	author fjsoria;	state Exp;
branches;
next	1.8;

1.8
date	94.12.22.19.12.06;	author fjsoria;	state Exp;
branches;
next	1.7;

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

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

1.5
date	94.03.14.15.48.33;	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.11.17.18.16.48;	author thoth;	state Exp;
branches;
next	1.2;

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

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

1.7.1.1
date	94.12.28.17.13.16;	author thoth;	state Exp;
branches;
next	;


desc
@Float discrete image implementation.
@


1.10
log
@added more static data
@
text
@// Emacs: -*- C++ -*-

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

static char copyright[] = "Copyright 1993, Center for Computer Vision and Visualization,\nUniversity of Florida.  All rights reserved.\n";

static char FloatDI_rcsid[] = "$Id: FloatDI.c,v 1.9 1994/12/22 21:36:40 fjsoria Exp fjsoria $";

//
// $Log: FloatDI.c,v $
// Revision 1.9  1994/12/22  21:36:40  fjsoria
// static data member template fix
//
// Revision 1.8  1994/12/22  19:12:06  fjsoria
// added static data member for IA_VectorI
//
// Revision 1.7  1994/07/25  17:26:39  thoth
// Name sanitization
//
// Revision 1.6  1994/05/17  12:53:27  thoth
// Image Operations now get their own files.
//
// Revision 1.5  1994/03/14  15:48:33  thoth
// ValueSet has been replaced by container class Set.
//
// 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/11/17  18:16:48  thoth
// IPSIter is now PSIter<IntPoint>.
// restriction functions now go in the individual image implementation modules.
// pseudo-division is now avaliable.
//
// Revision 1.2  1993/10/05  19:33:08  thoth
// Move to new Closure naming convention.
//
// Revision 1.1  1993/09/15  12:52:30  thoth
// Initial revision
//
// Revision 1.4  93/06/10  17:24:05  thoth
// instantiations for IAAIO
// 
// Revision 1.3  93/05/27  11:36:24  thoth
// Copyright Notices
// 
// Revision 1.2  93/05/26  17:00:34  thoth
// instantiate all the compositions.
// 
// Revision 1.1  93/04/17  18:59:16  thoth
// Initial revision
// 


#include	"FloatDI.h"
#include	"VectorI.h"
#include	"ConstI.h"
#include	"ClosureI.h"
#include	"ErrorI.h"
#include	"ImageIter.h"
#include	"PSIter.h"

#include	<math.h>
#include	<fstream.h>

//
//
//

#include "restrict.h"

#ifdef IA_NO_AUTOINST_OF_STATIC_DATA
#include "FuncI.h"
#include "LazyXlationI.h"
char IA_VectorI<IA_Point<int>, float>::dummy;
char IA_ConstI<IA_Point<int>, float>::dummy;
char IA_ClosureI<IA_Point<int>, float>::dummy;
char IA_FunctionRefI<IA_Point<int>, float>::dummy = 0;
char IA_LazyXlationI<IA_Point<int>, float>::dummy;
char IA_FunctionI<IA_Point<int>, float>::dummy = 0;
#endif

IA_BaseImage<IA_Point<int>,float> *restrict_toD(const IA_BaseImage<IA_Point<int>, float> *im, const IA_Set<IA_Point<int> > &ips) {
    return restrictD_toD(im, ips);
}


//
//
//

#if 0

class blah : public IA_ClosureI<IA_Point<int>,float> {
  public:
    blah() 
    :IA_ClosureI<IA_Point<int>,float>(IA_Set<IA_Point<int> >()) {}
    ostream &print_this(ostream &o) const { return o;}
    float operator()(const IA_Point<int> &) const { return 0; }
    IA_ClosureI<IA_Point<int>,float>* clone_self() const { return 0; }
};
static void dummy001()
{
    IA_Point<int>		ip;
    IA_Set<IA_Point<int> >	ps;
    IA_Image<IA_Point<int>,float>	i1;
    IA_Image<IA_Point<int>,float>
	i2(i1),
	i3(ps,0.0),
	i4(ps, (float*)0, 0, 1),
	i5(ps, (float*)0, 0),
	i6(blah()),
	// i7(ps, (float(*)(const IA_Point<int>&))0),
	i10(IA_CoreImage<IA_Point<int>,float>());
    i1 = i1.restrict(i2.range());
    i1 = i1.xlated(ip);
    (IA_CoreImage<IA_Point<int>,float>&)i1 = 2;
    (void)i1.type();
    i1[ip] = i1(ip);
    i1 = i1.restrict(i2.domain());
    (void)i1.extend(i2);
    (void)i1.reduce((float (*)(const float&,const float&)) 0, 0);
    (void)i1.reduce((float (*)( float, float)) 0, 0);
    cout << (IA_CoreImage<IA_Point<int>,float>&)i1;

//     IA_Image<IA_Point<int>,float>::read_IAA("");
//     IA_Image<IA_Point<int>,float>::read_IAA("","");
// 
//     i1.write_IAA("");
//     i1.write_IAA("","");

    IA_IVIter<IA_Point<int>,float>	iter1(i1), iter2;
    IA_IPIter<IA_Point<int>,float>	iter3(i2), iter4;
    iter1 = iter2;
    iter3 = iter4;

    compose(i1, (IA_Point<int>(*)(const IA_Point<int>&))0);
    compose(i1, *(IA_Closure<IA_Point<int>, IA_Point<int> >*)0);
    compose((float(*)(float))0, i1);
    compose((double(*)(double))0, (IA_CoreImage<IA_Point<int>,float>&)i1);
    compose((u_char(*)(float))0, i1, (u_char*)0);

    IA_Set<float>	vs(i1.range());
    // I shouldn\'t have to do the following two lines
    // vs.value_type_compare(0,0);
}
#endif
@


1.9
log
@static data member template fix
@
text
@d10 1
a10 1
static char FloatDI_rcsid[] = "$Id: FloatDI.c,v 1.8 1994/12/22 19:12:06 fjsoria Exp fjsoria $";
d14 3
d77 1
d82 2
@


1.8
log
@added static data member for IA_VectorI
@
text
@d10 1
a10 1
static char FloatDI_rcsid[] = "$Id: FloatDI.c,v 1.7 1994/07/25 17:26:39 thoth Exp fjsoria $";
d14 3
d73 1
d75 3
@


1.7
log
@Name sanitization
@
text
@d10 1
a10 1
static char FloatDI_rcsid[] = "$Id: FloatDI.c,v 1.6 1994/05/17 12:53:27 thoth Exp $";
d14 3
d68 4
@


1.7.1.1
log
@remove obsolete instantiation cruft.
@
text
@d10 1
a10 1
static char FloatDI_rcsid[] = "$Id: FloatDI.c,v 1.7 1994/07/25 17:26:39 thoth Exp thoth $";
a13 3
// Revision 1.7  1994/07/25  17:26:39  thoth
// Name sanitization
//
d74 57
@


1.6
log
@Image Operations now get their own files.
@
text
@d10 1
a10 1
static char FloatDI_rcsid[] = "$Id: FloatDI.c,v 1.5 1994/03/14 15:48:33 thoth Exp thoth $";
d14 3
d77 1
a77 1
class blah : public IA_ClosureI<IA_IntPoint,float> {
d80 1
a80 1
    :IA_ClosureI<IA_IntPoint,float>(IA_IntPointSet()) {}
d82 2
a83 2
    float operator()(const IA_IntPoint &) const { return 0; }
    IA_ClosureI<IA_IntPoint,float>* clone_self() const { return 0; }
d87 4
a90 4
    IA_IntPoint		ip;
    IA_IntPointSet	ps;
    IA_Image<IA_IntPoint,float>	i1;
    IA_Image<IA_IntPoint,float>
d96 2
a97 2
	// i7(ps, (float(*)(const IA_IntPoint&))0),
	i10(IA_CoreImage<IA_IntPoint,float>());
d100 1
a100 1
    (IA_CoreImage<IA_IntPoint,float>&)i1 = 2;
d107 1
a107 1
    cout << (IA_CoreImage<IA_IntPoint,float>&)i1;
d109 2
a110 2
//     IA_Image<IA_IntPoint,float>::read_IAA("");
//     IA_Image<IA_IntPoint,float>::read_IAA("","");
d115 2
a116 2
    IA_IVIter<IA_IntPoint,float>	iter1(i1), iter2;
    IA_IPIter<IA_IntPoint,float>	iter3(i2), iter4;
d120 2
a121 2
    compose(i1, (IA_IntPoint(*)(const IA_IntPoint&))0);
    compose(i1, *(IA_Closure<IA_IntPoint, IA_IntPoint>*)0);
d123 1
a123 1
    compose((double(*)(double))0, (IA_CoreImage<IA_IntPoint,float>&)i1);
@


1.5
log
@ValueSet has been replaced by container class Set.
@
text
@d10 1
a10 1
static char FloatDI_rcsid[] = "$Id: FloatDI.c,v 1.4 1994/01/07 15:10:00 thoth Exp thoth $";
d14 3
a66 35

//
// below are included the implementations of every image-image
// and image-scalar operation we could think of for float images.
//

template <class T>
inline T max(T a, T b)
{
    return (a<b)?b:a;
}

template <class T>
inline T min(T a, T b)
{
    return (a<b)?a:b;
}

template <class T>
inline T sqr(T v)
{
    return v*v;
}

inline float pseudo_div(float a, float b)
{
    return (b==0) ? 0 : (a/b);
}

inline float pseudo_inv(float b)
{
    return (b==0) ? 0 : (1/b);
}

#include "FloatImageOps.c"
@


1.4
log
@Image class is now CoreImage and named image types are
Image<P,T>.
@
text
@d10 1
a10 1
static char FloatDI_rcsid[] = "$Id: FloatDI.c,v 1.3 1993/11/17 18:16:48 thoth Exp $";
d14 4
d155 1
a155 1
    IA_ValueSet<float>	vs(i1.range());
@


1.3
log
@IPSIter is now PSIter<IntPoint>.
restriction functions now go in the individual image implementation modules.
pseudo-division is now avaliable.
@
text
@d10 1
a10 1
static char FloatDI_rcsid[] = "$Id: FloatDI.c,v 1.2 1993/10/05 19:33:08 thoth Exp thoth $";
d14 5
d63 1
a63 1
// and image-scalar operation we could think of for integer images.
d114 2
a115 2
    IA_FloatDiscreteImage	i1;
    IA_FloatDiscreteImage
d122 1
a122 1
	i10(IA_Image<IA_IntPoint,float>());
d125 1
a125 1
    (IA_Image<IA_IntPoint,float>&)i1 = 2;
d132 1
a132 1
    cout << (IA_Image<IA_IntPoint,float>&)i1;
d134 2
a135 2
//     IA_FloatDiscreteImage::read_IAA("");
//     IA_FloatDiscreteImage::read_IAA("","");
d148 1
a148 1
    compose((double(*)(double))0, (IA_Image<IA_IntPoint,float>&)i1);
@


1.2
log
@Move to new Closure naming convention.
@
text
@d10 1
a10 1
static char FloatDI_rcsid[] = "$Id: FloatDI.c,v 1.1 1993/09/15 12:52:30 thoth Exp thoth $";
d14 3
d40 1
a40 1
#include	"IPSIter.h"
d49 6
d77 10
@


1.1
log
@Initial revision
@
text
@d10 1
a10 1
static char FloatDI_rcsid[] = "$Id: FloatDiscreteImage.c,v 1.4 93/06/10 17:24:05 thoth Exp $";
d13 4
a16 1
// $Log:	FloatDiscreteImage.c,v $
d34 1
a34 1
#include	"OtherI.h"
d78 1
a78 1
class blah : public IA_OtherI<IA_IntPoint,float> {
d81 1
a81 1
    :IA_OtherI<IA_IntPoint,float>(IA_IntPointSet()) {}
d84 1
a84 1
    IA_OtherI<IA_IntPoint,float>* clone_self() const { return 0; }
@
