head	1.4;
access;
symbols
	bobbase:1.4
	bob:1.4.1
	r2_1:1.3
	r2_0:1.3
	r1_1_beta:1.2
	r1_1_alpha:1.1
	r1_0:1.1
	r0_11:1.1;
locks
	thoth:1.4.1.3; strict;
comment	@// @;


1.4
date	94.12.23.01.05.10;	author ljr;	state Exp;
branches
	1.4.1.1;
next	1.3;

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

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

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

1.4.1.1
date	94.12.28.18.04.08;	author thoth;	state Exp;
branches;
next	1.4.1.2;

1.4.1.2
date	95.01.09.17.52.46;	author thoth;	state Exp;
branches;
next	1.4.1.3;

1.4.1.3
date	95.01.13.19.37.42;	author thoth;	state Exp;
branches;
next	;


desc
@RGB image include file
@


1.4
log
@changed #include <sys/types.h> to #include "compat.h"
@
text
@// Emacs: -*- C++ -*-

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


//
// $Log: RGBDI.h,v $
// Revision 1.3  1994/08/22  15:20:29  thoth
// DOS-inspired name rework.
//
// Revision 1.2  1994/07/25  17:26:39  thoth
// Name sanitization
//
// Revision 1.1  1994/03/02  14:01:28  jnw
// Initial revision
//
// 

#ifndef RGBDI_h_
#define RGBDI_h_

#include "compat.h"
#include "IntPoint.h"
#include "CoreImage.h"
#include "RGB.h"

#define SUPPRESS_INCLUDE
#include "Image.h"
#undef SUPPRESS_INCLUDE

class IA_Image<IA_Point<int>,IA_RGB>: public IA_CoreImage<IA_Point<int>,IA_RGB>
{
  public:
    IA_Image():IA_CoreImage<IA_Point<int>,IA_RGB>() {}

    IA_Image(const IA_Image<IA_Point<int>,IA_RGB>& im)
    :IA_CoreImage<IA_Point<int>,IA_RGB>(im) {}

    IA_Image(IA_Set<IA_Point<int> > ps, IA_RGB value)
    :IA_CoreImage<IA_Point<int>,IA_RGB>(ps,value) {}

    IA_Image(IA_Set<IA_Point<int> > ps, IA_RGB *vp, unsigned sz,
			int giveaway=0)
    :IA_CoreImage<IA_Point<int>,IA_RGB>(ps, vp, sz, giveaway) {}

    IA_Image(IA_Set<IA_Point<int> > ps, const IA_RGB *vp, unsigned sz)
    :IA_CoreImage<IA_Point<int>,IA_RGB>(ps, vp, sz) {}

    IA_Image(const IA_Point<int> *pp, unsigned plen, IA_RGB *vp, unsigned vlen,
	     int giveaway=0)
    :IA_CoreImage<IA_Point<int>,IA_RGB>(pp, plen, vp, vlen, giveaway) {}

    IA_Image(const IA_Point<int> *pp, unsigned plen, const IA_RGB *vp,
	     unsigned vlen)
    :IA_CoreImage<IA_Point<int>,IA_RGB>(pp, plen, vp, vlen) {}

    IA_Image(const IA_ClosureI<IA_Point<int>,IA_RGB> &img)
    :IA_CoreImage<IA_Point<int>,IA_RGB>(img) {}

    IA_Image(IA_Set<IA_Point<int> > ps, IA_RGB (*f)(const IA_Point<int>&))
    :IA_CoreImage<IA_Point<int>,IA_RGB>(ps,f) {}

    IA_Image( const IA_CoreImage<IA_Point<int>,IA_RGB> &d)
    :IA_CoreImage<IA_Point<int>,IA_RGB>(d) {}

    virtual ~IA_Image(){ }

    IA_Image& operator=(IA_RGB v) {
	(IA_CoreImage<IA_Point<int>,IA_RGB>&)*this = v;
	return *this;
    }

#include	"RGBIOps.h"

    static IA_Image read_PPM(istream &, int *maxval=0);
    static IA_Image read_PPM(const char *fname, int *maxval=0);

    ostream& write_PPM(ostream &, unsigned) const;
    ostream& write_PPM(ostream &) const;
    void write_PPM(const char *fname, unsigned) const;
    void write_PPM(const char *fname) const;
};

inline int operator!=(const IA_CoreImage<IA_Point<int>,IA_RGB> &lhs,
	       const IA_CoreImage<IA_Point<int>,IA_RGB> &rhs) {
    return ! (lhs == rhs);
}
inline int operator!=(const IA_CoreImage<IA_Point<int>,IA_RGB> &lhs, int rhs) {
    return ! (lhs == rhs);
}
inline int operator!=(int lhs, const IA_CoreImage<IA_Point<int>,IA_RGB> &rhs) {
    return ! (rhs == lhs);
}

//
//

