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

Method CrosshairManager

Modules/Core/src/Controllers/mitkCrosshairManager.cpp:20–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18#include <mitkCrosshairVtkMapper2D.h>
19
20mitk::CrosshairManager::CrosshairManager(BaseRenderer* baseRenderer)
21{
22 m_CrosshairDataNode = mitk::DataNode::New();
23
24 std::string rendererName = std::string(baseRenderer->GetName());
25
26 m_CrosshairDataNode->SetProperty("reslice.thickslices", mitk::ResliceMethodProperty::New());
27 m_CrosshairDataNode->SetProperty("reslice.thickslices.num", mitk::IntProperty::New(5));
28 m_CrosshairDataNode->SetProperty("Crosshair.Gap Size", mitk::IntProperty::New(32));
29
30 // set the crosshair only visible for this specific renderer
31 m_CrosshairDataNode->SetVisibility(false);
32 m_CrosshairDataNode->SetVisibility(true, baseRenderer);
33 m_CrosshairDataNode->SetProperty("name", mitk::StringProperty::New(std::string(rendererName + "crosshairData")));
34 m_CrosshairDataNode->SetProperty("helper object", mitk::BoolProperty::New(true));
35
36 m_CrosshairData = CrosshairData::New();
37 m_CrosshairDataNode->SetData(m_CrosshairData);
38 m_CrosshairDataNode->SetMapper(mitk::BaseRenderer::Standard2D, mitk::CrosshairVtkMapper2D::New());
39}
40
41mitk::CrosshairManager::~CrosshairManager()
42{

Callers

nothing calls this directly

Calls 6

SetMapperMethod · 0.80
NewFunction · 0.50
GetNameMethod · 0.45
SetPropertyMethod · 0.45
SetVisibilityMethod · 0.45
SetDataMethod · 0.45

Tested by

no test coverage detected