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

Method Render

Interaction/Image/vtkImageViewer.cxx:216–235  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

214
215//------------------------------------------------------------------------------
216void 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//------------------------------------------------------------------------------
238void vtkImageViewer::SetOffScreenRendering(vtkTypeBool i)

Callers

nothing calls this directly

Calls 8

RenderMethod · 0.65
GetSizeMethod · 0.45
GetInputMethod · 0.45
UpdateInformationMethod · 0.45
GetInputAlgorithmMethod · 0.45
GetMethod · 0.45
GetInputInformationMethod · 0.45
SetSizeMethod · 0.45

Tested by

no test coverage detected