inline ostream& write_PPM(const IA_CoreImage<IA_Point<int>,IA_RGB> &im, ostream &o, unsigned max) {
    return IA_Image<IA_Point<int>,IA_RGB>(im).write_PPM(o, max);
}

inline ostream& write_PPM(const IA_CoreImage<IA_Point<int>,IA_RGB> &im, ostream &o) {
    return IA_Image<IA_Point<int>,IA_RGB>(im).write_PPM(o);
}

inline void write_PPM(const IA_CoreImage<IA_Point<int>,IA_RGB> &im, const char *fname) {
    IA_Image<IA_Point<int>,IA_RGB>(im).write_PPM(fname);
}

inline void write_PPM(const IA_CoreImage<IA_Point<int>,IA_RGB> &im,
		      const char *fname, unsigned max) {
    IA_Image<IA_Point<int>,IA_RGB>(im).write_PPM(fname, max);
}

//
//

// compiler clue to allow inexact matches on a function template
ostream& operator <<(ostream&, const IA_CoreImage<IA_Point<int>,IA_RGB>&);


#endif
@


1.4.1.1
log
@Image I/O is now ROF.
image operations are now friendly with FBI.
@
text
@a10 3
// Revision 1.4  1994/12/23  01:05:10  ljr
// changed #include <sys/types.h> to #include "compat.h"
//
d76 9
a86 2
#include	"RGBIOps.h"

d101 3
a103 1
inline ostream& write_PPM(const IA_CoreImage<IA_Point<int>,IA_RGB> &im, ostream &o, unsigned max);
d105 3
a107 1
inline ostream& write_PPM(const IA_CoreImage<IA_Point<int>,IA_RGB> &im, ostream &o);
d109 3
a111 1
inline void write_PPM(const IA_CoreImage<IA_Point<int>,IA_RGB> &im, const char *fname);
d114 3
a116 1
		      const char *fname, unsigned max);
@


