head	1.5;
access;
symbols
	bobbase:1.5
	bob:1.5.1
	r2_1:1.5
	r2_0:1.5
	r1_1_beta:1.4
	r1_1_alpha:1.3
	r1_0:1.3
	r0_11:1.3;
locks
	thoth:1.5.1.2; strict;
comment	@// @;


1.5
date	94.08.22.15.20.29;	author thoth;	state Exp;
branches
	1.5.1.1;
next	1.4;

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

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

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

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

1.5.1.1
date	95.01.09.18.14.26;	author thoth;	state Exp;
branches;
next	1.5.1.2;

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


desc
@Friendly Basepointer Inspector, used to allow friendly access
to convolutions that need it.
@


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

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

//
// It's the Friendly Basepointer Inspector class!
//

//
// $Log: FBI.h,v $
// Revision 1.4  1994/07/25  17:26:39  thoth
// Name sanitization
//
// Revision 1.3  1994/04/15  13:16:01  thoth
// adjustments to add new generics and rearrange arguments.
//
// Revision 1.2  1994/03/30  13:53:09  thoth
// FBI now has enough class parameters to describe friendliness of
// certain function templates.
// FBI functions are now inlines removing the need for ptrepository
// objects.
//
// Revision 1.1  1994/03/22  16:08:28  thoth
// Initial revision
//

#ifndef IA_FBI_h_
#define IA_FBI_h_

#include "Bit.h"
#include <complex.h>
#include "IntPoint.h"
#include "Set.h"

#if 0
template <class P,class T> class IA_BaseImage;
template <class P,class T> class IA_CoreImage;
template <class P,class T> class IA_Image;
#else
#include "Image.h"
#endif

#if 0
template <class I> class IA_BaseDT;
template <class I> class IA_DDTemplate;
#else
#include "DDTempl.h"
#endif

#if 0
template <class P, class Q> class IA_Neighborhood;
template <class P, class Q> class IA_BaseNbh;
#else
#include "Nbh.h"
#endif

template <class P, class Q, class R, class S, class T>
class IA_FBI {
private:
    static IA_BaseImage<P,T> * extract_baseptr(const IA_CoreImage<P,T>&i) {
	return i.bip;
    }
    static IA_BaseDT<IA_Image<P,T> > * extract_baseptr
	(const IA_DDTemplate<IA_Image<P,T> >&t) {
	    return t.bdtp;
	}
    static IA_DDTemplate<IA_Image<P,T> > make_DT
	(IA_BaseDT<IA_Image<P,T> > *p) {
	    return p;
	}
    static IA_BaseNbh<P,Q> *extract_baseptr(const IA_Neighborhood<P,Q>&nbh) {
	return nbh.bnbh;
    }
public:

#include "AllConv.h"

#if 0
    friend IA_Image<IA_Point<int>, T>
	generic_product (const IA_CoreImage<IA_Point<int>, T> &img,
			 const IA_DDTemplate< IA_Image<IA_Point<int>, T> > &,
			 const IA_Set<IA_Point<int> > &dest_ps,
			 T (*circle)(T,T),
			 T (*gamma)(T,T),
			 T gamma_zero,
			 T ring_zero,
			 const T*);
#else
    IA_Image<IA_Point<int>, R>
	generic_product (const IA_CoreImage<IA_Point<int>, S> &img,
			 const IA_DDTemplate< IA_Image<IA_Point<int>, T> > &,
			 const IA_Set<IA_Point<int> > &dest_ps,
			 R (*circle)(S,T),
			 R (*gamma)(R,R),
			 R gamma_zero,
			 S ring_zero,
			 const T*);
#endif

#if 1
    friend IA_Image<IA_Point<int>, T> neighborhood_reduction
	(const IA_CoreImage<IA_Point<int>, T> &img,
	 const IA_Neighborhood<IA_Point<int>,IA_Point<int> > &nbh,
	 const IA_Set<IA_Point<int> > &dst,
	 T (*gamma)(T, T),
	 T gamma_zero);

    friend IA_Image<IA_Point<int>, S> neighborhood_reduction
	(const IA_CoreImage<IA_Point<int>, T> &img,
	 const IA_Neighborhood<IA_Point<int>,IA_Point<int> > &nbh,
	 const IA_Set<IA_Point<int> > &dst,
	 T gamma_zero,
	 S (*Gamma)(T*, unsigned count),
	 const S*);

    friend IA_Image<IA_Point<int>, S> neighborhood_reduction
	(const IA_CoreImage<IA_Point<int>, T> &img,
	 const IA_Neighborhood<IA_Point<int>,IA_Point<int> > &nbh,
	 const IA_Set<IA_Point<int> > &dst,
	 S (*Gamma)(T*, unsigned count),
	 const S*);

    friend IA_Image<IA_Point<int>, T> neighborhood_reduction
	(const IA_Neighborhood<IA_Point<int>,IA_Point<int> > &nbh,
	 const IA_CoreImage<IA_Point<int>, T> &img,
	 const IA_Set<IA_Point<int> > &dst,
	 T (*gamma)(T, T),
	 T gamma_zero);

    friend IA_Image<IA_Point<int>, S> neighborhood_reduction
	(const IA_Neighborhood<IA_Point<int>,IA_Point<int> > &nbh,
	 const IA_CoreImage<IA_Point<int>, T> &img,
	 const IA_Set<IA_Point<int> > &dst,
	 T gamma_zero,
	 S (*Gamma)(T*, unsigned count),
	 const S*);

    friend IA_Image<IA_Point<int>, S> neighborhood_reduction
	(const IA_Neighborhood<IA_Point<int>,IA_Point<int> > &nbh,
	 const IA_CoreImage<IA_Point<int>, T> &img,
	 const IA_Set<IA_Point<int> > &dst,
	 S (*Gamma)(T*, unsigned count),
	 const S*);
#endif
};

#if 0
#if 1
#include "BitConv.h"
#include "UcharConv.h"
#include "IntConv.h"
#include "FloatConv.h"
#include "CplxConv.h"
#else
// the Crufty Interface Anchor class.
// Gets around problems with inline friend declarations inside
// template classes
class IA_CIA {
#include "BitConv.h"
#include "UcharConv.h"
#include "IntConv.h"
#include "FloatConv.h"
#include "CplxConv.h"
};
#endif
#endif

#endif IA_FBI_h_
@


1.5.1.1
log
@Support for making image operations friends.
@
text
@a13 3
// Revision 1.5  1994/08/22  15:20:29  thoth
// DOS-inspired name rework.
//
a34 1
#include "RGB.h"
a65 4
    static IA_Image<P,T> make_Image(IA_BaseImage<P,T> *p) {
	return IA_CoreImage<P,T>(p);
    }

a73 1

a79 1
#include "AllImgOps.h"
d81 11
d101 1
@


