| 25 | } |
| 26 | |
| 27 | mitk::Mapper::Pointer mitk::ROIObjectFactory::CreateMapper(DataNode* node, MapperSlotId slotId) |
| 28 | { |
| 29 | Mapper::Pointer mapper; |
| 30 | |
| 31 | if (node != nullptr) |
| 32 | { |
| 33 | auto* roi = dynamic_cast<ROI*>(node->GetData()); |
| 34 | |
| 35 | if (roi != nullptr) |
| 36 | { |
| 37 | if (slotId == BaseRenderer::Standard2D) |
| 38 | { |
| 39 | mapper = ROIMapper2D::New(); |
| 40 | } |
| 41 | else if (slotId == BaseRenderer::Standard3D) |
| 42 | { |
| 43 | mapper = ROIMapper3D::New(); |
| 44 | } |
| 45 | |
| 46 | if (mapper.IsNotNull()) |
| 47 | mapper->SetDataNode(node); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | return mapper; |
| 52 | } |
| 53 | |
| 54 | void mitk::ROIObjectFactory::SetDefaultProperties(DataNode* node) |
| 55 | { |
nothing calls this directly
no test coverage detected