------------------------------------------------------------------------------
| 214 | |
| 215 | //------------------------------------------------------------------------------ |
| 216 | void vtkImageViewer::Render() |
| 217 | { |
| 218 | if (this->FirstRender) |
| 219 | { |
| 220 | // initialize the size if not set yet |
| 221 | if (this->RenderWindow->GetSize()[0] == 0 && this->ImageMapper->GetInput()) |
| 222 | { |
| 223 | // get the size from the mappers input |
| 224 | this->ImageMapper->GetInputAlgorithm()->UpdateInformation(); |
| 225 | int* ext = this->ImageMapper->GetInputInformation()->Get( |
| 226 | vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()); |
| 227 | // if it would be smaller than 150 by 100 then limit to 150 by 100 |
| 228 | int xs = ext[1] - ext[0] + 1; |
| 229 | int ys = ext[3] - ext[2] + 1; |
| 230 | this->RenderWindow->SetSize(xs < 150 ? 150 : xs, ys < 100 ? 100 : ys); |
| 231 | } |
| 232 | this->FirstRender = 0; |
| 233 | } |
| 234 | this->RenderWindow->Render(); |
| 235 | } |
| 236 | |
| 237 | //------------------------------------------------------------------------------ |
| 238 | void vtkImageViewer::SetOffScreenRendering(vtkTypeBool i) |
nothing calls this directly
no test coverage detected