mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-17 11:26:45 +08:00
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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user