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

Method MitkRender

Modules/ContourModel/src/Rendering/mitkContourModelMapper2D.cpp:31–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void mitk::ContourModelMapper2D::MitkRender(mitk::BaseRenderer *renderer, mitk::VtkPropRenderer::RenderType /*type*/)
32{
33 BaseLocalStorage *ls = m_LSH.GetLocalStorage(renderer);
34
35 mitk::DataNode *dataNode = this->GetDataNode();
36
37 bool visible = true;
38 dataNode->GetVisibility(visible, renderer, "visible");
39
40 if (!visible)
41 return;
42
43 mitk::ContourModel *input = this->GetInput();
44
45 mitk::ContourModel::Pointer renderingContour = input;
46
47 bool subdivision = false;
48
49 dataNode->GetBoolProperty("subdivision curve", subdivision, renderer);
50 if (subdivision)
51 {
52 if (this->m_SubdivisionContour->GetMTime() < renderingContour->GetMTime() || m_InitSubdivisionCurve)
53 {
54 // mitk::ContourModel::Pointer subdivContour = mitk::ContourModel::New();
55
56 mitk::ContourModelSubDivisionFilter::Pointer subdivFilter = mitk::ContourModelSubDivisionFilter::New();
57
58 subdivFilter->SetInput(input);
59 subdivFilter->Update();
60
61 this->m_SubdivisionContour = subdivFilter->GetOutput();
62
63 m_InitSubdivisionCurve = false;
64 }
65 renderingContour = this->m_SubdivisionContour;
66 }
67
68 this->DrawContour(renderingContour, renderer);
69
70 ls->UpdateGenerateDataTime();
71}
72
73mitk::ContourModel *mitk::ContourModelMapper2D::GetInput(void)
74{

Callers

nothing calls this directly

Calls 11

GetInputMethod · 0.95
GetVisibilityMethod · 0.80
DrawContourMethod · 0.80
NewFunction · 0.50
GetLocalStorageMethod · 0.45
GetDataNodeMethod · 0.45
GetBoolPropertyMethod · 0.45
GetMTimeMethod · 0.45
SetInputMethod · 0.45
UpdateMethod · 0.45
GetOutputMethod · 0.45

Tested by

no test coverage detected