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


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

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

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

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

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

1.1
date	92.10.05.11.45.49;	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.
//


// $Log:	ConstDIPIter.h,v $
// Revision 1.5  93/04/17  18:46:53  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:28  thoth
// There are now two sorts of BaseDIIters.
// 
// Revision 1.3  93/01/19  14:55:50  jnw
// Modified to support IA_ naming convention
// 
// Revision 1.2  92/11/12  17:03:49  jnw
// Modified to match new pixel/value iter style
// 
// Revision 1.1  92/10/05  11:45:49  jnw
// Initial revision
// 

#ifndef ConstDIPIter_h_
#define ConstDIPIter_h_

#include <stdlib.h>
#include "IPSIter.h"
#include "BaseDIIter.h"
#include "ConstDI.h"


template <class T>
class IA_ConstDIPIter: public IA_BaseDIPIter<T> {
protected:
    // bdip points at the base image over which we're iterating.
    IA_ConstDI<T> *cdip() const { return (IA_ConstDI<T>*)domain; }
    
    // psiter is an iterator over bdip's PointSet.
    IA_IPSIter psiter;
    
public:
    
    IA_ConstDIPIter(const IA_ConstDI<T> *);
    IA_ConstDIPIter(const IA_ConstDIPIter&);
    
    ~IA_ConstDIPIter() {}
    
    IA_BaseDIPIter<T> * clone_self() { return new IA_ConstDIPIter(*this); }
    
    int next(IA_IntPoint&, T&);
    void reset() { psiter.reset(); }
    
    IA_BaseDI<T> *domain_() const { return this->domain; }
};

#endif
@


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
@d3 6
d10 4
@


1.4
log
@There are now two sorts of BaseDIIters.
@
text
@d4 3
a28 4
    // curr stores the current point position of the iterator.
    // this is necessary for the second form of call of next.
    IntPoint curr;
    
d30 1
a30 1
    IA_ConstDI<T> *bdip;
a34 4
    // more is true if there are any points remaining to be returned
    // by next().
    int more;
    
d37 1
a37 1
    IA_ConstDIPIter(const IA_DiscreteImage<T> &, IA_ConstDI<T> *);
d45 1
a45 1
    void reset() { psiter.reset(); this->more=psiter(curr); }
d47 1
a47 1
    IA_DiscreteImage<T> domain_() const { return this->domain; }
@


1.3
log
@Modified to support IA_ naming convention
@
text
@d4 3
d24 1
a24 1
class IA_ConstDIPIter: public IA_BaseDIIter<T> {
d47 1
a47 1
    IA_BaseDIIter<T> * clone_self() { return new IA_ConstDIPIter(*this); }
@


1.2
log
@Modified to match new pixel/value iter style
@
text
@d4 3
d21 1
a21 1
class ConstDIPIter: public BaseDIIter<T> {
d28 1
a28 1
    ConstDI<T> *bdip;
d31 1
a31 1
    IPSIter psiter;
d39 2
a40 2
    ConstDIPIter(const DiscreteImage<T> &, ConstDI<T> *);
    ConstDIPIter(const ConstDIPIter&);
d42 1
a42 1
    ~ConstDIPIter() {}
d44 1
a44 1
    BaseDIIter<T> * clone_self() { return new ConstDIPIter(*this); }
d46 1
a46 1
    int next(IntPoint&, T&);
d49 1
a49 1
    DiscreteImage<T> domain_() const { return this->domain; }
@


1.1
log
@Initial revision
@
text
@d3 4
a6 1
// $Log$
d23 1
a23 1

d26 1
a26 1

d29 1
a29 1

d33 1
a33 1

d35 1
a35 1

d38 1
a38 1

d40 1
a40 1

d42 2
a43 5
    int next(T&) {
	abort();
	return 0;
    }
    int next(T&, IntPoint&);
d45 1
a45 1

@
