MCPcopy Create free account
hub / github.com/MITK/MITK / ValidateSurface

Function ValidateSurface

Modules/Remeshing/src/mitkRemeshing.cpp:49–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
67mitk::Surface::Pointer mitk::Remesh(const Surface* surface,

Callers 1

RemeshMethod · 0.85

Calls 2

GetVtkPolyDataMethod · 0.45

Tested by

no test coverage detected