<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi!<br><br>I am writing a filter which should calculate the horizontal average of a given dataset and display it as a function of depth. In my case, the x-coordinate specifies the radius and therefore the depth. <br><br> I chose the output to be a rectilinear grid and tried to set it like this:<br><br><i>vtkInformation* outInfo = outputVector -> GetInformationObject(0);<br> vtkRectilinearGrid* output = vtkRectilinearGrid::SafeDownCast(outInfo -> Get(vtkDataObject::DATA_OBJECT()));<br><br>//calculating the horizontal average<br><br>output -> SetDimensions(dims[0],1,1);<br>output -> SetXCoordinates(xCoord);<br>output -> SetYCoordinates(yCoord);<br>output -> SetZCoordinates(zCoord);<br><br>output -> GetPointData() -> AddArray(horizontal);<br>output -> Squeeze();</i><br><br>dims[0] is the dimension in x-direction I get from the input, xCoord, yCoord and zCoord are of the type vtkFloatArray and contain the coordinates in the according direction. I compared their number of tuples to the dimensions I specified - they agree. <br><br>Lamentably, I get a segmentation fault setting the dimensions in the output array. Did I forget to specify something? Does specifying the dimensions and the Coordinates not suffice to determine the Rectilinear Grid?<br><br>Once the Array is set, I would like to call the PlotData -filter or something that creates a cartesian grid and draws my function. How do I do that?<br><br>Thanks a lot and have a nice weekend,<br>Natalie<br><br>                                            </body>
</html>