<div>Thank for this example. <br> <br>But I'm trying to apply this to my case, and have one question again ..... :-|<br> <br> # TODO: Generate the data as you want.<br> <br>---> That should be the DataSet at one timestep ?<br>
How does the programmable source handle the change of the filename to read ?<br>Should I use a command sort of "executive.GetActiveTimeStep()" when I define the filename to read ?</div>
<div> </div>
<div>Le 23 avril 2010 20:48, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>></span> a écrit :<br></div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I've added an example to the Wiki showing how to produce timesteps<br>from programmable source.<br><a href="http://www.paraview.org/Wiki/Here_are_some_more_examples_of_simple_ParaView_3_python_filters.#Producing_Data_with_Timesteps_.28Source.29" target="_blank">http://www.paraview.org/Wiki/Here_are_some_more_examples_of_simple_ParaView_3_python_filters.#Producing_Data_with_Timesteps_.28Source.29</a><br>
<br>There's one caveat currently. The GUI does not realize the timesteps<br>being produced, so you will have to manually adjust the time ranges<br>for the animation using the Animation View.<br>
<div>
<div></div>
<div class="h5"><br>Utkarsh<br><br>2010/4/23 Aurélien Marsan <<a href="mailto:aur.marsan@gmail.com">aur.marsan@gmail.com</a>>:<br>> Yet I understand why it's not possible to work with TemporalDataSet in<br>> Paraview.<br>
> The output of the PVDReader is a MultiBlockDataSet, and the PVDReader<br>> redirect the reader based on the time value.<br>><br>> ... Is it possible to create a programmable source that would be aware of<br>
> the timestep ?<br>> Or do I have to abandon python and write a reader in the C++ source ?<br>><br>> Le 23 avril 2010 17:15, Aurélien Marsan <<a href="mailto:aur.marsan@gmail.com">aur.marsan@gmail.com</a>> a écrit :<br>
>><br>>> ah....<br>>><br>>> So : I use file in format v3d.<br>>> For a mesh that contains two blocks, they would be called called<br>>> block1_timestep1.v3d, block2_timestep1.v3d, block1_timestep2.v3d,<br>
>> block2_timestep2.v3d, etc...<br>>><br>>> Actually, I open these v3d_files with a python tool that I have<br>>> writen, translate them as vtk.vtkStructuredGrid, and write several files on<br>>> the disk as TimeStep1.vtm, TimeStep2.vtm and Simulation.pvd<br>
>> But this takes a lot a disk space, and reading/writing takes a lot of<br>>> time.<br>>><br>>> So I would like to open the v3d file directly in paraview.<br>>> That's why I though to use a Programmable Source in order to read all v3d<br>
>> files and create a "Temporal Data Set".<br>>><br>>> Le 23 avril 2010 16:35, Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> a<br>>> écrit :<br>
>>><br>>>> Temporal DataSet! Filters shouldn't be producing temporal dataset<br>>>> explicitly. Why do you need it?<br>>>><br>>>> Utkarsh<br>>>><br>>>> 2010/4/23 Aurélien Marsan <<a href="mailto:aur.marsan@gmail.com">aur.marsan@gmail.com</a>>:<br>
>>> > thanks !<br>>>> > And so, could you add "Temporal Data Set" to this commit ?<br>>>> > Le 23 avril 2010 16:28, Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> a<br>
>>> > écrit :<br>>>> ><br>>>> >> I've just committed a change to ParaView to allow setting output type<br>>>> >> to be a multiblock dataset.<br>>>> >><br>
>>> >> Commit id: c7472789ba86210e190f398a90eebc081a66d40c<br>>>> >><br>>>> >> Utkarsh<br>>>> >><br>>>> >> 2010/4/23 Aurélien Marsan <<a href="mailto:aur.marsan@gmail.com">aur.marsan@gmail.com</a>>:<br>
>>> >> > I found a solution to do what I wanted to do. Not really elegant,<br>>>> >> > but it<br>>>> >> > works.<br>>>> >> > The best would be to encode the reader in the source code.... but I<br>
>>> >> > don't<br>>>> >> > know how to do, and have no time for now.<br>>>> >> ><br>>>> >> > First, I use the tool Source -> Data Object Generator, and create a<br>
>>> >> > MultiBlockDataSet.<br>>>> >> >><br>>>> >> >> MB{}<br>>>> >> ><br>>>> >> ><br>>>> >> > Then, I use a Programmable Filter, and set the Output Data Type<br>
>>> >> > "Same as<br>>>> >> > Input".<br>>>> >> > So I can use this script.<br>>>> >> ><br>>>> >> >><br>>>> >> >> from Moduleperso import *<br>
>>> >> >> m = MultiBlocFromV3D(........) # This is a personnal reader<br>>>> >> >> in<br>>>> >> >> python, that returns a vtkMultiBlockDataSet<br>>>> >> >> self.GetOutputDataObject(0).DeepCopy(m)<br>
>>> >> ><br>>>> >> ><br>>>> >> > Hope this will help some people who don't want to go in source<br>>>> >> > code...<br>>>> >> ><br>
>>> >> > Le 23 avril 2010 14:07, Aurélien Marsan <<a href="mailto:aur.marsan@gmail.com">aur.marsan@gmail.com</a>> a<br>>>> >> > écrit :<br>>>> >> >><br>>>> >> >> Maybe I have found a way to avoid the Programmable Source...<br>
>>> >> >><br>>>> >> >> But Is it possible to export an object created in the python shell<br>>>> >> >> directly into the pipeline of the paraview interface ?<br>
>>> >> >><br>>>> >> >> Le 22 avril 2010 15:36, Aurélien Marsan <<a href="mailto:aur.marsan@gmail.com">aur.marsan@gmail.com</a>> a<br>>>> >> >> écrit<br>
>>> >> >> :<br>>>> >> >>><br>>>> >> >>> Hi,<br>>>> >> >>><br>>>> >> >>> A new thing I don't know how to do with Paraview.<br>
>>> >> >>> I have written a personnal reader, that creates vtkStructuredGrid<br>>>> >> >>> from<br>>>> >> >>> files written in so called format "v3d". So I'm able to construct<br>
>>> >> >>> a<br>>>> >> >>> MutliBlockDataSet, that is composed of all the Blocks I'm working<br>>>> >> >>> with.<br>>>> >> >>><br>
>>> >> >>> I would like to use "Programmable Source", so we don't need to<br>>>> >> >>> write<br>>>> >> >>> the<br>>>> >> >>> file on the disk before to open it with Paraview.<br>
>>> >> >>> Does "Programmable Source" work with MultiBlockDataSet ? I don't<br>>>> >> >>> see<br>>>> >> >>> this<br>>>> >> >>> class in the Output Data Set Type that we can choose...<br>
>>> >> >>><br>>>> >> >>> And is it correct if I write in the Script of the Programmable<br>>>> >> >>> Filter<br>>>> >> >>> :<br>
>>> >> >>><br>>>> >> >>> from perso import *<br>>>> >> >>> multiblock = MultiBlockDataSetFromV3D(.....)<br>>>> >> >>> self.GetOutput().DeepCopy(multiblock)<br>
>>> >> >>><br>>>> >> >>> Thanks for help.<br>>>> >> >>><br>>>> >> >>> A.MARSAN<br>>>> >> ><br>>>> >> ><br>
>>> >> > _______________________________________________<br>>>> >> > Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>>>> >> ><br>>>> >> > Visit other Kitware open-source projects at<br>
>>> >> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>>>> >> ><br>>>> >> > Please keep messages on-topic and check the ParaView Wiki at:<br>
>>> >> > <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>>>> >> ><br>>>> >> > Follow this link to subscribe/unsubscribe:<br>
>>> >> > <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>>>> >> ><br>>>> >> ><br>>>> ><br>
>>> ><br>>><br>><br>><br></div></div></blockquote></div><br>