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


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

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

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


desc
@Initial revision
@


1.3
log
@speed up the construction of most images.
fixed a few typos.
added image read and write functions.
@
text
@// Emacs: -*- C++ -*-

// $Log:	IntDI.h,v $
// Revision 1.2  93/01/19  14:56:31  jnw
// Modified to support IA_ naming convention
// 
// Revision 1.1  92/10/05  11:50:22  jnw
// Initial revision
// 

#ifndef IntDiscreteImage_h_
#define IntDiscreteImage_h_

#include "DiscreteImage.h"
#include "ArithDI.h"
#include "BitwiseDI.h"
#include "LatticeDI.h"

class IA_FloatDiscreteImage;

class IA_IntDiscreteImage: public IA_ArithDI<int>,
public IA_BitwiseDI<int>, public IA_LatticeDI<int> {
public:
    IA_IntDiscreteImage():IA_DiscreteImage<int>() {};

    IA_IntDiscreteImage(const IA_IntDiscreteImage& im)
    :IA_DiscreteImage<int>(im) {
	//(*(IA_DiscreteImage<int> *)this) = (IA_DiscreteImage<int>) im;
    }

    IA_IntDiscreteImage(int value, IA_IntPointSet& ps)
    :IA_DiscreteImage<int>(value,ps) {
	//(*(IA_DiscreteImage<int> *)this) = IA_DiscreteImage<int>( value, ps);
    }

    IA_IntDiscreteImage(int *vp, const IA_IntPointSet& ps, int card)
    :IA_DiscreteImage<int>(vp,ps,card) {
	//(*(IA_DiscreteImage<int> *)this) = IA_DiscreteImage<int>( vp, ps, card);
    }

    IA_IntDiscreteImage(int (*vf)(const IA_IntPoint&), IA_IntPointSet& ps)
    :IA_DiscreteImage<int>(vf,ps) {
	//(*(IA_DiscreteImage<int> *)this) =IA_DiscreteImage<int>( vf, ps);
    }

    virtual ~IA_IntDiscreteImage(){ }

    IA_IntDiscreteImage(const IA_ArithDI<int> &a)
    :IA_DiscreteImage<int>(a) {
	//(*(IA_DiscreteImage<int> *)this) = (IA_DiscreteImage<int>)a;
    }

    IA_IntDiscreteImage( const IA_BitwiseDI<int> &b)
    :IA_DiscreteImage<int>(b) {
	//(*(IA_DiscreteImage<int> *)this) = (IA_DiscreteImage<int>)b;
    }
    
    IA_IntDiscreteImage( const IA_LatticeDI<int> &l)
    :IA_DiscreteImage<int>(l) {
	//(*(IA_DiscreteImage<int> *)this) = (IA_DiscreteImage<int>)d;
    }

    IA_IntDiscreteImage( const IA_DiscreteImage<int> &d)
    :IA_DiscreteImage<int>(d) {
	//(*(IA_DiscreteImage<int> *)this) = d;
    }

    friend IA_FloatDiscreteImage aint  (IA_FloatDiscreteImage);
    friend IA_FloatDiscreteImage anint (IA_FloatDiscreteImage);
    friend IA_FloatDiscreteImage ceil  (IA_FloatDiscreteImage);
    friend IA_FloatDiscreteImage floor (IA_FloatDiscreteImage);
    friend IA_FloatDiscreteImage rint  (IA_FloatDiscreteImage);
    
    friend IA_IntDiscreteImage   irint (const IA_FloatDiscreteImage&);
    friend IA_IntDiscreteImage   nint  (const IA_FloatDiscreteImage&);
    friend IA_IntDiscreteImage   trunc (const IA_FloatDiscreteImage&);
    
    friend ostream& operator <<(ostream&, IA_IntDiscreteImage);

    friend      int    operator <   (const IA_IntDiscreteImage&, float);
    friend      int    operator <=  (const IA_IntDiscreteImage&, float);
    friend      int    operator >   (const IA_IntDiscreteImage&, float);
    friend      int    operator >=  (const IA_IntDiscreteImage&, float);
    friend      int    operator ==  (const IA_IntDiscreteImage&, float);
    friend      int    operator !=  (const IA_IntDiscreteImage&, float);
    
    friend      int    operator <   (float, const IA_IntDiscreteImage&);
    friend      int    operator <=  (float, const IA_IntDiscreteImage&);
    friend      int    operator >   (float, const IA_IntDiscreteImage&);
    friend      int    operator >=  (float, const IA_IntDiscreteImage&);
    friend      int    operator ==  (float, const IA_IntDiscreteImage&);
    friend      int    operator !=  (float, const IA_IntDiscreteImage&);

    static IA_IntDiscreteImage read_PGM(istream &);
    ostream &write_PGM(ostream &) const;
};

#endif
@


