The article describes method Tiled Rendering refers to VTKUsersGuide

The class vtkRenderLargeImage breaks up the whole rendering into separated parts. The different pieces are handled and combined into a final large image.
The interface SetMagnification of vtkRenderLargeImage control how much to larger the original image.

vtkRenderLargeImage renderLarge
  renderLarge SetInput ren        # Indicates what renderer to get the pixel data from.
  renderLarge SetMagnification 4

vtkTIFFWriter writer
  writer SetInputConnection [renderLarge GetOutputPort]
  writer SetFileName largeImage.tif
  writer Write

Right: original image
Left: image generated from vtkRenderLargeImage

af7bae06a7065cd72e60729078d67af4.png

Read tif file and construct new view.

package require vtk

vtkTIFFReader reader
reader SetFileName largeImage.tif

vtkImageViewer2 imageViewer
imageViewer SetInputConnection [reader GetOutputPort]
vtkRenderWindowInteractor renderWindowInteractor
imageViewer SetupInteractor renderWindowInteractor
#imageViewer Render
[imageViewer GetRenderer] ResetCamera
imageViewer Render

# Withdraw the default tk window
wm withdraw .
renderWindowInteractor Start
Categories: TCLVTK

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

You cannot copy content of this page