# vtkDescriptiveStatistics output in vtk 7.1.1

**URL:** https://discourse.vtk.org/t/vtkdescriptivestatistics-output-in-vtk-7-1-1/5584
**Category:** Support
**Created:** [April 19, 2021, 4:55pm UTC](https://discourse.vtk.org/t/vtkdescriptivestatistics-output-in-vtk-7-1-1/5584 "2021-04-19T16:55:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Jonas\_Grammens](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jonas_grammens/32/3264_2.png) [@Jonas\_Grammens](https://discourse.vtk.org/u/Jonas_Grammens)
#### Post date: [April 19, 2021, 4:55pm UTC](https://discourse.vtk.org/t/vtkdescriptivestatistics-output-in-vtk-7-1-1/5584/1 "2021-04-19T16:55:41Z")

</div>

Hi all,

I am trying to calcalute some descriptive statistics from a vtkDoubleArray.  
So far, I created a vtkTable as input for the vtkDescriptiveStatistics object and set the columns, learn, derive and assess options.  
However, when I try to retrieve the output (from port 1, the learned statistical model) I can’t figure out whether this should be a vtkMultiBlockDataSet or a vtkTable. The latest documentation states vtkMultiBlockDataSet but I get compilation errors when I try to do so…  
Can someone help me out with an example on how to use the output of vtkDescriptiveStatistics?

this is the code I’m working with to debug (I try to write the output to a csv file).

> vtkSmartPointer \<vtkTable\> inputtable = vtkSmartPointer \<vtkTable\>::New();  
> inputtable-\>AddColumn(doublearray);  
> vtkSmartPointer\<vtkDescriptiveStatistics\> fdesc = vtkSmartPointer\<vtkDescriptiveStatistics\>::New();  
> fdesc-\>SetInputData(inputtable);  
> fdesc-\>AddColumn(inputtable-\>GetColumnName(0));  
> fdesc-\>SetLearnOption(1);;  
> fdesc-\>SetDeriveOption(0);  
> fdesc-\>SetAssessOption(0);  
> fdesc-\>Update();  
> vtkTable \*output = fdes-\>GetOutput(1);  
> vtkSmartPointer\<vtkDelimitedTextWriter\> tblwriter=vtkSmartPointer\<vtkDelimitedTextWriter\>::New();  
> tblwriter-\>SetInputData(output);  
> tblwriter-\>SetFileName(“/home/jonas/Bureaublad/testtable.csv”);  
> tblwriter-\>Write();
