| 37 | } |
| 38 | |
| 39 | void mitk::PlanarPolygon::SetClosed(bool closed) |
| 40 | { |
| 41 | this->SetProperty("closed", mitk::BoolProperty::New(closed)); |
| 42 | |
| 43 | if (!closed) |
| 44 | { |
| 45 | // For non-closed polygons: use "Length" as feature name; disable area |
| 46 | this->SetFeatureName(FEATURE_ID_CIRCUMFERENCE, "Length"); |
| 47 | this->DeactivateFeature(FEATURE_ID_AREA); |
| 48 | } |
| 49 | else |
| 50 | { |
| 51 | // For closed polygons: use "Circumference" as feature name; enable area |
| 52 | this->SetFeatureName(FEATURE_ID_CIRCUMFERENCE, "Circumference"); |
| 53 | this->ActivateFeature(FEATURE_ID_AREA); |
| 54 | } |
| 55 | |
| 56 | this->Modified(); |
| 57 | } |
| 58 | |
| 59 | void mitk::PlanarPolygon::GeneratePolyLine() |
| 60 | { |