------------------------------------------------------------------------------
| 1298 | |
| 1299 | //------------------------------------------------------------------------------ |
| 1300 | void vtkImagePlaneWidget::ManageTextDisplay() |
| 1301 | { |
| 1302 | if (!this->DisplayText) |
| 1303 | { |
| 1304 | return; |
| 1305 | } |
| 1306 | |
| 1307 | if (this->State == vtkImagePlaneWidget::WindowLevelling) |
| 1308 | { |
| 1309 | auto result = vtk::format_to_n(this->TextBuff, VTK_IMAGE_PLANE_WIDGET_MAX_TEXTBUFF, |
| 1310 | "Window, Level: ( {:g}, {:g} )", this->CurrentWindow, this->CurrentLevel); |
| 1311 | *result.out = '\0'; |
| 1312 | } |
| 1313 | else if (this->State == vtkImagePlaneWidget::Cursoring) |
| 1314 | { |
| 1315 | if (this->CurrentImageValue == VTK_DOUBLE_MAX) |
| 1316 | { |
| 1317 | auto result = |
| 1318 | vtk::format_to_n(this->TextBuff, VTK_IMAGE_PLANE_WIDGET_MAX_TEXTBUFF, "Off Image"); |
| 1319 | *result.out = '\0'; |
| 1320 | } |
| 1321 | else |
| 1322 | { |
| 1323 | auto result = vtk::format_to_n(this->TextBuff, VTK_IMAGE_PLANE_WIDGET_MAX_TEXTBUFF, |
| 1324 | "( {:g}, {:g}, {:g} ): {:g}", this->CurrentCursorPosition[0], |
| 1325 | this->CurrentCursorPosition[1], this->CurrentCursorPosition[2], this->CurrentImageValue); |
| 1326 | *result.out = '\0'; |
| 1327 | } |
| 1328 | } |
| 1329 | |
| 1330 | this->TextActor->SetInput(this->TextBuff); |
| 1331 | this->TextActor->Modified(); |
| 1332 | } |
| 1333 | |
| 1334 | //------------------------------------------------------------------------------ |
| 1335 | void vtkImagePlaneWidget::Push(double* p1, double* p2) |
no test coverage detected