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.
31 lines
722 B
31 lines
722 B
package require vtk
|
|
|
|
# Image pipeline
|
|
|
|
vtkPNGReader reader
|
|
reader SetFileName "$VTK_DATA_ROOT/Data/fullhead15.png"
|
|
|
|
vtkImageClip clip
|
|
clip SetInputConnection [reader GetOutputPort]
|
|
clip SetOutputWholeExtent 80 230 80 230 0 0
|
|
clip ClipDataOff
|
|
|
|
vtkImageGradientMagnitude gradient
|
|
gradient SetDimensionality 2
|
|
gradient SetInputConnection [clip GetOutputPort]
|
|
gradient HandleBoundariesOff
|
|
|
|
|
|
|
|
vtkImageChangeInformation slide
|
|
slide SetInputConnection [gradient GetOutputPort]
|
|
slide SetExtentTranslation -100 -100 0
|
|
|
|
vtkImageViewer viewer
|
|
viewer SetInputConnection [slide GetOutputPort]
|
|
viewer SetColorWindow -1000
|
|
viewer SetColorLevel 500
|
|
|
|
viewer Render
|
|
|
|
source [file join [file dirname [info script]] WindowLevelInterface.tcl]
|
|
|