[vtkusers] file handling
yala kaluma
yala_aiiii at hotmail.com
Sun Mar 13 16:05:41 EST 2005
Hi,
I am having problem with the script below.
It seems like the compiler doesn trecognize the folder VTK_DATA_ROOT...
So i switched it to the path of the VTKDATA I downloaded (with
Data/masonry.bmp in it). But it still doesn t work..
I am not sure i understand what VTK_DATA_ROOT represents anyway.
In the VTK folder I downloaded. There is not a whole lot of example written
in C++. If anybody knows the adress of a site where I can find any I would
really apreciate.
How would you write the line
reader SetFileName "$VTK_DATA_ROOT/Data/masonry.bmp"
in C++?
Thank u very much
Yala, true VTK newbie...
package require vtk
# we have to make sure it works with multiple scalar components
# Image pipeline
vtkBMPReader reader
reader SetFileName "$VTK_DATA_ROOT/Data/masonry.bmp"
reader SetDataExtent 0 255 0 255 0 0
reader SetDataSpacing 1 1 1
reader SetDataOrigin 0 0 0
reader UpdateWholeExtent
vtkTransform transform
transform RotateZ 45
transform Scale 1.414 1.414 1.414
vtkImageReslice reslice
reslice SetInput [reader GetOutput]
reslice SetResliceTransform transform
reslice InterpolateOn
reslice SetInterpolationModeToCubic
reslice WrapOn
reslice AutoCropOutputOn
vtkImageViewer viewer
viewer SetInput [reslice GetOutput]
viewer SetZSlice 0
viewer SetColorWindow 256.0
viewer SetColorLevel 127.5
viewer Render
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050313/e8fb7177/attachment.htm>
More information about the vtkusers
mailing list