<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hi there,<br><br>For a while now I'm trying to calculate the spatial derivative of a dataset with an unstructured grid. I use the vtkCellDerivatives and vtkCellDataToPointData classes for this, but it seems that they are not working properly: the original input data set's values are the outcome after filtering. I need help with this, so any advice is welcome.<br><br>The code:<br><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">vtkCellDerivatives *vCellDerivatives = vtkCellDerivatives::New();</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">vtkCellDataToPointData *vCellToPointData = vtkCellDataToPointData::New();</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">vCellDerivatives->SetVectorModeToComputeGradient();</span><br style="font-family: Courier New,Courier,Monospace;"><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">vCellDerivatives->SetInput(vEnsightReader->GetOutput());</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">vCellDerivatives->Update();</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">vCellToPointData->SetInput(vCellDerivatives->GetOutput());</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">vCellToPointData->Update();</span><br><br>The code compiles and runs but gives incorrect results. Please help!<br><br /><hr />Use video conversation to talk face-to-face with Windows Live Messenger. <a href='http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_Refresh_messenger_video_042008' target='_new'>Get started!</a></body>
</html>