KSquare Utilities
MorphOpBinarize.h
Go to the documentation of this file.
1 /* MorphOpBinarize.cpp -- Morphological operator used to Binarize image.
2  * Copyright (C) 1994-2014 Kurt Kramer
3  * For conditions of distribution and use, see copyright notice in KKB.h
4  */
5 #if !defined(_MORPHOPBINARIZE_)
6 #define _MORPHOPBINARIZE_
7 
8 #include "KKBaseTypes.h"
9 #include "MorphOp.h"
10 
11 
12 #if !defined(_RASTER_)
13 namespace KKB
14 {
15  class Raster;
16  typedef Raster* RasterPtr;
17 }
18 #endif
19 
20 
21 
22 namespace KKB
23 {
24  class MorphOpBinarize : public MorphOp
25  {
26  public:
27  MorphOpBinarize (kkuint16 _pixelValueMin,
28  kkuint16 _pixelValueMax
29  );
30 
31  virtual ~MorphOpBinarize ();
32 
33  virtual OperationType Operation () const {return OperationType::Binarize;}
34 
35  virtual RasterPtr PerformOperation (RasterConstPtr _image);
36 
38 
39  private:
40  bool Fit (kkint32 row,
41  kkint32 col
42  ) const;
43 
44  kkuint16 pixelValueMin;
45  kkuint16 pixelValueMax;
46  };
47 
49 }; /* KKB */
50 
51 
52 
53 #endif
__int32 kkint32
Definition: KKBaseTypes.h:88
unsigned __int16 kkuint16
16 bit unsigned integer.
Definition: KKBaseTypes.h:86
A class that is used by to represent a single image in memory.
Definition: Raster.h:108
MorphOpBinarize * MorphOpBinarizePtr
KKTHread * KKTHreadPtr
virtual OperationType Operation() const
virtual RasterPtr PerformOperation(RasterConstPtr _image)
Base class for all Morphological operations.
Definition: MorphOp.h:44
MorphOpBinarize(kkuint16 _pixelValueMin, kkuint16 _pixelValueMax)
kkint32 MemoryConsumedEstimated()