[vtkusers] How to get the error scalars from windowedSincFilter?
Jérôme
jerome.velut at gmail.com
Sun Dec 20 05:09:17 EST 2009
Hi,
Error scalars are generated in a data array that you will find in
output->GetPointData()->GetScalars(). Reading the code of
vtkWindowedSincPolyDataFilter.cxx taught me that:
if ( this->GenerateErrorScalars )
{
vtkFloatArray *newScalars = vtkFloatArray::New();
newScalars->SetNumberOfTuples(numPts);
for (i=0; i<numPts; i++)
{
inPts->GetPoint(i,x1);
newPts[zero]->GetPoint(i,x2);
newScalars->SetComponent(i,0,
sqrt(vtkMath::Distance2BetweenPoints(x1,x2)));
}
int idx = output->GetPointData()->AddArray(newScalars);
output->GetPointData()->SetActiveAttribute(idx,
vtkDataSetAttributes::SCALARS);
newScalars->Delete();
}
It means that a scalar array containing the error is added to the output. As
name is not specified, a default name should be created. Just look at the
existing PointData arrays, I am quite sure you will find what you are
looking for.
For the visualization purpose, you have to "color by scalars". I think that
the elevation filter example is doing exactly that: colouring a surface by
scalar data.
HTH
Jerome
2009/12/19 <lynx.abraxas at freenet.de>
> Hello!
>
>
> In the class reference of the windowed sinc filter I found the hint
> to
> GenerateErrorScalarsOn. I now wonder where do I find these error scalars
> then?
> Are they the lenght of the displacement vector?
> How would they be used to colour the smoothed mesh according to the
> strenght
> of the change?
>
> Many thanks for any help or hints.
> Lynx
>
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091220/86ef33ab/attachment.htm>
More information about the vtkusers
mailing list