#line 1 "/user/cvsspst/ees1cg/RAVL/RAVL-0.7/GUI/DPDisplay/DPDisplayImage.hh" // This file is part of RAVL, Recognition And Vision Library // Copyright (C) 2001, University of Surrey // This code may be redistributed under the terms of the GNU Lesser // General Public License (LGPL). See the lgpl.licence file for details or // see http://www.gnu.org/copyleft/lesser.html // file-header-ends-here #ifndef RAVLGUI_DPDISPLAYIMAGE_HEADER #define RAVLGUI_DPDISPLAYIMAGE_HEADER 1 //! rcsid="$Id: DPDisplayImage.hh,v 1.4 2002/02/05 11:50:36 craftit Exp $" //! lib=RavlDPDisplay //! file="Ravl/GUI/DPDisplay/DPDisplayImage.hh" //! author="Charles Galambos" //! docentry="Ravl.GUI.Data Display" #include "Ravl/GUI/DPDisplayObj.hh" #include "Ravl/Image/Image.hh" #include "Ravl/Image/ByteRGBValue.hh" namespace RavlGUIN { using namespace RavlImageN; //! userlevel=Develop //: DPDisplayObj to handle images. class DPDisplayImageRGBBodyC : public DPDisplayObjBodyC { public: DPDisplayImageRGBBodyC(const ImageC &img); //: Constructor virtual bool Draw(DPDisplayViewBodyC &canvas); //: Draw object to canvas. virtual IndexRange2dC Frame() const; //: Find bounding box for object. virtual bool Query(const Vector2dC &pnt,StringC &text); //: Query a point in the display. // Return true if point is within object. protected: ImageC img; }; //! userlevel=Normal //: DPDisplayObj to handle images. class DPDisplayImageRGBC : public DPDisplayObjC { public: DPDisplayImageRGBC(const ImageC &img) : DPDisplayObjC(*new DPDisplayImageRGBBodyC(img)) {} //: Construct from an image. DPDisplayImageRGBC() {} //: Default constructor. // creates an invalid handle. }; //:--------------------------------------------------------------------------------------- //! userlevel=Develop //: DPDisplayObj to handle images. class DPDisplayImageRealBodyC : public DPDisplayObjBodyC { public: DPDisplayImageRealBodyC(const ImageC &img); //: Constructor virtual bool Draw(DPDisplayViewBodyC &canvas); //: Draw object to canvas. virtual IndexRange2dC Frame() const; //: Find bounding box for object. virtual bool Query(const Vector2dC &pnt,StringC &text); //: Query a point in the display. // Return true if point is within object. protected: ImageC ScaleImage(const ImageC &inimg); //: Offset and scale image, then convert to ByteT image. ImageC img; ImageC realImg; }; //! userlevel=Normal //: DPDisplayObj to handle images. class DPDisplayImageRealC : public DPDisplayObjC { public: DPDisplayImageRealC(const ImageC &img) : DPDisplayObjC(*new DPDisplayImageRealBodyC(img)) {} //: Construct from an image. DPDisplayImageRealC() {} //: Default constructor. // creates an invalid handle. }; //:--------------------------------------------------------------------------------------- //! userlevel=Develop //: DPDisplayObj to handle images. class DPDisplayImageByteBodyC : public DPDisplayObjBodyC { public: DPDisplayImageByteBodyC(const ImageC &img); //: Constructor virtual bool Draw(DPDisplayViewBodyC &canvas); //: Draw object to canvas. virtual IndexRange2dC Frame() const; //: Find bounding box for object. virtual bool Query(const Vector2dC &pnt,StringC &text); //: Query a point in the display. // Return true if point is within object. protected: ImageC img; }; //! userlevel=Normal //: DPDisplayObj to handle images. class DPDisplayImageByteC : public DPDisplayObjC { public: DPDisplayImageByteC(const ImageC &img) : DPDisplayObjC(*new DPDisplayImageByteBodyC(img)) {} //: Construct from an image. DPDisplayImageByteC() {} //: Default constructor. // creates an invalid handle. }; } #endif