IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ColorGeometry.h
1 // ColorGeometry.h:
3 // ----------------
4 //
16 
17 #ifndef __IPSDKIMAGE_COLORGEOMETRY_H__
18 #define __IPSDKIMAGE_COLORGEOMETRY_H__
19 
20 // suppression warnings
21 // warning C4251: 'ipsdk::image::ColorGeometry::_colorGeometryType' : class 'ipsdk::image::eColorGeometryType' needs to have dll-interface to be used by clients of class 'ipsdk::image::ColorGeometry'
22 #pragma warning (push)
23 #pragma warning (disable : 4251)
24 
27 #include <IPSDKSerialization/Engine/BaseSerializationObject.h>
28 
29 namespace ipsdk {
30 namespace image {
31 
34 
36 {
37  // declare dynamic serializable class
39 
40 public:
43  ColorGeometry();
44  ~ColorGeometry();
46 
47 // methods
48 public:
50  bool isInit() const;
51 
53  void initGrey();
54 
56  void initRgb();
57 
60  void initUser(ipUInt64 sizeC);
61 
65  void init(const eColorGeometryType& colorGeometryType);
66 
69  const eColorGeometryType& getColorGeometryType() const;
70 
73  bool isGreyLevel() const;
74 
77  bool isColor() const;
78 
81  ipUInt64 getSizeC() const;
82 
86  std::string getChannelName(const ipUInt64 channelIdx) const;
87 
90  const std::vector<std::string>& getChannelNames() const;
91 
95  void setChannelName(const std::string& channelName, const ipUInt64 channelIdx);
96 
99  void setChannelNames(const std::vector<std::string>& vChannelNames);
100 
103  void setMinIsBlack(const bool bMinIsBlack);
104 
107  bool minIsBlack() const;
108 
112  void setColorGeometryType(const eColorGeometryType& vType);
113 
115  void clear();
116 
117 // attributes
118 protected:
121 
124 
126  bool _bInit;
127 
129  std::vector<std::string> _vChannelNames;
130 
133 };
134 
137 
138 inline bool
140 {
141  return _bInit;
142 }
143 
146 
147 } // end of namespace image
148 } // end of namespace ipsdk
149 
150 #pragma warning (pop)
151 
152 #endif // __IPSDKIMAGE_COLORGEOMETRY_H__
#define IPSDK_DECLARE_SERIAL_WITH_COPY(libraryName, className)
macro enabling serialization on class
Definition: SerializationHdrMacro.h:73
Predefined types for geometry component management.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
bool _bMinIsBlack
Flag indicating if the minimum intensity is represented by black color.
Definition: ColorGeometry.h:132
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
ipUInt64 _sizeC
c size associated to object
Definition: ColorGeometry.h:123
bool isInit() const
retrieve object initialisation flag
Definition: ColorGeometry.h:139
eColorGeometryType
Color geometry type.
Definition: GeometryComponentTypes.h:45
bool _bInit
object initialization flag
Definition: ColorGeometry.h:126
eColorGeometryType _colorGeometryType
color geometry type associated to object
Definition: ColorGeometry.h:120
IPSDKIMAGEPROCESSING_API processor::RulePtr isColor(const ImageAttributeConstWeakPtr &pAttribute)
functions allowing to check image color type
Definition of import/export macro for library.
#define IPSDKIMAGE_API
Import/Export macro for library IPSDKImage.
Definition: IPSDKImageExports.h:27
Class encapsulating color geometryThis class allows to define geometry color size and type (grey...
Definition: ColorGeometry.h:35
std::vector< std::string > _vChannelNames
Collection to store the names for each channel.
Definition: ColorGeometry.h:129
Base class for serializable class.
Definition: BaseSerializationObject.h:33