RGB color property. More...
#include <mitkColorProperty.h>
Public Types | |
typedef ColorProperty | Self |
typedef BaseProperty | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer < const Self > | ConstPointer |
Public Member Functions | |
virtual const char * | GetClassName () const |
virtual | ~ColorProperty () |
virtual bool | Assignable (const BaseProperty &other) const |
virtual BaseProperty & | operator= (const BaseProperty &other) |
virtual bool | operator== (const BaseProperty &property) const |
Subclasses must implement this operator==. Operator== which is used by PropertyList to check whether a property has been changed. | |
const mitk::Color & | GetColor () const |
const mitk::Color & | GetValue () const |
std::string | GetValueAsString () const |
void | SetColor (const mitk::Color &color) |
void | SetColor (float red, float green, float blue) |
Static Public Member Functions | |
static Pointer | New () |
static Pointer | New (const float *_arg) |
static Pointer | New (const mitk::Color &_arg) |
static Pointer | New (const float _arga, const float _argb, const float _argc) |
Protected Member Functions | |
ColorProperty () | |
ColorProperty (const float red, const float green, const float blue) | |
ColorProperty (const float color[3]) | |
ColorProperty (const mitk::Color &color) | |
Protected Attributes | |
mitk::Color | m_Color |
RGB color property.
Definition at line 39 of file mitkColorProperty.h.
typedef itk::SmartPointer<const Self> mitk::ColorProperty::ConstPointer |
Reimplemented from mitk::BaseProperty.
Definition at line 54 of file mitkColorProperty.h.
typedef itk::SmartPointer<Self> mitk::ColorProperty::Pointer |
Reimplemented from mitk::BaseProperty.
Definition at line 54 of file mitkColorProperty.h.
Reimplemented from mitk::BaseProperty.
Definition at line 54 of file mitkColorProperty.h.
Reimplemented from mitk::BaseProperty.
Definition at line 54 of file mitkColorProperty.h.
mitk::ColorProperty::ColorProperty | ( | ) | [protected] |
Definition at line 22 of file mitkColorProperty.cpp.
: m_Color() { }
mitk::ColorProperty::ColorProperty | ( | const float | red, |
const float | green, | ||
const float | blue | ||
) | [protected] |
Definition at line 33 of file mitkColorProperty.cpp.
{ m_Color.Set(red, green, blue); }
mitk::ColorProperty::ColorProperty | ( | const float | color[3] ) | [protected] |
Definition at line 28 of file mitkColorProperty.cpp.
: m_Color(color) { }
mitk::ColorProperty::ColorProperty | ( | const mitk::Color & | color ) | [protected] |
Definition at line 38 of file mitkColorProperty.cpp.
: m_Color(color) { }
mitk::ColorProperty::~ColorProperty | ( | ) | [virtual] |
Definition at line 43 of file mitkColorProperty.cpp.
{ }
bool mitk::ColorProperty::Assignable | ( | const BaseProperty & | ) | const [virtual] |
Should be implemented by subclasses to indicate whether they can accept the parameter as the right-hand-side argument of an assignment. This test will most probably include some dynamic_cast.
Reimplemented from mitk::BaseProperty.
Definition at line 47 of file mitkColorProperty.cpp.
{ try { dynamic_cast<const Self&>(other); // dear compiler, please don't optimize this away! return true; } catch (std::bad_cast) { } return false; }
virtual const char* mitk::ColorProperty::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::BaseProperty.
const mitk::Color & mitk::ColorProperty::GetColor | ( | ) | const |
Definition at line 94 of file mitkColorProperty.cpp.
Referenced by mitk::PointSetVtkMapper3D::ApplyProperties(), QmitkColorPropertyView::DisplayColor(), QmitkPropertyListPopup::fillPopup(), mitk::VolumeDataVtkMapper3D::GenerateData(), QmitkColorPropertyEditor::mousePressEvent(), QmitkPropertyListPopup::onColorClicked(), mitk::VectorImageMapper2D::Paint(), and mitk::Geometry2DDataVtkMapper3D::ProcessNode().
{ return m_Color; }
const mitk::Color & mitk::ColorProperty::GetValue | ( | ) | const |
Definition at line 118 of file mitkColorProperty.cpp.
{ return GetColor(); }
std::string mitk::ColorProperty::GetValueAsString | ( | ) | const [virtual] |
Reimplemented from mitk::BaseProperty.
Definition at line 113 of file mitkColorProperty.cpp.
{ std::stringstream myStr; myStr << GetValue() ; return myStr.str(); }
static Pointer mitk::ColorProperty::New | ( | ) | [static] |
Referenced by mitk::BinaryThresholdTool::BinaryThresholdTool(), mitk::BinaryThresholdULTool::BinaryThresholdULTool(), QmitkDataManagerView::ColorChanged(), QmitkImageCropper::CreateBoundingObject(), QmitkBoundingObjectWidget::CreateBoundingObject(), QmitkThresholdComponent::CreateSegmentationNode(), mitk::Tool::CreateSegmentationNode(), mitk::DataNodeFactory::DefaultColorForOrgan(), mitk::ColorPropertyDeserializer::Deserialize(), mitk::MoveSurfaceInteractor::ExecuteAction(), mitk::AffineInteractor::ExecuteAction(), QmitkPointBasedRegistrationView::FixedSelected(), QmitkScalarBarOverlay::GetProperties(), QmitkTextOverlay::GetTextProperties(), QmitkRegionGrowingView::ItkImageProcessing(), mitkPropertySerializationTest(), QmitkPointBasedRegistrationView::MovingSelected(), QmitkIGTExampleView::OnPlayingToggle(), QmitkIGTExampleView::OnTestNavigation(), QmitkSlicesInterpolator::QmitkSlicesInterpolator(), RegionGrowing(), mitk::DataNode::SetColor(), mitk::UnstructuredGridVtkMapper3D::SetDefaultProperties(), mitk::SurfaceVtkMapper3D::SetDefaultProperties(), mitk::SurfaceGLMapper2D::SetDefaultProperties(), mitk::PointSetVtkMapper3D::SetDefaultProperties(), mitk::ImageMapperGL2D::SetDefaultProperties(), mitk::EnhancedPointSetVtkMapper3D::SetDefaultProperties(), mitk::FeedbackContourTool::SetFeedbackContourColor(), mitk::FeedbackContourTool::SetFeedbackContourColorDefault(), QmitkIGTRecorderView::SetupIGTPipeline(), and TestDataStorage().
static Pointer mitk::ColorProperty::New | ( | const mitk::Color & | _arg ) | [inline, static] |
Definition at line 58 of file mitkColorProperty.h.
static Pointer mitk::ColorProperty::New | ( | const float | _arga, |
const float | _argb, | ||
const float | _argc | ||
) | [inline, static] |
Definition at line 59 of file mitkColorProperty.h.
static Pointer mitk::ColorProperty::New | ( | const float * | _arg ) | [inline, static] |
Definition at line 57 of file mitkColorProperty.h.
mitk::BaseProperty & mitk::ColorProperty::operator= | ( | const BaseProperty & | rhs ) | [virtual] |
To be implemented more meaningful by subclasses. This version just accepts the assignment of BaseProperty objects to others, but the assignment has NO MEANING, values are not changed at all!
Reimplemented from mitk::BaseProperty.
Definition at line 60 of file mitkColorProperty.cpp.
bool mitk::ColorProperty::operator== | ( | const BaseProperty & | property ) | const [virtual] |
Subclasses must implement this operator==. Operator== which is used by PropertyList to check whether a property has been changed.
Implements mitk::BaseProperty.
Definition at line 81 of file mitkColorProperty.cpp.
void mitk::ColorProperty::SetColor | ( | float | red, |
float | green, | ||
float | blue | ||
) |
Definition at line 108 of file mitkColorProperty.cpp.
{ m_Color.Set(red, green, blue); }
void mitk::ColorProperty::SetColor | ( | const mitk::Color & | color ) |
Definition at line 99 of file mitkColorProperty.cpp.
Referenced by QmitkPropertyListPopup::onColorClicked().
mitk::Color mitk::ColorProperty::m_Color [protected] |
Definition at line 42 of file mitkColorProperty.h.