19 #include "itkProcessObject.h"
21 #include <itkCommand.h>
70 auto it = map->begin();
71 auto end = map->end();
73 for (; it != end; ++it)
77 it->second->AddObserver(itk::ModifiedEvent(), command);
89 property->AddObserver(itk::ModifiedEvent(), command);
91 Superclass::SetProperty(propertyKey, property);
97 if (property !=
nullptr)
102 SetBoolProperty(
"locked", locked);
108 GetBoolProperty(
"locked", locked);
115 if (property !=
nullptr)
120 SetBoolProperty(
"visible", visible);
126 GetBoolProperty(
"visible", visible);
133 if (property !=
nullptr)
138 SetFloatProperty(
"opacity", opacity);
144 GetFloatProperty(
"opacity", opacity);
150 SetStringProperty(
"name", name.c_str());
156 GetStringProperty(
"name", name);
163 if (property !=
nullptr)
176 pixelValue =
property->GetValue();
183 if (property !=
nullptr)
208 if (colorProp !=
nullptr)
219 if (property !=
nullptr)
236 if (property !=
nullptr)
253 result->UnRegister();
264 MITK_INFO(verbose) <<
"--- Label Equal ---";
266 bool returnValue =
true;
274 returnValue = lhsmap->size() == rhsmap->size();
278 MITK_INFO(verbose) <<
"Labels in label container are not equal.";
282 auto lhsmapIt = lhsmap->begin();
283 auto lhsmapItEnd = lhsmap->end();
285 for (; lhsmapIt != lhsmapItEnd; ++lhsmapIt)
287 if (rhsmap->find(lhsmapIt->first) == rhsmap->end())
296 MITK_INFO(verbose) <<
"Labels in label container are not equal.";
mitk::BaseProperty * GetProperty(const std::string &propertyKey) const
Get a property by its name.
itk::SmartPointer< Self > Pointer
std::string GetName() const
void SetColor(const mitk::Color &color)
void SetLocked(bool locked)
void SetLayer(unsigned int layer)
void SetValue(PixelType pixelValue)
A data structure describing a label.
unsigned int GetLayer() const
Key-value list holding instances of BaseProperty.
void SetOpacity(float opacity)
The ColorProperty class RGB color property.
void SetColor(const mitk::Color &)
Abstract base class for properties.
std::map< std::string, BaseProperty::Pointer > PropertyMap
void SetVisible(bool visible)
static const PixelType MAX_LABEL_VALUE
The maximum value a label can get: Since the value is of type unsigned short MAX_LABEL_VALUE = 65535...
void SetCenterOfMassCoordinates(const mitk::Point3D ¢er)
const mitk::Color & GetColor() const
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
void SetCenterOfMassIndex(const mitk::Point3D ¢er)
mitk::Point3D GetCenterOfMassCoordinates() const
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.
mitk::Point3D GetCenterOfMassIndex() const
const mitk::Color & GetColor() const
PixelType GetValue() const
virtual void SetValue(T _arg)
void SetProperty(const std::string &propertyKey, BaseProperty *property)
const PropertyMap * GetMap() const
void SetName(const std::string &name)
void PrintSelf(std::ostream &os, itk::Indent indent) const override
virtual T GetValue() const
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.