head	1.5;
access;
symbols
	r0_10:1.5
	Eglin_alpha_1:1.5;
locks; strict;
comment	@// @;


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

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

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

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

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


desc
@Created this new value iterator class
@


1.5
log
@Copyright Notices
@
text
@// Emacs: -*- C++ -*-

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

static char ConstDIVIterrcsid[] = "$Id: ConstDIVIter.c,v 1.4 93/04/17 18:46:56 thoth Exp Locker: thoth $";

// $Log:	ConstDIVIter.c,v $
// Revision 1.4  93/04/17  18:46:56  thoth
// Iterator support is no longer based on a switch statement.  We now
// use a virtual method.  The user can now provide faster iterators.
// 
// Revision 1.3  93/02/20  12:43:31  thoth
// There are now two sorts of BaseDIIters.
// 
// Revision 1.2  93/01/19  14:55:51  jnw
// Modified to support IA_ naming convention
// 
// Revision 1.1  92/11/12  17:01:15  jnw
// Initial revision
// 
// Revision 1.1  92/10/05  11:45:52  jnw
// Initial revision
// 

#include "ConstDIVIter.h"

template <class T>
IA_ConstDIVIter<T>::IA_ConstDIVIter(const IA_ConstDI<T> *img)
: IA_BaseDIVIter<T>(img)
{
    this->num_left = img->domain().card();
}

template <class T>
IA_ConstDIVIter<T>::IA_ConstDIVIter(const IA_ConstDIVIter<T> &iter)
: IA_BaseDIVIter<T>(iter.domain)
{
    this->num_left = iter.num_left;
}

template <class T>
int IA_ConstDIVIter<T>::next(T& pixel_value)
{
    if (this->num_left--) {
	pixel_value = this->cdip()->value;
	return 1;
    }
    return 0;
}





@


1.4
log
@Iterator support is no longer based on a switch statement.  We now
use a virtual method.  The user can now provide faster iterators.
@
text
@a1 1
static char ConstDIVIterrcsid[] = "$Id: ConstDIVIter.c,v 1.3 93/02/20 12:43:31 thoth Exp Locker: thoth $";
d3 7
d11 4
@


1.3
log
@There are now two sorts of BaseDIIters.
@
text
@d2 1
a2 1
static char ConstDIVIterrcsid[] = "$Id: ConstDIVIter.c,v 1.2 93/01/19 14:55:51 jnw Exp Locker: thoth $";
d5 3
d21 1
a21 2
IA_ConstDIVIter<T>::IA_ConstDIVIter(const IA_DiscreteImage<T>& img,
				    IA_ConstDI<T> *b)
d24 1
a24 2
    this->num_left = img.card();
    this->bdip = b;
a31 1
    this->bdip = iter.bdip;
d38 1
a38 1
	pixel_value = this->bdip->value;
@


1.2
log
@Modified to support IA_ naming convention
@
text
@d2 1
a2 1
static char ConstDIVIterrcsid[] = "$Id: ConstDIVIter.c,v 1.1 92/11/12 17:01:15 jnw Exp Locker: jnw $";
d5 3
d20 1
a20 1
: IA_BaseDIIter<T>(img)
d28 1
a28 1
: IA_BaseDIIter<T>(iter.domain)
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
static char ConstDIVIterrcsid[] = "$Id: ConstDIVIter.c,v 1.1 92/10/05 11:45:52 jnw Exp Locker: jnw $";
d5 3
d15 3
a17 2
ConstDIVIter<T>::ConstDIVIter(const DiscreteImage<T>& img, ConstDI<T> *b)
: BaseDIIter<T>(img)
d24 2
a25 2
ConstDIVIter<T>::ConstDIVIter(const ConstDIVIter<T> &iter)
: BaseDIIter<T>(iter.domain)
d32 1
a32 1
int ConstDIVIter<T>::next(T& pixel_value)
@
