/usr/share/vtk/Rendering/Tcl/RenderLargeImage.tcl is in vtk-examples 5.8.0-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | #
# This simple example shows how to render a very large image (i.e., one
# that cannot fit on the screen).
#
# We start off by loading some Tcl modules. One is the basic VTK library;
# the second is a package for rendering, and the last includes a set
# of color definitions.
#
package require vtk
package require vtkinteraction
package require vtktesting
# We'll import some data to start. Since we are using an importer, we've
# got to give it a render window and such. Note that the render window
# size is set fairly small.
vtkRenderer ren
ren SetBackground 0.1 0.2 0.4
vtkRenderWindow renWin
renWin AddRenderer ren
renWin SetSize 125 125
vtkRenderWindowInteractor iren
iren SetRenderWindow renWin
vtk3DSImporter importer
importer SetRenderWindow renWin
importer SetFileName "$VTK_DATA_ROOT/Data/Viewpoint/iflamigm.3ds"
importer ComputeNormalsOn
importer Read
# We'll set up the view we want.
#
[ren GetActiveCamera] SetPosition 0 1 0
[ren GetActiveCamera] SetFocalPoint 0 0 0
[ren GetActiveCamera] SetViewUp 0 0 1
# Let the renderer compute a good position and focal point.
#
ren ResetCamera
[ren GetActiveCamera] Dolly 1.4
ren ResetCameraClippingRange
# render the large image
#
iren AddObserver UserEvent {wm deiconify .vtkInteract}
wm withdraw .
# Here we request that the large image is four times bigger than the
# renderers image.
#
vtkRenderLargeImage renderLarge
renderLarge SetInput ren
renderLarge SetMagnification 4
# We write out the image which causes the rendering to occur. If you
# watch your screen you will see the pieces being rendered right after
# one another.
#
vtkTIFFWriter writer
writer SetInputConnection [renderLarge GetOutputPort]
writer SetFileName largeImage.tif
writer Write
|