Fixed errors. C,F,E works with limits, extent.

Added .cmap for color mapping and .range to set the color range. Need to add colorbar, and more settings as it comes along.
This commit is contained in:
Gudni Karl Rosenkjaer
2013-11-27 09:11:02 -08:00
parent 1ec3c5cd09
commit 5fd4290927
2 changed files with 58 additions and 28 deletions
+3 -5
View File
@@ -46,7 +46,7 @@ class vtkTools(object):
vZ = mesh.vectorNz
zD = mesh.nNz
# Use rectilinear VTK grid.
# Asaign the spatial information.
# Assign the spatial information.
vtkObj = vtk.vtkRectilinearGrid()
vtkObj.SetDimensions(xD,yD,zD)
vtkObj.SetXCoordinates(npsup.numpy_to_vtk(vX,deep=1))
@@ -257,8 +257,7 @@ class vtkTools(object):
cellThres = vtk.vtkThreshold()
cellThres.AllScalarsOn()
cellThres.SetInputConnection(cellCore.GetOutputPort())
cellThres.ThresholdByUpper(limits[0])
cellThres.ThresholdByLower(limits[1])
cellThres.ThresholdBetween(limits[0],limits[1])
cellThres.Update()
return cellThres.GetOutput(), cellCore.GetOutput()
@@ -273,8 +272,7 @@ class vtkTools(object):
cellThres = vtk.vtkThreshold()
cellThres.AllScalarsOn()
cellThres.SetInputConnection(cellCore.GetOutputPort())
cellThres.ThresholdByUpper(limits[0])
cellThres.ThresholdByLower(limits[1])
cellThres.ThresholdBetween(limits[0],limits[1])
cellThres.Update()
return cellThres.GetOutput(), cellCore.GetOutput()