1.5.1.2
log
@CoreImage has been re-merged with Image.  All special stuff should be
friends of FBI now.
@
text
@a13 3
// Revision 1.5.1.1  1995/01/09  18:14:26  thoth
// Support for making image operations friends.
//
d44 1
d67 1
a67 1
    static IA_BaseImage<P,T> * extract_baseptr(const IA_Image<P,T>&i) {
d71 1
a71 1
	return IA_Image<P,T>(p);
d92 1
a92 1
	generic_product (const IA_Image<IA_Point<int>, S> &img,
d103 1
a103 1
	(const IA_Image<IA_Point<int>, T> &img,
d110 1
a110 1
	(const IA_Image<IA_Point<int>, T> &img,
d118 1
a118 1
	(const IA_Image<IA_Point<int>, T> &img,
d126 1
a126 1
	 const IA_Image<IA_Point<int>, T> &img,
d133 1
a133 1
	 const IA_Image<IA_Point<int>, T> &img,
d141 1
a141 1
	 const IA_Image<IA_Point<int>, T> &img,
@


1.4
log
@Name sanitization
@
text
@d14 3
d57 1
a57 1
#include "Neighborhood.h"
d79 1
a79 1
#include "AllConvolutions.h"
d152 5
a156 5
#include "BitConvolutions.h"
#include "UcharConvolutions.h"
#include "IntConvolutions.h"
#include "FloatConvolutions.h"
#include "ComplexConvolutions.h"
d162 5
a166 5
#include "BitConvolutions.h"
#include "UcharConvolutions.h"
#include "IntConvolutions.h"
#include "FloatConvolutions.h"
#include "ComplexConvolutions.h"
@


1.3
log
@adjustments to add new generics and rearrange arguments.
@
text
@d14 3
d79 4
a82 4
    friend IA_Image<IA_IntPoint, T>
	generic_product (const IA_CoreImage<IA_IntPoint, T> &img,
			 const IA_DDTemplate< IA_Image<IA_IntPoint, T> > &,
			 const IA_Set<IA_IntPoint> &dest_ps,
d89 4
a92 4
    IA_Image<IA_IntPoint, R>
	generic_product (const IA_CoreImage<IA_IntPoint, S> &img,
			 const IA_DDTemplate< IA_Image<IA_IntPoint, T> > &,
			 const IA_Set<IA_IntPoint> &dest_ps,
d101 4
a104 4
    friend IA_Image<IA_IntPoint, T> neighborhood_reduction
	(const IA_CoreImage<IA_IntPoint, T> &img,
	 const IA_Neighborhood<IA_IntPoint,IA_IntPoint> &nbh,
	 const IA_Set<IA_IntPoint> &dst,
d108 4
a111 4
    friend IA_Image<IA_IntPoint, S> neighborhood_reduction
	(const IA_CoreImage<IA_IntPoint, T> &img,
	 const IA_Neighborhood<IA_IntPoint,IA_IntPoint> &nbh,
	 const IA_Set<IA_IntPoint> &dst,
d116 4
a119 4
    friend IA_Image<IA_IntPoint, S> neighborhood_reduction
	(const IA_CoreImage<IA_IntPoint, T> &img,
	 const IA_Neighborhood<IA_IntPoint,IA_IntPoint> &nbh,
	 const IA_Set<IA_IntPoint> &dst,
d123 4
a126 4
    friend IA_Image<IA_IntPoint, T> neighborhood_reduction
	(const IA_Neighborhood<IA_IntPoint,IA_IntPoint> &nbh,
	 const IA_CoreImage<IA_IntPoint, T> &img,
	 const IA_Set<IA_IntPoint> &dst,
d130 4
a133 4
    friend IA_Image<IA_IntPoint, S> neighborhood_reduction
	(const IA_Neighborhood<IA_IntPoint,IA_IntPoint> &nbh,
	 const IA_CoreImage<IA_IntPoint, T> &img,
	 const IA_Set<IA_IntPoint> &dst,
d138 4
a141 4
    friend IA_Image<IA_IntPoint, S> neighborhood_reduction
	(const IA_Neighborhood<IA_IntPoint,IA_IntPoint> &nbh,
	 const IA_CoreImage<IA_IntPoint, T> &img,
	 const IA_Set<IA_IntPoint> &dst,
@


1.2
log
@FBI now has enough class parameters to describe friendliness of
certain function templates.
FBI functions are now inlines removing the need for ptrepository
objects.
@
text
@d14 6
d97 1
d105 9
a113 1
    friend IA_Image<IA_IntPoint, S> neighborhood_Reduction
a117 1
	 T gamma_zero,
d120 1
a120 1
    friend IA_Image<IA_IntPoint, T> neighborhood_reductioN
d127 1
a127 1
    friend IA_Image<IA_IntPoint, S> neighborhood_ReductioN
d131 8
a139 1
	 T gamma_zero,
d141 1
@


1.1
log
@Initial revision
@
text
@d13 4
a16 1
// $Log: CoreImage.h,v $
d41 8
a48 1
template <class P,class T>
d51 3
a53 1
    static IA_BaseImage<P,T> * extract_baseptr(const IA_CoreImage<P,T>&);
d55 10
a64 2
	(const IA_DDTemplate<IA_Image<P,T> >&);
    static IA_DDTemplate<IA_Image<P,T> > make_DT(IA_BaseDT<IA_Image<P,T> > *);
d69 1
d79 3
a81 4
#if 0
    template <class R, class U> friend
	IA_Image<IA_IntPoint, R>
	generic_product (const IA_CoreImage<IA_IntPoint, U> &img,
d84 1
a84 1
			 R (*circle)(U,T),
d87 1
a87 1
			 U ring_zero,
d90 30
d122 1
d140 1
@
