| 318 | } |
| 319 | |
| 320 | void mitk::Surface::Graft(const DataObject *data) |
| 321 | { |
| 322 | const auto *surface = dynamic_cast<const Surface *>(data); |
| 323 | |
| 324 | if (surface == nullptr) |
| 325 | mitkThrow() << "Data object used to graft surface is not a mitk::Surface."; |
| 326 | |
| 327 | this->CopyInformation(data); |
| 328 | m_PolyDatas.clear(); |
| 329 | |
| 330 | for (unsigned int i = 0; i < surface->GetSizeOfPolyDataSeries(); ++i) |
| 331 | { |
| 332 | m_PolyDatas.push_back(vtkSmartPointer<vtkPolyData>::New()); |
| 333 | m_PolyDatas.back()->DeepCopy(surface->GetVtkPolyData(i)); |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | void mitk::Surface::PrintSelf(std::ostream &os, itk::Indent indent) const |
| 338 | { |