Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
Go to the documentation of this file.
13 #ifndef mitkColorProperty_h
14 #define mitkColorProperty_h
19 #include <itkRGBPixel.h>
21 #include <nlohmann/json.hpp>
27 #pragma warning(disable : 4522)
38 typedef itk::RGBPixel<float>
Color;
59 ColorProperty(
const float red,
const float green,
const float blue);
67 itkFactorylessNewMacro(
Self);
76 std::string GetValueAsString()
const override;
79 void SetColor(
float red,
float green,
float blue);
84 using BaseProperty::operator=;
90 itk::LightObject::Pointer InternalClone()
const override;
92 bool IsEqual(
const BaseProperty &property)
const override;
104 template <
typename TComponent>
107 j = nlohmann::json::array();
109 for (
size_t i = 0; i < 3; ++i)
113 template <
typename TComponent>
116 for (
size_t i = 0; i < 3; ++i)
117 j.at(i).get_to(c[i]);
Abstract base class for properties.
#define mitkNewMacro1Param(classname, type)
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
#define mitkNewMacro3Param(classname, typea, typeb, typec)
Find image slices visible on a given plane.
void to_json(nlohmann::json &j, const RGBPixel< TComponent > &c)
void from_json(const nlohmann::json &j, RGBPixel< TComponent > &c)
The ColorProperty class RGB color property.
#define mitkClassMacro(className, SuperClassName)