| 125 | } |
| 126 | |
| 127 | bool mitk::Annotation::GetStringProperty(const std::string &propertyKey, std::string &string) const |
| 128 | { |
| 129 | mitk::StringProperty::Pointer stringProp = dynamic_cast<mitk::StringProperty *>(GetProperty(propertyKey)); |
| 130 | if (stringProp.IsNull()) |
| 131 | { |
| 132 | return false; |
| 133 | } |
| 134 | else |
| 135 | { |
| 136 | // memcpy((void*)string, stringProp->GetValue(), strlen(stringProp->GetValue()) + 1 ); // looks dangerous |
| 137 | string = stringProp->GetValue(); |
| 138 | return true; |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | void mitk::Annotation::SetIntProperty(const std::string &propertyKey, int intValue) |
| 143 | { |