[vtkusers] using vtkPCAAnalysisFilter for eigen vectors
Syed Amjad
majeed.amjad at gmail.com
Fri Feb 3 02:41:32 EST 2006
Hi,
I'm having troble using vtkPcaanalysisfilter....
I'm following the usual method.. setnumberofinputs.. then setinput then
updata etc.. but I don't get the desired output.
vtkPoints *points.... is my data.
I have a set of data of 336 points... (vtkPoints).. just one set.. so I
guess that the setnumberofinputs will be only 1. then my setinput is
setinput(0, points).... then I do an update... This doesn't work.. really
here's the code:
*/ //set input for pca
vtkPolyData *pointset=vtkPolyData::New();
pointset->SetPoints(points);
pointset->Update();
pca->SetNumberOfInputs(1);
pca->SetInput(0,pointset);
//execute pca
pca->Update();
cout<<"eigen values: ";
numPoints=pca->GetEvals()->GetNumberOfTuples();
for(i=0;i<1;i++)
cout<<" "<<pca->GetEvals()->GetValue(i);
All I want to know is how I get the filter to work on these points so that I
can get the eigen values AND the eigen vectors..
right now I get a nonsense value..
thankyou,
Majeed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060203/bcbdcb7e/attachment.htm>
More information about the vtkusers
mailing list