| 47 | }; |
| 48 | |
| 49 | void ValidateSurface(const mitk::Surface* surface, mitk::TimeStepType t) |
| 50 | { |
| 51 | if (surface == nullptr) |
| 52 | mitkThrow() << "Input surface is nullptr!"; |
| 53 | |
| 54 | if (t >= surface->GetSizeOfPolyDataSeries()) |
| 55 | mitkThrow() << "Input surface doesn't have data at time step " << t << "!"; |
| 56 | |
| 57 | auto* polyData = const_cast<mitk::Surface *>(surface)->GetVtkPolyData(t); |
| 58 | |
| 59 | if (polyData == nullptr) |
| 60 | mitkThrow() << "PolyData of input surface at time step " << t << " is nullptr!"; |
| 61 | |
| 62 | if (polyData->GetNumberOfPolys() == 0) |
| 63 | mitkThrow() << "Input surface has no polygons at time step " << t << "!"; |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | mitk::Surface::Pointer mitk::Remesh(const Surface* surface, |
no test coverage detected