| 40 | } |
| 41 | |
| 42 | std::vector<itk::SmartPointer<mitk::BaseData>> mitk::ContourModelSetReader::DoRead() |
| 43 | { |
| 44 | std::vector<itk::SmartPointer<mitk::BaseData>> result; |
| 45 | std::vector<itk::SmartPointer<mitk::BaseData>> internalResult; |
| 46 | |
| 47 | std::string location = GetInputLocation(); |
| 48 | |
| 49 | // Switch the current locale to "C" |
| 50 | LocaleSwitch localeSwitch("C"); |
| 51 | |
| 52 | try |
| 53 | { |
| 54 | mitk::ContourModelSet::Pointer contourSet = mitk::ContourModelSet::New(); |
| 55 | |
| 56 | mitk::ContourModelReader reader; |
| 57 | reader.SetInput(location); |
| 58 | internalResult = reader.Read(); |
| 59 | |
| 60 | for (unsigned int i = 0; i < internalResult.size(); ++i) |
| 61 | { |
| 62 | contourSet->AddContourModel(dynamic_cast<mitk::ContourModel *>(internalResult.at(i).GetPointer())); |
| 63 | } |
| 64 | result.push_back(dynamic_cast<mitk::BaseData *>(contourSet.GetPointer())); |
| 65 | } |
| 66 | catch (...) |
| 67 | { |
| 68 | MITK_ERROR << "Cannot read contourModel."; |
| 69 | } |
| 70 | |
| 71 | return result; |
| 72 | } |
| 73 | |
| 74 | mitk::ContourModelSetReader *mitk::ContourModelSetReader::Clone() const |
| 75 | { |
nothing calls this directly
no test coverage detected