1.4.1.2
log
@Outline functions shouldn't have inline qualifier.
@
text
@a10 4
// Revision 1.4.1.1  1994/12/28  18:04:08  thoth
// Image I/O is now ROF.
// image operations are now friendly with FBI.
//
d97 1
a97 1
ostream& write_PPM(const IA_CoreImage<IA_Point<int>,IA_RGB> &im, ostream &o, unsigned max);
d99 1
a99 1
ostream& write_PPM(const IA_CoreImage<IA_Point<int>,IA_RGB> &im, ostream &o);
d101 1
a101 1
void write_PPM(const IA_CoreImage<IA_Point<int>,IA_RGB> &im, const char *fname);
d103 1
a103 1
void write_PPM(const IA_CoreImage<IA_Point<int>,IA_RGB> &im,
@


1.4.1.3
log
@CoreImage has been re-merged with Image.  All special stuff should be
friends of FBI now.
@
text
@a10 3
// Revision 1.4.1.2  1995/01/09  17:52:46  thoth
// Outline functions shouldn't have inline qualifier.
//
d34 1
a34 1
//#include "Image.h"
d41 1
a41 2
#if 0
class IA_Image<IA_Point<int>,IA_RGB>: public IA_Image<IA_Point<int>,IA_RGB>
d44 1
a44 1
    IA_Image():IA_Image<IA_Point<int>,IA_RGB>() {}
d47 1
a47 1
    :IA_Image<IA_Point<int>,IA_RGB>(im) {}
d50 1
a50 1
    :IA_Image<IA_Point<int>,IA_RGB>(ps,value) {}
d54 1
a54 1
    :IA_Image<IA_Point<int>,IA_RGB>(ps, vp, sz, giveaway) {}
d57 1
a57 1
    :IA_Image<IA_Point<int>,IA_RGB>(ps, vp, sz) {}
d61 1
a61 1
    :IA_Image<IA_Point<int>,IA_RGB>(pp, plen, vp, vlen, giveaway) {}
d65 1
a65 1
    :IA_Image<IA_Point<int>,IA_RGB>(pp, plen, vp, vlen) {}
d68 1
a68 1
    :IA_Image<IA_Point<int>,IA_RGB>(img) {}
d71 1
a71 1
    :IA_Image<IA_Point<int>,IA_RGB>(ps,f) {}
d73 2
a74 2
    IA_Image( const IA_Image<IA_Point<int>,IA_RGB> &d)
    :IA_Image<IA_Point<int>,IA_RGB>(d) {}
d79 1
a79 1
	(IA_Image<IA_Point<int>,IA_RGB>&)*this = v;
a83 1
#endif
d87 2
a88 2
inline int operator!=(const IA_Image<IA_Point<int>,IA_RGB> &lhs,
	       const IA_Image<IA_Point<int>,IA_RGB> &rhs) {
d91 1
a91 1
inline int operator!=(const IA_Image<IA_Point<int>,IA_RGB> &lhs, int rhs) {
d94 1
a94 1
inline int operator!=(int lhs, const IA_Image<IA_Point<int>,IA_RGB> &rhs) {
d101 1
a101 1
ostream& write_PPM(const IA_Image<IA_Point<int>,IA_RGB> &im, ostream &o, unsigned max);
d103 1
a103 1
ostream& write_PPM(const IA_Image<IA_Point<int>,IA_RGB> &im, ostream &o);
d105 1
a105 1
void write_PPM(const IA_Image<IA_Point<int>,IA_RGB> &im, const char *fname);
d107 1
a107 1
void write_PPM(const IA_Image<IA_Point<int>,IA_RGB> &im,
d114 1
a114 1
ostream& operator <<(ostream&, const IA_Image<IA_Point<int>,IA_RGB>&);
@


1.3
log
@DOS-inspired name rework.
@
text
@d11 3
d25 1
a25 1
#include <sys/types.h>
@


1.2
log
@Name sanitization
@
text
@d11 3
d73 1
a73 1
#include	"RGBImageOps.h"
@


1.1
log
@Initial revision
@
text
@d10 4
a13 1
// $Log$
d28 1
a28 1
class IA_Image<IA_IntPoint,IA_RGB>: public IA_CoreImage<IA_IntPoint,IA_RGB>
d31 1
a31 1
    IA_Image():IA_CoreImage<IA_IntPoint,IA_RGB>() {}
d33 2
a34 2
    IA_Image(const IA_Image<IA_IntPoint,IA_RGB>& im)
    :IA_CoreImage<IA_IntPoint,IA_RGB>(im) {}
d36 2
a37 2
    IA_Image(IA_IntPointSet ps, IA_RGB value)
    :IA_CoreImage<IA_IntPoint,IA_RGB>(ps,value) {}
d39 1
a39 1
    IA_Image(IA_IntPointSet ps, IA_RGB *vp, unsigned sz,
d41 1
a41 1
    :IA_CoreImage<IA_IntPoint,IA_RGB>(ps, vp, sz, giveaway) {}
d43 2
a44 2
    IA_Image(IA_IntPointSet ps, const IA_RGB *vp, unsigned sz)
    :IA_CoreImage<IA_IntPoint,IA_RGB>(ps, vp, sz) {}
d46 1
a46 1
    IA_Image(const IA_IntPoint *pp, unsigned plen, IA_RGB *vp, unsigned vlen,
d48 1
a48 1
    :IA_CoreImage<IA_IntPoint,IA_RGB>(pp, plen, vp, vlen, giveaway) {}
d50 1
a50 1
    IA_Image(const IA_IntPoint *pp, unsigned plen, const IA_RGB *vp,
d52 1
a52 1
    :IA_CoreImage<IA_IntPoint,IA_RGB>(pp, plen, vp, vlen) {}
d54 2
a55 2
    IA_Image(const IA_ClosureI<IA_IntPoint,IA_RGB> &img)
    :IA_CoreImage<IA_IntPoint,IA_RGB>(img) {}
d57 2
a58 2
    IA_Image(IA_IntPointSet ps, IA_RGB (*f)(const IA_IntPoint&))
    :IA_CoreImage<IA_IntPoint,IA_RGB>(ps,f) {}
d60 2
a61 2
    IA_Image( const IA_CoreImage<IA_IntPoint,IA_RGB> &d)
    :IA_CoreImage<IA_IntPoint,IA_RGB>(d) {}
d66 1
a66 1
	(IA_CoreImage<IA_IntPoint,IA_RGB>&)*this = v;
d81 2
a82 2
inline int operator!=(const IA_CoreImage<IA_IntPoint,IA_RGB> &lhs,
	       const IA_CoreImage<IA_IntPoint,IA_RGB> &rhs) {
d85 1
a85 1
inline int operator!=(const IA_CoreImage<IA_IntPoint,IA_RGB> &lhs, int rhs) {
d88 1
a88 1
inline int operator!=(int lhs, const IA_CoreImage<IA_IntPoint,IA_RGB> &rhs) {
d95 2
a96 2
inline ostream& write_PPM(const IA_CoreImage<IA_IntPoint,IA_RGB> &im, ostream &o, unsigned max) {
    return IA_Image<IA_IntPoint,IA_RGB>(im).write_PPM(o, max);
d99 2
a100 2
inline ostream& write_PPM(const IA_CoreImage<IA_IntPoint,IA_RGB> &im, ostream &o) {
    return IA_Image<IA_IntPoint,IA_RGB>(im).write_PPM(o);
d103 2
a104 2
inline void write_PPM(const IA_CoreImage<IA_IntPoint,IA_RGB> &im, const char *fname) {
    IA_Image<IA_IntPoint,IA_RGB>(im).write_PPM(fname);
d107 1
a107 1
inline void write_PPM(const IA_CoreImage<IA_IntPoint,IA_RGB> &im,
d109 1
a109 1
    IA_Image<IA_IntPoint,IA_RGB>(im).write_PPM(fname, max);
d116 1
a116 1
ostream& operator <<(ostream&, const IA_CoreImage<IA_IntPoint,IA_RGB>&);
@
