[vtkusers] how to attach multi-attributes to the same dataset?
April.Q
qinjiameilf at 163.com
Mon Jul 16 04:53:45 EDT 2012
Thanks David E DeMarle, it works.
Now i get many StructuredGrids , all of them has two attributes scalar_1 and
scalar_2.
Then i use these StructuredGrids build a vtkMultiBlockDataset.
I want to render these vtkMultiBlockDataset and find one topic about it ,and
see your advice .
How to tell the filter to operate on a specific array(eg. only render a
slice of scalar_2)??Tell which filter ??
I use python ,and i do like this:
pipeline = vtk.vtkCompositeDataPipeline()
algorithm = vtk.vtkAlgorithm()
algorithm.SetDefaultExecutivePrototype(pipeline)
compositeFilter = vtk.vtkCompositeDataGeometryFilter()
compositeFilter.SetInput(MyMultiBlockDataset)
compositeFilter.Update()
colors = vtk.vtkImageMapToColors()
colors.SetInputConnection(compositeFilter.GetOutputPort())
colors.SetLookupTable(MyLookupTable)
colors.Update()
imageReslice = vtk.vtkImageReslice()
imageReslice.SetInput(colors.GetOutput())
sliceMapper = vtk.vtkImageMapper()
sliceMapper.SetInputConnection(imageReslice.GetOutputPort())
sliceActor = vtk.vtkActor()
sliceActor.SetMapper(sliceMapper)
#ValueError: method requires a vtkMapper, a
# vtkOpenGLImageMapper was provided.
renderer...
renWin...
iren...
... ...
--
View this message in context: http://vtk.1045678.n5.nabble.com/how-to-attach-multi-attributes-to-the-same-dataset-tp5714692p5714714.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list