Commit 878dff0e authored by Ken Martin's avatar Ken Martin
Browse files

ENH: converted some scripts to use SetInputConnection

parent 763cc256
......@@ -20,14 +20,14 @@ vtkPNMReader imageIn
imageIn SetFileName "$VTK_DATA_ROOT/Data/earth.ppm"
vtkTexture texture
texture SetInput [imageIn GetOutput]
texture SetInputConnection [imageIn GetOutputPort]
vtkTextureMapToPlane texturePlane
texturePlane SetInput [aPlane GetOutput]
texturePlane SetInputConnection [aPlane GetOutputPort]
texturePlane AutomaticPlaneGenerationOn
vtkPolyDataMapper planeMapper
planeMapper SetInput [texturePlane GetOutput]
planeMapper SetInputConnection [texturePlane GetOutputPort]
vtkActor texturedPlane
texturedPlane SetMapper planeMapper
......
......@@ -14,25 +14,25 @@ vtkPNMReader imageIn
imageIn SetFileName "$VTK_DATA_ROOT/Data/earth.ppm"
vtkImageLuminance il
il SetInput [imageIn GetOutput]
il SetInputConnection [imageIn GetOutputPort]
vtkImageCast ic
ic SetOutputScalarTypeToFloat
ic SetInput [il GetOutput]
ic SetInputConnection [il GetOutputPort]
# smooth the image
vtkImageGaussianSmooth gs
gs SetInput [ic GetOutput]
gs SetInputConnection [ic GetOutputPort]
gs SetDimensionality 2
gs SetRadiusFactors 1 1 0
# gradient the image
vtkImageGradient imgGradient;
imgGradient SetInput [gs GetOutput];
imgGradient SetInputConnection [gs GetOutputPort];
imgGradient SetDimensionality 2
vtkImageMagnitude imgMagnitude
imgMagnitude SetInput [imgGradient GetOutput]
imgMagnitude SetInputConnection [imgGradient GetOutputPort]
# non maximum suppression
vtkImageNonMaximumSuppression nonMax;
......@@ -41,42 +41,42 @@ nonMax SetVectorInput [imgGradient GetOutput];
nonMax SetDimensionality 2
vtkImageConstantPad pad
pad SetInput [imgGradient GetOutput]
pad SetInputConnection [imgGradient GetOutputPort]
pad SetOutputNumberOfScalarComponents 3
pad SetConstant 0
vtkImageToStructuredPoints i2sp1
i2sp1 SetInput [nonMax GetOutput]
i2sp1 SetInputConnection [nonMax GetOutputPort]
i2sp1 SetVectorInput [pad GetOutput]
# link edgles
vtkLinkEdgels imgLink;
imgLink SetInput [i2sp1 GetOutput];
imgLink SetInputConnection [i2sp1 GetOutputPort];
imgLink SetGradientThreshold 2;
# threshold links
vtkThreshold thresholdEdgels;
thresholdEdgels SetInput [imgLink GetOutput];
thresholdEdgels SetInputConnection [imgLink GetOutputPort];
thresholdEdgels ThresholdByUpper 10;
thresholdEdgels AllScalarsOff
vtkGeometryFilter gf
gf SetInput [thresholdEdgels GetOutput]
gf SetInputConnection [thresholdEdgels GetOutputPort]
vtkImageToStructuredPoints i2sp
i2sp SetInput [imgMagnitude GetOutput]
i2sp SetInputConnection [imgMagnitude GetOutputPort]
i2sp SetVectorInput [pad GetOutput]
# subpixel them
vtkSubPixelPositionEdgels spe;
spe SetInput [gf GetOutput];
spe SetInputConnection [gf GetOutputPort];
spe SetGradMaps [i2sp GetOutput];
vtkStripper strip
strip SetInput [spe GetOutput]
strip SetInputConnection [spe GetOutputPort]
vtkPolyDataMapper dsm
dsm SetInput [strip GetOutput]
dsm SetInputConnection [strip GetOutputPort]
dsm ScalarVisibilityOff
vtkActor planeActor
......
......@@ -29,10 +29,10 @@ vtkDelaunay2D del
del Update
vtkShrinkPolyData shrink
shrink SetInput [del GetOutput]
shrink SetInputConnection [del GetOutputPort]
vtkPolyDataMapper map
map SetInput [shrink GetOutput]
map SetInputConnection [shrink GetOutputPort]
vtkActor triangulation
triangulation SetMapper map
......
......@@ -28,10 +28,10 @@ vtkDelaunay2D del
del Update
vtkShrinkPolyData shrink
shrink SetInput [del GetOutput]
shrink SetInputConnection [del GetOutputPort]
vtkPolyDataMapper map
map SetInput [shrink GetOutput]
map SetInputConnection [shrink GetOutputPort]
vtkActor triangulation
triangulation SetMapper map
......
......@@ -45,10 +45,10 @@ vtkDelaunay2D del
vtkShrinkPolyData shrink
shrink SetInput [del GetOutput]
shrink SetInputConnection [del GetOutputPort]
vtkPolyDataMapper map
map SetInput [shrink GetOutput]
map SetInputConnection [shrink GetOutputPort]
vtkActor triangulation
triangulation SetMapper map
......
......@@ -22,11 +22,11 @@ vtkDelaunay3D del
del BoundingTriangulationOff
vtkShrinkFilter shrink
shrink SetInput [del GetOutput]
shrink SetInputConnection [del GetOutputPort]
shrink SetShrinkFactor 0.9
vtkDataSetMapper map
map SetInput [shrink GetOutput]
map SetInputConnection [shrink GetOutputPort]
vtkActor triangulation
triangulation SetMapper map
......
......@@ -16,7 +16,7 @@ vtkDiskSource disk
disk SetCircumferentialResolution 20
vtkPolyDataMapper diskMapper
diskMapper SetInput [disk GetOutput]
diskMapper SetInputConnection [disk GetOutputPort]
vtkActor diskActor
diskActor SetMapper diskMapper
......
......@@ -14,10 +14,10 @@ vtkGenericEnSightReader reader
reader Update
vtkGeometryFilter geom
geom SetInput [reader GetOutput]
geom SetInputConnection [reader GetOutputPort]
vtkArrayCalculator calc
calc SetInput [geom GetOutput]
calc SetInputConnection [geom GetOutputPort]
calc SetAttributeModeToUsePointData
calc SetFunction "pointCVectors_r . pointCVectors_i + pointScalars"
calc AddScalarArrayName pointScalars 0
......@@ -26,7 +26,7 @@ vtkArrayCalculator calc
calc SetResultArrayName test
vtkPolyDataMapper mapper
mapper SetInput [calc GetOutput]
mapper SetInputConnection [calc GetOutputPort]
mapper SetColorModeToMapScalars
mapper SetScalarModeToUsePointFieldData
mapper ColorByArrayComponent test 0
......
......@@ -18,16 +18,16 @@ vtkMultiPartExtentTranslator translator
[reader GetOutput] SetExtentTranslator translator
vtkStructuredGridOutlineFilter outline
outline SetInput [reader GetOutput]
outline SetInputConnection [reader GetOutputPort]
vtkPolyDataMapper mapOutline
mapOutline SetInput [outline GetOutput]
mapOutline SetInputConnection [outline GetOutputPort]
vtkActor outlineActor
outlineActor SetMapper mapOutline
[outlineActor GetProperty] SetColor 0 0 0
# Create source for streamtubes
vtkStreamPoints streamer
streamer SetInput [reader GetOutput]
streamer SetInputConnection [reader GetOutputPort]
streamer SetStartPosition 0.1 2.1 0.5
streamer SetMaximumPropagationTime 500
streamer SetTimeIncrement 0.5
......@@ -36,12 +36,12 @@ vtkStreamPoints streamer
vtkConeSource cone
cone SetResolution 8
vtkGlyph3D cones
cones SetInput [streamer GetOutput]
cones SetInputConnection [streamer GetOutputPort]
cones SetSource [cone GetOutput]
cones SetScaleFactor 0.9
cones SetScaleModeToScaleByVector
vtkPolyDataMapper mapCones
mapCones SetInput [cones GetOutput]
mapCones SetInputConnection [cones GetOutputPort]
eval mapCones SetScalarRange [[reader GetOutput] GetScalarRange]
vtkActor conesActor
conesActor SetMapper mapCones
......
......@@ -17,10 +17,10 @@ reader SetTimeValue 1
reader Update
vtkGeometryFilter geom
geom SetInput [reader GetOutput]
geom SetInputConnection [reader GetOutputPort]
vtkPolyDataMapper mapper
mapper SetInput [geom GetOutput]
mapper SetInputConnection [geom GetOutputPort]
mapper SetColorModeToMapScalars
mapper SetScalarModeToUsePointFieldData
mapper ColorByArrayComponent displacement 0
......
......@@ -17,10 +17,10 @@ reader SetTimeValue 1
reader Update
vtkGeometryFilter geom
geom SetInput [reader GetOutput]
geom SetInputConnection [reader GetOutputPort]
vtkPolyDataMapper mapper
mapper SetInput [geom GetOutput]
mapper SetInputConnection [geom GetOutputPort]
mapper SetColorModeToMapScalars
mapper SetScalarModeToUsePointFieldData
mapper ColorByArrayComponent displacement 0
......
......@@ -17,10 +17,10 @@ reader SetTimeValue 1
reader Update
vtkGeometryFilter geom
geom SetInput [reader GetOutput]
geom SetInputConnection [reader GetOutputPort]
vtkPolyDataMapper mapper
mapper SetInput [geom GetOutput]
mapper SetInputConnection [geom GetOutputPort]
mapper SetColorModeToMapScalars
mapper SetScalarModeToUsePointFieldData
mapper ColorByArrayComponent displacement 0
......
......@@ -17,10 +17,10 @@ reader SetTimeValue 1
reader Update
vtkGeometryFilter geom
geom SetInput [reader GetOutput]
geom SetInputConnection [reader GetOutputPort]
vtkPolyDataMapper mapper
mapper SetInput [geom GetOutput]
mapper SetInputConnection [geom GetOutputPort]
mapper SetColorModeToMapScalars
mapper SetScalarModeToUsePointFieldData
mapper ColorByArrayComponent displacement 0
......
......@@ -17,10 +17,10 @@ reader SetTimeValue 1
reader Update
vtkGeometryFilter geom
geom SetInput [reader GetOutput]
geom SetInputConnection [reader GetOutputPort]
vtkPolyDataMapper mapper
mapper SetInput [geom GetOutput]
mapper SetInputConnection [geom GetOutputPort]
mapper SetColorModeToMapScalars
mapper SetScalarModeToUsePointFieldData
mapper ColorByArrayComponent displacement 0
......
......@@ -17,10 +17,10 @@ reader SetTimeValue 1.0
reader Update
vtkGeometryFilter geom
geom SetInput [reader GetOutput]
geom SetInputConnection [reader GetOutputPort]
vtkPolyDataMapper mapper
mapper SetInput [geom GetOutput]
mapper SetInputConnection [geom GetOutputPort]
mapper SetColorModeToMapScalars
mapper SetScalarModeToUsePointFieldData
mapper ColorByArrayComponent displacement 0
......
......@@ -17,10 +17,10 @@ reader SetTimeValue 1
reader Update
vtkGeometryFilter geom
geom SetInput [reader GetOutput]
geom SetInputConnection [reader GetOutputPort]
vtkPolyDataMapper mapper
mapper SetInput [geom GetOutput]
mapper SetInputConnection [geom GetOutputPort]
mapper SetColorModeToMapScalars
mapper SetScalarModeToUsePointFieldData
mapper ColorByArrayComponent displacement 0
......
......@@ -15,18 +15,18 @@ vtkEnSightMasterServerReader reader
reader Update
vtkGeometryFilter geom0
geom0 SetInput [reader GetOutput]
geom0 SetInputConnection [reader GetOutputPort]
vtkGeometryFilter geom1
geom1 SetInput [reader GetOutput 1]
vtkPolyDataMapper mapper0
mapper0 SetInput [geom0 GetOutput]
mapper0 SetInputConnection [geom0 GetOutputPort]
mapper0 SetColorModeToMapScalars
mapper0 SetScalarModeToUsePointFieldData
mapper0 ColorByArrayComponent pointScalars 0
mapper0 SetScalarRange 0 112
vtkPolyDataMapper mapper1
mapper1 SetInput [geom1 GetOutput]
mapper1 SetInputConnection [geom1 GetOutputPort]
mapper1 SetColorModeToMapScalars
mapper1 SetScalarModeToUsePointFieldData
mapper1 ColorByArrayComponent pointScalars 0
......
......@@ -14,18 +14,18 @@ vtkGenericEnSightReader reader
reader Update
vtkGeometryFilter geom0
geom0 SetInput [reader GetOutput]
geom0 SetInputConnection [reader GetOutputPort]
vtkGeometryFilter geom1
geom1 SetInput [reader GetOutput 1]
vtkPolyDataMapper mapper0
mapper0 SetInput [geom0 GetOutput]
mapper0 SetInputConnection [geom0 GetOutputPort]
mapper0 SetColorModeToMapScalars
mapper0 SetScalarModeToUsePointFieldData
mapper0 ColorByArrayComponent pointScalars 0
mapper0 SetScalarRange 0 112
vtkPolyDataMapper mapper1
mapper1 SetInput [geom1 GetOutput]
mapper1 SetInputConnection [geom1 GetOutputPort]
mapper1 SetColorModeToMapScalars
mapper1 SetScalarModeToUsePointFieldData
mapper1 ColorByArrayComponent pointScalars 0
......
......@@ -25,12 +25,12 @@ reader SetCaseFileName $VTK_DATA_ROOT/Data/EnSight/ironProt_ascii.case
reader Update
vtkContourFilter Contour0
Contour0 SetInput [reader GetOutput]
Contour0 SetInputConnection [reader GetOutputPort]
Contour0 SetValue 0 200
Contour0 SetComputeScalars 1
vtkPolyDataMapper mapper
mapper SetInput [Contour0 GetOutput]
mapper SetInputConnection [Contour0 GetOutputPort]
mapper SetImmediateModeRendering 1
mapper SetScalarRange 0 1
mapper SetScalarVisibility 1
......
......@@ -25,12 +25,12 @@ reader SetCaseFileName $VTK_DATA_ROOT/Data/EnSight/ironProt_bin.case
reader Update
vtkContourFilter Contour0
Contour0 SetInput [reader GetOutput]
Contour0 SetInputConnection [reader GetOutputPort]
Contour0 SetValue 0 200
Contour0 SetComputeScalars 1
vtkPolyDataMapper mapper
mapper SetInput [Contour0 GetOutput]
mapper SetInputConnection [Contour0 GetOutputPort]
mapper SetImmediateModeRendering 1
mapper SetScalarRange 0 1
mapper SetScalarVisibility 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment