MCPcopy Create free account
hub / github.com/Kitware/VTK / SetThickMode

Method SetThickMode

Interaction/Image/vtkResliceImageViewer.cxx:124–162  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

122
123//------------------------------------------------------------------------------
124void vtkResliceImageViewer::SetThickMode(int t)
125{
126 vtkSmartPointer<vtkResliceCursor> rc = this->GetResliceCursor();
127
128 if (t == this->GetThickMode())
129 {
130 return;
131 }
132
133 vtkSmartPointer<vtkResliceCursorLineRepresentation> resliceCursorRepOld =
134 vtkResliceCursorLineRepresentation::SafeDownCast(
135 this->ResliceCursorWidget->GetRepresentation());
136 vtkSmartPointer<vtkResliceCursorLineRepresentation> resliceCursorRepNew;
137
138 this->GetResliceCursor()->SetThickMode(t);
139
140 if (t)
141 {
142 resliceCursorRepNew = vtkSmartPointer<vtkResliceCursorThickLineRepresentation>::New();
143 }
144 else
145 {
146 resliceCursorRepNew = vtkSmartPointer<vtkResliceCursorLineRepresentation>::New();
147 }
148
149 int e = this->ResliceCursorWidget->GetEnabled();
150 this->ResliceCursorWidget->SetEnabled(0);
151
152 resliceCursorRepNew->GetResliceCursorActor()->GetCursorAlgorithm()->SetResliceCursor(rc);
153 resliceCursorRepNew->GetResliceCursorActor()->GetCursorAlgorithm()->SetReslicePlaneNormal(
154 this->SliceOrientation);
155 this->ResliceCursorWidget->SetRepresentation(resliceCursorRepNew);
156 resliceCursorRepNew->SetLookupTable(resliceCursorRepOld->GetLookupTable());
157
158 resliceCursorRepNew->SetWindowLevel(
159 resliceCursorRepOld->GetWindow(), resliceCursorRepOld->GetLevel(), 1);
160
161 this->ResliceCursorWidget->SetEnabled(e);
162}
163
164//------------------------------------------------------------------------------
165void vtkResliceImageViewer::SetResliceCursor(vtkResliceCursor* rc)

Callers 4

thickModeMethod · 0.80
TestResliceCursorWidget2Function · 0.80
TestResliceCursorWidget3Function · 0.80
vtkResliceImageViewerMethod · 0.80

Calls 13

GetResliceCursorMethod · 0.95
GetThickModeMethod · 0.95
GetRepresentationMethod · 0.80
SetResliceCursorMethod · 0.80
GetCursorAlgorithmMethod · 0.80
GetWindowMethod · 0.80
NewFunction · 0.50
SetEnabledMethod · 0.45
SetRepresentationMethod · 0.45
SetLookupTableMethod · 0.45
GetLookupTableMethod · 0.45
SetWindowLevelMethod · 0.45

Tested by 2

TestResliceCursorWidget2Function · 0.64
TestResliceCursorWidget3Function · 0.64