[Paraview] Extract Block from MultiBlock into vtkImageData

Eric E. Monson emonson at cs.duke.edu
Thu Apr 29 11:40:01 EDT 2010


Hey Mike,

Hopefully someone else has a "real" filter that will do this, but in the meantime I think you can do what you want with a Python Programmable Filter. Set the output to the type you want, and put something like this in the script:

pdi = self.GetInputDataObject(0,0)
block0 = pdi.GetBlock(0)
pdo = self.GetOutputDataObject(0)
pdo.ShallowCopy(block0)

-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group


On Apr 29, 2010, at 10:53 AM, Michael Jackson wrote:

> Is there a pipeline that would allow me to extract a block from a MultiBlock data set and end up with the "native type" of vtk object that the block represents?
> 
> I have a custom reader that reads data from an HDF5 file and outputs vtkMultiBlockDataset. I then use the "ExtractBlock" filter to pull out a specific data set. The type of data is a Uniform Rectilinear Grid that is store in the block. After the ExtractBlock the extracted data is still listed as MultiBlock. I then run some filters (Extract Surface) that generates PolyData. I would now like to "AppendDatasets" but the filter is not available because I am assuming that the filter does not like the vtkMultiBlockDataset that are produced from all the other steps.
> 
>  I am thinking of a filter such that the input is a MultiBlockDataset and the output is a vtkImage, or vtkPolyData or something like that.
> 
> Thanks for any help.
> 
> this is on ParaView 3.8.0 RC1, OS X 10.5.8, Qt 4.6.2 Cocoa.
> ___________________________________________________________
> Mike Jackson                      www.bluequartz.net
> Principal Software Engineer       mike.jackson at bluequartz.net
> BlueQuartz Software               Dayton, Ohio
> 
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
> 
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview



More information about the ParaView mailing list