________________________________________ From: [email protected] [[email protected]] On Behalf Of Eric E. Monson [[email protected]] Sent: Thursday, April 29, 2010 5:40 PM To: Michael Jackson Cc: ParaView list Subject: Re: [Paraview] Extract Block from MultiBlock into vtkImageData
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) -------------------------------------------------------------------- Hello Eric The python code above is correct, but an important piece is missing, i.e. setting up the WholeExtent. The RequestInformation Script should also contain: pdi = self.GetInputDataObject(0,0) exts = pdi.GetBlock(0).GetExtent() pdo = self.GetOutputDataObject(0) pdo.SetWholeExtent(exts) ----------------- Jean M. Favre Swiss National Supercomputing Center _______________________________________________ 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
