head	1.3;
access;
symbols
	bobbase:1.3
	bob:1.3
	r2_1:1.2
	r2_0:1.2
	r1_1_beta:1.2
	r1_1_alpha:1.2
	r1_0:1.2
	r0_11:1.2
	r0_10:1.2
	r0_9:1.2;
locks; strict;
comment	@// @;


1.3
date	94.12.12.17.13.45;	author fjsoria;	state Exp;
branches;
next	1.2;

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

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


desc
@image restriction to a pointset.  declarations.
@


1.3
log
@missing ; after template declaration
@
text
@// Emacs -*- C++ -*-

#ifndef restrict_h_
#define restrict_h_

#include "BaseI.h"
#include "VectorI.h"
#include <complex.h>

template <class T>
IA_BaseImage<IA_Point<int>,T> *restrictD_toD
(
 const IA_BaseImage<IA_Point<int>,T> *im ,
 const IA_Set<IA_Point<int> > &ips
 );

// The actual definition of these functions is placed in the
// derivation module (i.e. UcharDI.c).  The function body looks like
// this:  return restrictD_toD(im, ps);

#if 1
template <class T, class P>
IA_BaseImage<IA_Point<int>, T> *
restrict_toD(const IA_BaseImage<P, T> *, const IA_Set<IA_Point<int> > &);
#else

// Defining them as inline here leaves a LOT of undefined symbols in
// the instantiation object and causes otherwise unneeded .o files to
// be linked in to satisfy the undefined symbols.

IA_BaseImage<IA_Point<int>,u_char> *restrict_toD(const IA_BaseImage<IA_Point<int>, u_char> *im, const IA_Set<IA_Point<int> > &ips);

IA_BaseImage<IA_Point<int>,int> *restrict_toD(const IA_BaseImage<IA_Point<int>, int> *im, const IA_Set<IA_Point<int> > &ips);

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

// IA_BaseImage<IA_Point<int>,double> *restrict_toD(const IA_BaseImage<IA_Point<int>, double> *im, const IA_Set<IA_Point<int> > &ips);

IA_BaseImage<IA_Point<int>,complex> *restrict_toD(const IA_BaseImage<IA_Point<int>, complex> *im, const IA_Set<IA_Point<int> > &ips);

#endif


//
template <class T>
IA_BaseImage<IA_Point<int>,T> *restrictC_toD
  (
   const IA_BaseImage<IA_Point<double>,T> *im,
   const IA_Set<IA_Point<int> > &ips
   );

#if 1
//  The body of these functions should look like this:
// return restrictC_toD(im, ips);

 

   // see above

#else
// IA_BaseImage<IA_Point<int>,u_char> *restrict_toD(const IA_BaseImage<IA_Point<double>, u_char> *im, const IA_Set<IA_Point<int> > &ips);

// IA_BaseImage<IA_Point<int>,int> *restrict_toD(const IA_BaseImage<IA_Point<double>, int> *im, const IA_Set<IA_Point<int> > &ips);

IA_BaseImage<IA_Point<int>,float> *restrict_toD(const IA_BaseImage<IA_Point<double>, float> *im, const IA_Set<IA_Point<int> > &ips);

// IA_BaseImage<IA_Point<int>,double> *restrict_toD(const IA_BaseImage<IA_Point<double>, double> *im, const IA_Set<IA_Point<int> > &ips);

// IA_BaseImage<IA_Point<int>,complex> *restrict_toD(const IA_BaseImage<IA_Point<double>, complex> *im, const IA_Set<IA_Point<int> > &ips);
#endif

#endif
@


1.2
log
@presence of individual function declarations was driving CFront
error that caused the generation of virtual tables for referenced
template types.  this sucks so we made a template function
that is specialized in each implementation of an image.
@
text
@d24 1
a24 1
restrict_toD(const IA_BaseImage<P, T> *, const IA_Set<IA_Point<int> > &)
d43 1
d52 1
d56 1
a56 1
#if 1
@


1.1
log
@Initial revision
@
text
@d8 1
d12 28
a39 4
  (
   const IA_BaseImage<IA_Point<int>,T> *im ,
   const IA_Set<IA_Point<int> > &ips
   );
d41 1
a41 15
inline IA_BaseImage<IA_Point<int>,u_char> *restrict_toD(const IA_BaseImage<IA_Point<int>, u_char> *im, const IA_Set<IA_Point<int> > &ips) {
    return restrictD_toD(im, ips);
}

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

inline 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);
}

inline IA_BaseImage<IA_Point<int>,double> *restrict_toD(const IA_BaseImage<IA_Point<int>, double> *im, const IA_Set<IA_Point<int> > &ips) {
    return restrictD_toD(im, ips);
}
d51 18
a68 15
inline IA_BaseImage<IA_Point<int>,u_char> *restrict_toD(const IA_BaseImage<IA_Point<double>, u_char> *im, const IA_Set<IA_Point<int> > &ips) {
    return restrictC_toD(im, ips);
}

inline IA_BaseImage<IA_Point<int>,int> *restrict_toD(const IA_BaseImage<IA_Point<double>, int> *im, const IA_Set<IA_Point<int> > &ips) {
    return restrictC_toD(im, ips);
}

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

inline IA_BaseImage<IA_Point<int>,double> *restrict_toD(const IA_BaseImage<IA_Point<double>, double> *im, const IA_Set<IA_Point<int> > &ips) {
    return restrictC_toD(im, ips);
}
@
