Re: [Paraview] Ensight Imort Multiblock Datasets
>> Let me know if you run into performance problems. It >> may be a bit slow to create 80 pipeline elements because it is going >> to create object inspector panels for each. >> > Yes indeed this is very slow. Everything else works quite fine. Can you please elaborate? 5 seconds? 2 minutes? Thanks, -berk ___ 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
Re: [Paraview] Ensight Imort Multiblock Datasets
> Let me know if you run into performance problems. It > may be a bit slow to create 80 pipeline elements because it is going > to create object inspector panels for each. > Yes indeed this is very slow. Everything else works quite fine. Regards BastiL ___ 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
Re: [Paraview] Ensight Imort Multiblock Datasets
Berk Geveci schrieb: >> using the latest cvs I have problems: >> >> from libvtkGraphicsPython import * >> >> ImportError: libvtkGraphicsPythonD.so.pv3.7: File not found >> > > Strange. Are you building with rpath off? You may have to set your > LD_LIBRARY_PATH to where the ParaView libraries are. > > Yes with turning it on I did not get it build. I have it working now by doing an install. >>* First reading mutliblockdataset and extracting blocks afterwards >> doubles memory requirements I think? >> > > Nope. I used shallow copy which copies pointers to the actual data > arrays. This would use a bit of extra memory - for some pointers > essentially. For something bigger than a few Kbytes, this would be > completely negligible. It should also be super fast as there is no > copying going on. Let me know if you run into performance problems. It > may be a bit slow to create 80 pipeline elements because it is going > to create object inspector panels for each. > > Fine. I was not aware of that. It is litte slow for my ensight cases with about 100 parts - but it works great. >>* I still have all parts as a mutliblockdataset i think which I do >> not like (some filters do not run ...) >> > > Nope. The output of each filter will be a vtkDataSet - whatever you > block data type is. Note that this script works only for multi-block > datasets that are 1 layer deep (such as the one produced by Ensight). > It would not do the right thing if your multi-block tree is deeper. > Ok thanks. Final question: How can it be run automatically after the Ensight-reader? > Best, > -berk > ___ > 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 > > ___ 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
Re: [Paraview] Ensight Imort Multiblock Datasets
> using the latest cvs I have problems: > > from libvtkGraphicsPython import * > > ImportError: libvtkGraphicsPythonD.so.pv3.7: File not found Strange. Are you building with rpath off? You may have to set your LD_LIBRARY_PATH to where the ParaView libraries are. > * First reading mutliblockdataset and extracting blocks afterwards > doubles memory requirements I think? Nope. I used shallow copy which copies pointers to the actual data arrays. This would use a bit of extra memory - for some pointers essentially. For something bigger than a few Kbytes, this would be completely negligible. It should also be super fast as there is no copying going on. Let me know if you run into performance problems. It may be a bit slow to create 80 pipeline elements because it is going to create object inspector panels for each. > * I still have all parts as a mutliblockdataset i think which I do > not like (some filters do not run ...) Nope. The output of each filter will be a vtkDataSet - whatever you block data type is. Note that this script works only for multi-block datasets that are 1 layer deep (such as the one produced by Ensight). It would not do the right thing if your multi-block tree is deeper. Best, -berk ___ 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
Re: [Paraview] Ensight Imort Multiblock Datasets
Thanks Berk, using the latest cvs I have problems: from libvtkGraphicsPython import * ImportError: libvtkGraphicsPythonD.so.pv3.7: File not found I guess something is wrong with my installation? I am not sure about your scripting. I prefer doing it during import (modified reader) due to: * First reading mutliblockdataset and extracting blocks afterwards doubles memory requirements I think? * I still have all parts as a mutliblockdataset i think which I do not like (some filters do not run ...) Am I right about that? Regards BastiL Berk Geveci schrieb: > I had some fun doing this in Python. Here is a script that creates a > Python filter for each block and names it with the block name. To run > it, you need to select the Ensight reader and then run this script > using the Python Shell under the Tools menu. This requires cvs > ParaView unfortunately as I had to make some minor changes to make it > work. > > Another hint: remember that you can turn on/off the visibility of > multiple object by selecting them (using shift+click or control+click) > in the pipeline browser and clicking on the visibility icon (the eye) > of one of them. > > -berk > > > from paraview.simple import * > > def extract_block(source, outputType, name, di, idx): > if name: > pf = ProgrammableFilter(source, registrationName=name) > else: > pf = ProgrammableFilter(source) > pf.OutputDataSetType = outputType > pf.Script = """ > input = self.GetInputDataObject(0, 0) > self.GetOutputDataObject(0).ShallowCopy(input.GetBlock(%d))""" % idx > if outputType == 'vtkImageData' or outputType == > 'vtkStructuredGrid' or outputType == 'vtkRectilinearGrid': > pf.RequestInformationScript = """ > from paraview import util > util.SetOutputWholeExtent(self, %r)""" % list(di.GetExtent()) > Show(pf) > > source = GetActiveSource() > if not source: > raise RuntimeError, "This macro needs an active pipeline object" > source.UpdatePipeline() > cdi = source.GetDataInformation().GetCompositeDataInformation() > blocks = cdi.GetNumberOfChildren() > for i in range(blocks): > di = cdi.GetDataInformation(i) > eb = extract_block(source, di.GetDataClassName(), cdi.GetName(i), di, i) > Hide(source) > > > On Sun, Jun 21, 2009 at 6:17 AM, BastiL2001 wrote: > >> A nice sunday to everybody, >> >> first of all I have to thank all the Paraview developers who made the tool >> what it is today. After some correspondence on the mailing list I am able to >> use the tool with our models today the way I like :-). >> >> One thing I am not so happy with at the moment is how our >> Ensight-Multiblock-Data gets imported. An import generates one >> Multiblock-Dataset with every Ensight-Zone as a block. I have lots of zones >> and need to extract them all by hand. Maybe this could be scripted. Another >> problem is I use filter that do not work with multiblock-datasets quite >> often (resampleWithDataset, AppendAttributes,...). So in my eyes most >> effektive way of importing would be: Not generate ONE Multiblock-Dataset but >> generate an individuell unstructered Dataset for each Part of the >> ensight-File and name them after the Ensight Part names - this will give you >> e.g. 80 Parts in the Tree if you have 80 Ensight parts instead of one. I >> would not have to extract blocks afterwards. This duplicates the whole >> model. Furthermore, if I need unstructed Datasets, I need to run mergeBlocks >> additionally, producing even more Parts. All of this would not be essential >> if we had such an import filter. >> However, I do not really know how to modify the filter. Maybe someone can >> comment on that. >> >> Regards BastiL >> >> >> >> ___ >> 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 >> >> > > ___ 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
Re: [Paraview] Ensight Imort Multiblock Datasets
I had some fun doing this in Python. Here is a script that creates a Python filter for each block and names it with the block name. To run it, you need to select the Ensight reader and then run this script using the Python Shell under the Tools menu. This requires cvs ParaView unfortunately as I had to make some minor changes to make it work. Another hint: remember that you can turn on/off the visibility of multiple object by selecting them (using shift+click or control+click) in the pipeline browser and clicking on the visibility icon (the eye) of one of them. -berk from paraview.simple import * def extract_block(source, outputType, name, di, idx): if name: pf = ProgrammableFilter(source, registrationName=name) else: pf = ProgrammableFilter(source) pf.OutputDataSetType = outputType pf.Script = """ input = self.GetInputDataObject(0, 0) self.GetOutputDataObject(0).ShallowCopy(input.GetBlock(%d))""" % idx if outputType == 'vtkImageData' or outputType == 'vtkStructuredGrid' or outputType == 'vtkRectilinearGrid': pf.RequestInformationScript = """ from paraview import util util.SetOutputWholeExtent(self, %r)""" % list(di.GetExtent()) Show(pf) source = GetActiveSource() if not source: raise RuntimeError, "This macro needs an active pipeline object" source.UpdatePipeline() cdi = source.GetDataInformation().GetCompositeDataInformation() blocks = cdi.GetNumberOfChildren() for i in range(blocks): di = cdi.GetDataInformation(i) eb = extract_block(source, di.GetDataClassName(), cdi.GetName(i), di, i) Hide(source) On Sun, Jun 21, 2009 at 6:17 AM, BastiL2001 wrote: > > A nice sunday to everybody, > > first of all I have to thank all the Paraview developers who made the tool > what it is today. After some correspondence on the mailing list I am able to > use the tool with our models today the way I like :-). > > One thing I am not so happy with at the moment is how our > Ensight-Multiblock-Data gets imported. An import generates one > Multiblock-Dataset with every Ensight-Zone as a block. I have lots of zones > and need to extract them all by hand. Maybe this could be scripted. Another > problem is I use filter that do not work with multiblock-datasets quite often > (resampleWithDataset, AppendAttributes,...). So in my eyes most effektive way > of importing would be: Not generate ONE Multiblock-Dataset but generate an > individuell unstructered Dataset for each Part of the ensight-File and name > them after the Ensight Part names - this will give you e.g. 80 Parts in the > Tree if you have 80 Ensight parts instead of one. I would not have to extract > blocks afterwards. This duplicates the whole model. Furthermore, if I need > unstructed Datasets, I need to run mergeBlocks additionally, producing even > more Parts. All of this would not be essential if we had such an import > filter. > However, I do not really know how to modify the filter. Maybe someone can > comment on that. > > Regards BastiL > > > > ___ > 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 > ___ 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
[Paraview] Ensight Imort Multiblock Datasets
A nice sunday to everybody, first of all I have to thank all the Paraview developers who made the tool what it is today. After some correspondence on the mailing list I am able to use the tool with our models today the way I like :-). One thing I am not so happy with at the moment is how our Ensight-Multiblock-Data gets imported. An import generates one Multiblock-Dataset with every Ensight-Zone as a block. I have lots of zones and need to extract them all by hand. Maybe this could be scripted. Another problem is I use filter that do not work with multiblock-datasets quite often (resampleWithDataset, AppendAttributes,...). So in my eyes most effektive way of importing would be: Not generate ONE Multiblock-Dataset but generate an individuell unstructered Dataset for each Part of the ensight-File and name them after the Ensight Part names - this will give you e.g. 80 Parts in the Tree if you have 80 Ensight parts instead of one. I would not have to extract blocks afterwards. This duplicates the whole model. Furthermore, if I need unstructed Datasets, I need to run mergeBlocks additionally, producing even more Parts. All of this would not be essential if we had such an import filter. However, I do not really know how to modify the filter. Maybe someone can comment on that. Regards BastiL ___ 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