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


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

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

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

1.3
date	93.01.19.14.55.48;	author jnw;	state Exp;
branches;
next	1.2;

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

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


desc
@Initial revision
@


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

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

static char ConstDIPIterrcsid[] = "$Id: ConstDIPIter.c,v 1.5 93/04/17 18:46:08 thoth Exp Locker: thoth $";

// $Log:	ConstDIPIter.c,v $
// Revision 1.5  93/04/17  18:46:08  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.4  93/02/20  12:43:22  thoth
// There are now two sorts of BaseDIIters.
// 
// Revision 1.3  93/01/19  14:55:48  jnw
// Modified to support IA_ naming convention
// 
// Revision 1.2  92/11/12  17:01:30  jnw
// Modified to go along with new value/pixel iter style
// 
// Revision 1.1  92/10/05  11:45:46  jnw
// Initial revision
// 

#include "ConstDIPIter.h"

template <class T>
IA_ConstDIPIter<T>::IA_ConstDIPIter(const IA_ConstDI<T> *img)
: IA_BaseDIPIter<T>(img), psiter(img->domain())
{
}

template <class T>
IA_ConstDIPIter<T>::IA_ConstDIPIter(const IA_ConstDIPIter<T> &iter)
: IA_BaseDIPIter<T>(iter.domain), psiter(iter.psiter)
{
}

template <class T>
int IA_ConstDIPIter<T>::next(IA_IntPoint& pixel_location, T& pixel_value)
{
    if (psiter(pixel_location)) {
	pixel_value = this->cdip()->value;
	return 1;
    }
    return 0;
}





@


1.5
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 ConstDIPIterrcsid[] = "$Id: ConstDIPIter.c,v 1.4 93/02/20 12:43:22 thoth Exp Locker: thoth $";
d3 7
d11 4
@


1.4
log
@There are now two sorts of BaseDIIters.
@
text
@d2 1
a2 1
static char ConstDIPIterrcsid[] = "$Id: ConstDIPIter.c,v 1.3 93/01/19 14:55:48 jnw Exp Locker: thoth $";
d5 3
d21 2
a22 3
IA_ConstDIPIter<T>::IA_ConstDIPIter(const IA_DiscreteImage<T>& img,
				    IA_ConstDI<T> *b)
: IA_BaseDIPIter<T>(img), psiter(b->ps)
a23 2
    this->more = this->psiter(curr);
    this->bdip = b;
a29 2
    this->more = iter.more;
    this->bdip = iter.bdip;
d35 2
a36 4
    if (this->more) {
	pixel_value = this->bdip->value;
	pixel_location = curr;
	this->more = this->psiter(curr);
@


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


1.2
log
@Modified to go along with new value/pixel iter style
@
text
@d2 1
a2 1
static char ConstDIPIterrcsid[] = "$Id: ConstDIPIter.c,v 1.1 92/10/05 11:45:46 jnw Exp Locker: jnw $";
d5 3
d15 3
a17 2
ConstDIPIter<T>::ConstDIPIter(const DiscreteImage<T>& img, ConstDI<T> *b)
: BaseDIIter<T>(img), psiter(b->ps)
d24 2
a25 2
ConstDIPIter<T>::ConstDIPIter(const ConstDIPIter<T> &iter)
: BaseDIIter<T>(iter.domain), psiter(iter.psiter)
d32 1
a32 1
int ConstDIPIter<T>::next(IntPoint& pixel_location, T& pixel_value)
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
static char ConstDIPIterrcsid[] = "$Id$";
d4 4
a7 1
// $Log$
d28 1
a28 1
int ConstDIPIter<T>::next(T& pixel_value, IntPoint& pixel_location)
@
