head     1.2;
branch   ;
access   ;
symbols  ;
locks    ; strict;
comment  @// @;


1.2
date     93.01.19.14.56.23;  author jnw;  state Exp;
branches ;
next     1.1;

1.1
date     92.11.14.09.36.21;  author jnw;  state Exp;
branches ;
next     ;


desc
@initial revision
@


1.2
log
@Modified to support IA_ naming convention
@
text
@// Emacs: -*- C++ -*-
static char FunctionRefDIPIter_rcsid[]
= "$Id: FunctionRefDIPIter.c,v 1.1 92/11/14 09:36:21 jnw Exp Locker: jnw $";

// $Log:	FunctionRefDIPIter.c,v $
// Revision 1.1  92/11/14  09:36:21  jnw
// Initial revision
// 

#include "FunctionRefDIPIter.h"

template <class T>
IA_FunctionRefDIPIter<T>::IA_FunctionRefDIPIter(const IA_DiscreteImage<T>& img,
						IA_FunctionRefDI<T> *b)
: IA_BaseDIIter<T>(img), psiter(b->ps)
{
    this->more = this->psiter(this->curr);
    this->bdip = b;
}

template <class T>
IA_FunctionRefDIPIter<T>::IA_FunctionRefDIPIter(const IA_FunctionRefDIPIter<T>
						&iter)
: IA_BaseDIIter<T>(iter.domain), psiter(iter.psiter)
{
    this->more = iter.more;
    this->bdip = iter.bdip;
}

template <class T>
int IA_FunctionRefDIPIter<T>::next(IA_IntPoint& pixel_location, T& pixel_value)
{
    if (this->more) {
	pixel_value = this->bdip->func(this->curr);
	pixel_location = this->curr;
	this->more = this->psiter(this->curr);
	return 1;
    } else {
	return 0;
    }
}




@


1.1
log
@Initial revision
@
text
@d3 1
a3 1
= "$Id$";
d5 4
a8 1
// $Log$
d13 3
a15 2
FunctionRefDIPIter<T>::FunctionRefDIPIter(const DiscreteImage<T>& img, FunctionRefDI<T> *b)
: BaseDIIter<T>(img), psiter(b->ps)
d22 3
a24 2
FunctionRefDIPIter<T>::FunctionRefDIPIter(const FunctionRefDIPIter<T> &iter)
: BaseDIIter<T>(iter.domain), psiter(iter.psiter)
d31 1
a31 1
int FunctionRefDIPIter<T>::next(IntPoint& pixel_location, T& pixel_value)
@
