Re: [Paraview] Saving PlotSelectionOverTime result to CSV file in script

2013-10-07 Thread Peter Maday
Thanks for the reply!

I have tried this setup, however I could not find a filter that would
produce the correct output with the CreateWriter. When using the
PlotVariablesOverTime it does not work, as it produces a
vtkMultiBlockDataset as opposed to a vtkTable that is required by the CSV
writer.

The solution I have found was to use a programmable filter in a similar
setup (with the appropriate selection of the block and column indices):

progFilter=ProgrammableFilter()
progFilter.OutputDataSetType='vtkTable'
progFilter.PythonPath = ''
progFilter.RequestInformationScript = ''
#progFilter.RequestUpdateExtentScript= ''
progFilter.Script = \
dataTable=self.GetInput().GetBlock(0).GetColumn(0)\n\
output=self.GetTableOutput()\n\
output.AddColumn(dataTable)\n\


I believe it is worth mentioning that it is possible to put the debugger
breakpoints (pdb.set_trace()) in the progFilter.Script string and this way
to figure out what exactly the input of the filter is like.



2013/10/4 David E DeMarle dave.dema...@kitware.com

 Try Using CreateWriter() like so:
 writer = CreateWriter(.../foo.csv, source)
 writer.FieldAssociation = Points # or Cells
 writer.UpdatePipeline()
 del writer

 David E DeMarle
 Kitware, Inc.
 RD Engineer
 21 Corporate Drive
 Clifton Park, NY 12065-8662
 Phone: 518-881-4909


 On Fri, Oct 4, 2013 at 10:18 AM, Peter Maday madap...@gmail.com wrote:

 Dear All,

 I would like to automate a process that involves saving the output of a
 PlotSelectionOverTime filter to a CSV file. Manually it is done by invoking
 the Save data  command from the File menu while the graph view is
 selected.

 When I try to record the trace for this step, it does not contain the CSV
 save part.

 My question is how to save the PlotSelectionOverTime output to a text
 file in a script.

 Thansk a lot!

 ___
 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] Saving PlotSelectionOverTime result to CSV file in script

2013-10-07 Thread David E DeMarle
Thanks for sharing your solution with the list!


David E DeMarle
Kitware, Inc.
RD Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Mon, Oct 7, 2013 at 5:02 AM, Peter Maday madap...@gmail.com wrote:

 Thanks for the reply!

 I have tried this setup, however I could not find a filter that would
 produce the correct output with the CreateWriter. When using the
 PlotVariablesOverTime it does not work, as it produces a
 vtkMultiBlockDataset as opposed to a vtkTable that is required by the CSV
 writer.

 The solution I have found was to use a programmable filter in a similar
 setup (with the appropriate selection of the block and column indices):

 progFilter=ProgrammableFilter()
 progFilter.OutputDataSetType='vtkTable'
 progFilter.PythonPath = ''
 progFilter.RequestInformationScript = ''
 #progFilter.RequestUpdateExtentScript= ''
 progFilter.Script = \
 dataTable=self.GetInput().GetBlock(0).GetColumn(0)\n\
 output=self.GetTableOutput()\n\
 output.AddColumn(dataTable)\n\
 

 I believe it is worth mentioning that it is possible to put the debugger
 breakpoints (pdb.set_trace()) in the progFilter.Script string and this way
 to figure out what exactly the input of the filter is like.



 2013/10/4 David E DeMarle dave.dema...@kitware.com

 Try Using CreateWriter() like so:
 writer = CreateWriter(.../foo.csv, source)
 writer.FieldAssociation = Points # or Cells
 writer.UpdatePipeline()
 del writer

 David E DeMarle
 Kitware, Inc.
 RD Engineer
 21 Corporate Drive
 Clifton Park, NY 12065-8662
 Phone: 518-881-4909


 On Fri, Oct 4, 2013 at 10:18 AM, Peter Maday madap...@gmail.com wrote:

 Dear All,

 I would like to automate a process that involves saving the output of a
 PlotSelectionOverTime filter to a CSV file. Manually it is done by invoking
 the Save data  command from the File menu while the graph view is
 selected.

 When I try to record the trace for this step, it does not contain the
 CSV save part.

 My question is how to save the PlotSelectionOverTime output to a text
 file in a script.

 Thansk a lot!

 ___
 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] Saving PlotSelectionOverTime result to CSV file in script

2013-10-04 Thread Peter Maday
Dear All,

I would like to automate a process that involves saving the output of a
PlotSelectionOverTime filter to a CSV file. Manually it is done by invoking
the Save data  command from the File menu while the graph view is
selected.

When I try to record the trace for this step, it does not contain the CSV
save part.

My question is how to save the PlotSelectionOverTime output to a text file
in a script.

Thansk a lot!
___
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] Saving PlotSelectionOverTime result to CSV file in script

2013-10-04 Thread David E DeMarle
Try Using CreateWriter() like so:
writer = CreateWriter(.../foo.csv, source)
writer.FieldAssociation = Points # or Cells
writer.UpdatePipeline()
del writer

David E DeMarle
Kitware, Inc.
RD Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Fri, Oct 4, 2013 at 10:18 AM, Peter Maday madap...@gmail.com wrote:

 Dear All,

 I would like to automate a process that involves saving the output of a
 PlotSelectionOverTime filter to a CSV file. Manually it is done by invoking
 the Save data  command from the File menu while the graph view is
 selected.

 When I try to record the trace for this step, it does not contain the CSV
 save part.

 My question is how to save the PlotSelectionOverTime output to a text file
 in a script.

 Thansk a lot!

 ___
 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