You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
785 B
35 lines
785 B
2 years ago
|
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 SetInputConnection [reader GetOutputPort]
|
||
|
reslice SetResliceTransform transform
|
||
|
reslice InterpolateOn
|
||
|
reslice SetInterpolationModeToCubic
|
||
|
reslice WrapOn
|
||
|
reslice AutoCropOutputOn
|
||
|
|
||
|
vtkImageViewer viewer
|
||
|
viewer SetInputConnection [reslice GetOutputPort]
|
||
|
viewer SetZSlice 0
|
||
|
viewer SetColorWindow 256.0
|
||
|
viewer SetColorLevel 127.5
|
||
|
viewer Render
|
||
|
|
||
|
|
||
|
|