1.2
log
@Modified to support IA_ naming convention
@
text
@d4 3
d26 3
a28 2
    IA_IntDiscreteImage(const IA_IntDiscreteImage& im) {
	(*(IA_DiscreteImage<int> *)this) = (IA_DiscreteImage<int>) im;
d31 3
a33 2
    IA_IntDiscreteImage(int value, IA_IntPointSet& ps) {
	(*(IA_DiscreteImage<int> *)this) = IA_DiscreteImage<int>( value, ps);
d36 3
a38 2
    IA_IntDiscreteImage(int *vp, IA_IntPointSet& ps) {
	(*(IA_DiscreteImage<int> *)this) = IA_DiscreteImage<int>( vp, ps);
d41 3
a43 2
    IA_IntDiscreteImage(int (*vf)(IA_IntPoint&), IA_IntPointSet& ps){
	(*(IA_DiscreteImage<int> *)this) =IA_ DiscreteImage<int>( vf, ps);
d48 3
a50 2
    IA_IntDiscreteImage( IA_ArithDI<int> a) {
	(*(IA_DiscreteImage<int> *)this) = (IA_DiscreteImage<int>)a;
d53 3
a55 2
    IA_IntDiscreteImage( const IA_BitwiseDI<int> &b) {
	(*(IA_DiscreteImage<int> *)this) = (IA_DiscreteImage<int>)b;
d58 3
a60 2
    IA_IntDiscreteImage( const IA_LatticeDI<int> &d) {
	(*(IA_DiscreteImage<int> *)this) = (IA_DiscreteImage<int>)d;
d63 3
a65 2
    IA_IntDiscreteImage( const IA_DiscreteImage<int> &d) {
	(*(IA_DiscreteImage<int> *)this) = d;
d78 1
a78 1
    friend ostream& operator <<(ostream&, IntDiscreteImage);
d93 3
a95 1
    
@


1.1
log
@Initial revision
@
text
@d3 4
a6 1
// $Log$
d16 1
a16 1
class FloatDiscreteImage;
d18 2
a19 2
class IntDiscreteImage: public ArithDI<int>,
public BitwiseDI<int>, public LatticeDI<int> {
d21 1
a21 1
    IntDiscreteImage():DiscreteImage<int>() {};
d23 2
a24 2
    IntDiscreteImage(const IntDiscreteImage& im) {
	(*(DiscreteImage<int> *)this) = (DiscreteImage<int>) im;
d27 2
a28 2
    IntDiscreteImage(int value, IntPointSet& ps) {
	(*(DiscreteImage<int> *)this) = DiscreteImage<int>( value, ps);
d31 2
a32 2
    IntDiscreteImage(int *vp, IntPointSet& ps) {
	(*(DiscreteImage<int> *)this) = DiscreteImage<int>( vp, ps);
d35 2
a36 2
    IntDiscreteImage(int (*vf)(IntPoint&), IntPointSet& ps){
	(*(DiscreteImage<int> *)this) = DiscreteImage<int>( vf, ps);
d39 1
a39 1
    virtual ~IntDiscreteImage(){ }
d41 2
a42 2
    IntDiscreteImage( ArithDI<int> a) {
	(*(DiscreteImage<int> *)this) = (DiscreteImage<int>)a;
d45 2
a46 2
    IntDiscreteImage( const BitwiseDI<int> &b) {
	(*(DiscreteImage<int> *)this) = (DiscreteImage<int>)b;
d49 2
a50 2
    IntDiscreteImage( const LatticeDI<int> &d) {
	(*(DiscreteImage<int> *)this) = (DiscreteImage<int>)d;
d53 2
a54 2
    IntDiscreteImage( const DiscreteImage<int> &d) {
	(*(DiscreteImage<int> *)this) = d;
d57 5
a61 5
    friend FloatDiscreteImage aint  (FloatDiscreteImage);
    friend FloatDiscreteImage anint (FloatDiscreteImage);
    friend FloatDiscreteImage ceil  (FloatDiscreteImage);
    friend FloatDiscreteImage floor (FloatDiscreteImage);
    friend FloatDiscreteImage rint  (FloatDiscreteImage);
d63 3
a65 3
    friend IntDiscreteImage   irint (const FloatDiscreteImage&);
    friend IntDiscreteImage   nint  (const FloatDiscreteImage&);
    friend IntDiscreteImage   trunc (const FloatDiscreteImage&);
d69 6
a74 6
    friend      int    operator <   (const IntDiscreteImage&, float);
    friend      int    operator <=  (const IntDiscreteImage&, float);
    friend      int    operator >   (const IntDiscreteImage&, float);
    friend      int    operator >=  (const IntDiscreteImage&, float);
    friend      int    operator ==  (const IntDiscreteImage&, float);
    friend      int    operator !=  (const IntDiscreteImage&, float);
d76 6
a81 6
    friend      int    operator <   (float, const IntDiscreteImage&);
    friend      int    operator <=  (float, const IntDiscreteImage&);
    friend      int    operator >   (float, const IntDiscreteImage&);
    friend      int    operator >=  (float, const IntDiscreteImage&);
    friend      int    operator ==  (float, const IntDiscreteImage&);
    friend      int    operator !=  (float, const IntDiscreteImage&);
@
