KSquare Utilities
MorphOpStretcher.h
Go to the documentation of this file.
1 /* MorphOpStretcher.cpp -- Stretches image by a specified factor.
2  * Copyright (C) 1994-2014 Kurt Kramer
3  * For conditions of distribution and use, see copyright notice in KKB.h
4  */
5 
6 #ifndef _MORPHOPSTRETCHER_
7 #define _MORPHOPSTRETCHER_
8 
9 #include "KKBaseTypes.h"
10 #include "MorphOp.h"
11 
12 
13 #if !defined(_RASTER_)
14 namespace KKB
15 {
16  class Raster;
17  typedef Raster* RasterPtr;
18  typedef Raster const* RasterConstPtr;
19 }
20 #endif
21 
22 
23 
24 namespace KKB
25 {
26  class MorphOpStretcher : public MorphOp
27  {
28  public:
29  MorphOpStretcher (float _rowFactor,
30  float _colFactor
31  );
32 
33  virtual ~MorphOpStretcher ();
34 
35  float ColFactor () const {return colFactor;}
36  float RowFactor () const {return rowFactor;}
37 
39 
40  virtual RasterPtr PerformOperation (RasterConstPtr _image);
41 
43 
44  private:
45  float rowFactor;
46  float colFactor;
47 
48  class CellFactor;
49  typedef CellFactor* CellFactorPtr;
50 
51  CellFactorPtr BuildCellFactors (float factor,
52  kkuint32 cellFactorsCount
53  );
54 
55  void UpdateFactors (kkuint32 height,
56  kkuint32 width
57  );
58 
59  kkuint32 rowFactorsCount;
60  CellFactor* rowFactors;
61 
62  kkuint32 colFactorsCount;
63  CellFactor* colFactors;
64 
65  }; /* MorphOpStretcher */
66 
68 
69 } /* KKB */
70 
71 
72 
73 
74 #endif
MorphOpStretcher * MorphOpStretcherPtr
__int32 kkint32
Definition: KKBaseTypes.h:88
float ColFactor() const
A class that is used by to represent a single image in memory.
Definition: Raster.h:108
unsigned __int32 kkuint32
Definition: KKBaseTypes.h:89
virtual RasterPtr PerformOperation(RasterConstPtr _image)
KKTHread * KKTHreadPtr
float RowFactor() const
MorphOpStretcher(float _rowFactor, float _colFactor)
Base class for all Morphological operations.
Definition: MorphOp.h:44
virtual OperationType Operation() const