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

Method CreateMapper

Modules/Multilabel/src/mitkMultilabelObjectFactory.cpp:34–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34mitk::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
58void mitk::MultilabelObjectFactory::SetDefaultProperties(mitk::DataNode *node)
59{

Callers

nothing calls this directly

Calls 3

NewFunction · 0.50
GetDataMethod · 0.45
SetDataNodeMethod · 0.45

Tested by

no test coverage detected