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

Method CreateMapper

Modules/ROI/src/mitkROIObjectFactory.cpp:27–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27mitk::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
54void mitk::ROIObjectFactory::SetDefaultProperties(DataNode* node)
55{

Callers

nothing calls this directly

Calls 4

IsNotNullMethod · 0.80
NewFunction · 0.50
GetDataMethod · 0.45
SetDataNodeMethod · 0.45

Tested by

no test coverage detected