diff --git a/Modules/Segmentation/DataManagement/mitkLabel.cpp b/Modules/Segmentation/DataManagement/mitkLabel.cpp index 4515003f0c..220baeab90 100644 --- a/Modules/Segmentation/DataManagement/mitkLabel.cpp +++ b/Modules/Segmentation/DataManagement/mitkLabel.cpp @@ -1,286 +1,300 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkLabel.h" #include "itkProcessObject.h" #include #include #include "tinyxml.h" #include mitk::Label::Label(): PropertyList() { if(GetProperty("locked") == NULL) SetLocked(true); if(GetProperty("visible") == NULL) SetVisible(true); if(GetProperty("opacity") == NULL) SetOpacity(0.6); if(GetProperty("center.coordinates") == NULL) { mitk::Point3D pnt; pnt.SetElement(0,0); pnt.SetElement(1,0); pnt.SetElement(2,0); SetCenterOfMassCoordinates(pnt); } if(GetProperty("center.index") == NULL) { mitk::Point3D pnt; pnt.SetElement(0,0); pnt.SetElement(1,0); pnt.SetElement(2,0); SetCenterOfMassIndex(pnt); } if(GetProperty("color") == NULL) { mitk::Color col; col.Set(0,0,0); SetColor(col); } if(GetProperty("name") == NULL) SetName("noName!"); if(GetProperty("value") == NULL) SetValue(-1); if(GetProperty("layer") == NULL) SetLayer(-1); } mitk::Label::Label(const Label& other) : PropertyList(other) // copyconstructer of property List handles the coping action { + + + mitk::PropertyList::PropertyMap * map = const_cast(this->GetMap()); + mitk::PropertyList::PropertyMap::iterator it = map->begin(); + mitk::PropertyList::PropertyMap::iterator end = map->end(); + + for(; it != end ; ++it) + { + itk::SimpleMemberCommand