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

Method UpdateVtkAnnotation

Modules/Annotation/src/mitkColorBarAnnotation.cpp:48–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void mitk::ColorBarAnnotation::UpdateVtkAnnotation(mitk::BaseRenderer *renderer)
49{
50 LocalStorage *ls = this->m_LSH.GetLocalStorage(renderer);
51
52 if (ls->IsGenerateDataRequired(renderer, this))
53 {
54 ls->m_ScalarBarActor->SetDrawAnnotations(this->GetDrawAnnotations());
55 ls->m_ScalarBarActor->SetLookupTable(this->GetLookupTable());
56 ls->m_ScalarBarActor->SetOrientation(this->GetOrientation());
57 ls->m_ScalarBarActor->SetDrawTickLabels(this->GetDrawTickLabels());
58 ls->m_ScalarBarActor->SetMaximumNumberOfColors(this->GetMaxNumberOfColors());
59 ls->m_ScalarBarActor->SetNumberOfLabels(this->GetNumberOfLabels());
60 ls->m_ScalarBarActor->SetAnnotationTextScaling(this->GetAnnotationTextScaling());
61 // manually set position so there is no overlap with mitk logo in 3d renderwindow
62 if (this->GetOrientation() == 1)
63 {
64 ls->m_ScalarBarActor->SetPosition(0.80, 0.10);
65 ls->m_ScalarBarActor->SetWidth(0.15);
66 ls->m_ScalarBarActor->SetHeight(0.85);
67 }
68 else
69 {
70 ls->m_ScalarBarActor->SetPosition(0.03, 0.03);
71 ls->m_ScalarBarActor->SetWidth(0.8);
72 ls->m_ScalarBarActor->SetHeight(0.15);
73 }
74 }
75}
76
77vtkProp *mitk::ColorBarAnnotation::GetVtkProp(BaseRenderer *renderer) const
78{

Callers

nothing calls this directly

Calls 15

GetDrawAnnotationsMethod · 0.95
GetLookupTableMethod · 0.95
GetOrientationMethod · 0.95
GetDrawTickLabelsMethod · 0.95
GetMaxNumberOfColorsMethod · 0.95
GetNumberOfLabelsMethod · 0.95
SetDrawAnnotationsMethod · 0.80
SetOrientationMethod · 0.80
SetDrawTickLabelsMethod · 0.80
SetNumberOfLabelsMethod · 0.80

Tested by

no test coverage detected