#ifndef IPSUBRECTANGLE_HEADER #define IPSUBRECTANGLE_HEADER 1 ///////////////////////////////////////////////////////// //! rcsid="$Id: SubRectangle.hh,v 1.3 2000/07/07 12:57:48 ees1cg Exp $" //! file="amma/Image/IPStream/IPBasic/SubRectangle.hh" //! lib=IP //! docentry="default.Charles Galambos" //! author="Charles Galambos" //! date="04/07/2000" #include "amma/DP/Process.hh" #include "amma/Image.hh" #include //! userlevel=Develop //: Get a sub rectangle. template class IPSubRectangleBodyC : public DPProcessBodyC,ImageC > { public: IPSubRectangleBodyC(const ImageRectangleC &ir) : srect(ir) {} //: Constructor. virtual ImageC Apply (const ImageC &im); //: Apply to image. // NB. The first 'len' applications will not be fully filtered. protected: ImageRectangleC srect; }; //! userlevel=Normal //: Get a sub rectangle. template class IPSubRectangleC : public DPProcessC,ImageC > { public: IPSubRectangleC() {} //: Default constructor. // Creates an invalid handle. IPSubRectangleC(const ImageRectangleC &ir) : DPProcessC,ImageC >(*new IPSubRectangleBodyC(ir)) {} //: Constructor. }; ////////////////////////////////////////////////////////////////////////////////////////// template ImageC IPSubRectangleBodyC::Apply (const ImageC &im) { return ImageC(im,srect); } #endif