Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MITKCOLORPROPERTY_H_HEADER_INCLUDED_C17953D1
00020 #define MITKCOLORPROPERTY_H_HEADER_INCLUDED_C17953D1
00021
00022 #include "mitkCommon.h"
00023 #include "mitkBaseProperty.h"
00024 #include <itkRGBPixel.h>
00025
00026 namespace mitk {
00027
00028
00029
00030
00031
00032
00033 typedef itk::RGBPixel< float > Color;
00034
00035
00036
00037
00038
00039 class MITK_CORE_EXPORT ColorProperty : public BaseProperty
00040 {
00041 protected:
00042 mitk::Color m_Color;
00043
00044 ColorProperty();
00045
00046 ColorProperty(const float red, const float green, const float blue);
00047
00048 ColorProperty(const float color[3]);
00049
00050 ColorProperty(const mitk::Color & color);
00051
00052 public:
00053
00054 mitkClassMacro(ColorProperty, BaseProperty);
00055
00056 itkNewMacro(ColorProperty);
00057 mitkNewMacro1Param(ColorProperty, const float*);
00058 mitkNewMacro1Param(ColorProperty, const mitk::Color&);
00059 mitkNewMacro3Param(ColorProperty, const float, const float, const float);
00060
00061 virtual ~ColorProperty();
00062
00063 virtual bool Assignable(const BaseProperty& other) const;
00064 virtual BaseProperty& operator=(const BaseProperty& other);
00065
00066 virtual bool operator==(const BaseProperty& property) const;
00067
00068 const mitk::Color & GetColor() const;
00069 const mitk::Color & GetValue() const;
00070 std::string GetValueAsString() const;
00071 void SetColor(const mitk::Color & color );
00072 void SetColor( float red, float green, float blue );
00073
00074 };
00075
00076 }
00077
00078 #endif