MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / removeAnnotation

Method removeAnnotation

annotation/AnnotationList.cpp:126–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126void AnnotationList::removeAnnotation(const int& index) {
127 if (index < 0) {
128 (_annotations.end() - abs(index))->reset();
129 _annotations.erase(_annotations.end() - abs(index));
130 }
131 else {
132 (_annotations.begin() + index)->reset();
133 _annotations.erase(_annotations.begin() + index);
134 }
135}
136
137void AnnotationList::removeAnnotation(std::string name) {
138 for (std::vector<std::shared_ptr<Annotation> >::iterator it = _annotations.begin(); it != _annotations.end(); ++it) {

Callers 1

deleteAnnotationMethod · 0.80

Calls 1

getNameMethod · 0.80

Tested by

no test coverage detected