Logo Search packages:      
Sourcecode: octaviz version File versions  Download package

vtk_image_demo.m

## Copyright (C) 2004  Dragan Tubic
## 
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## 
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details. 
## 
## You should have received a copy of the GNU General Public License
## along with this file.  If not, write to the Free Software Foundation,
## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

vtk_init;

reader = vtkPNGReader();
reader.SetDataSpacing(0.8, 0.8, 1.5)
reader.SetFileName("/usr/share/vtkdata/Data/fullhead15.png")
shiftScale = vtkImageShiftScale();
shiftScale.SetInput(reader.GetOutput())
shiftScale.SetShift(0)
shiftScale.SetScale(0.07)
shiftScale.SetOutputScalarTypeToUnsignedChar()

ia = vtkImageActor();
ia.SetInput(shiftScale.GetOutput())

f = vtk_figure(0);        

f.renderer.AddActor(ia);

vtk_update(f);


Generated by  Doxygen 1.6.0   Back to index