| 32 | } |
| 33 | |
| 34 | mitk::Mapper::Pointer mitk::MultilabelObjectFactory::CreateMapper(mitk::DataNode *node, MapperSlotId id) |
| 35 | { |
| 36 | mitk::Mapper::Pointer newMapper = nullptr; |
| 37 | mitk::BaseData *data = node->GetData(); |
| 38 | |
| 39 | if (id == mitk::BaseRenderer::Standard2D) |
| 40 | { |
| 41 | if ((dynamic_cast<mitk::MultiLabelSegmentation *>(data) != nullptr)) |
| 42 | { |
| 43 | newMapper = mitk::LabelSetImageVtkMapper2D::New(); |
| 44 | newMapper->SetDataNode(node); |
| 45 | } |
| 46 | } |
| 47 | else if (id == mitk::BaseRenderer::Standard3D) |
| 48 | { |
| 49 | if ((dynamic_cast<mitk::MultiLabelSegmentation*>(data) != nullptr)) |
| 50 | { |
| 51 | newMapper = mitk::MultiLabelSegmentationVtkMapper3D::New(); |
| 52 | newMapper->SetDataNode(node); |
| 53 | } |
| 54 | } |
| 55 | return newMapper; |
| 56 | } |
| 57 | |
| 58 | void mitk::MultilabelObjectFactory::SetDefaultProperties(mitk::DataNode *node) |
| 59 | { |
nothing calls this directly
no test coverage detected