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


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

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

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


desc
@Generic iterator that will work on
ANY image implementation.
@


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

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

static char OtherDIIter_rcsid[] = "$Id: OtherDIIter.c,v 1.2 93/04/17 18:45:09 thoth Exp Locker: thoth $";

//
// $Log:	OtherDIIter.c,v $
// Revision 1.2  93/04/17  18:45:09  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.1  93/03/10  13:00:03  thoth
// Initial revision
// 

#include "OtherDIIter.h"
#include "BaseDI.h"

template <class T>
IA_OtherDIVIter<T>::IA_OtherDIVIter(const IA_BaseDI<T>* img)
     :IA_BaseDIVIter<T>(img), diter(img->domain()) { }


template <class T>
IA_OtherDIVIter<T>::IA_OtherDIVIter(const IA_OtherDIVIter<T>& iter)
     :IA_BaseDIVIter<T>(iter.domain), diter(iter.diter) { }

template <class T>
int IA_OtherDIVIter<T>::next(T &v)
{
  IA_IntPoint	ip;
  if (!diter(ip))
    return 0;
  v = (*domain)(ip);
  return 1;
}

//
//


template <class T>
IA_OtherDIPIter<T>::IA_OtherDIPIter(const IA_BaseDI<T>* img)
     :IA_BaseDIPIter<T>(img), diter(img->domain()) { }


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

template <class T>
int IA_OtherDIPIter<T>::next(IA_IntPoint &ip, T &v)
{
  if (!diter(ip))
    return 0;
  v = (*domain)(ip);
  return 1;
}
@


1.2
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 OtherDIIter_rcsid[] = "$Id: OtherDIIter.c,v 1.1 93/03/10 13:00:03 thoth Exp Locker: thoth $";
d4 7
d12 4
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
static char OtherDIIter_rcsid[] = "$Id: ConstDIVIter.c,v 1.3 93/02/20 12:43:31 thoth Exp $";
d5 4
a8 1
// $Log:	ConstDIVIter.c,v $
d11 1
d14 2
a15 2
IA_OtherDIVIter<T>::IA_OtherDIVIter(const IA_DiscreteImage<T>& img)
     :IA_BaseDIVIter<T>(img), diter(img.domain()) { }
d25 1
a25 1
  IntPoint	ip;
d28 1
a28 1
  v = domain(ip);
d37 2
a38 2
IA_OtherDIPIter<T>::IA_OtherDIPIter(const IA_DiscreteImage<T>& img)
     :IA_BaseDIPIter<T>(img), diter(img.domain()) { }
d50 1
a50 1
  v = domain(ip);
@
