Hi,<br>
<br>
I'm having troble using vtkPcaanalysisfilter....<br>
<br>
I'm following the usual method.. setnumberofinputs.. then setinput then updata etc.. but I don't get the desired output.<br>
<br>
vtkPoints *points.... is my data.<br>
<br>
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 <br>
<br>
here's the code:<br>
<br>
*/ //set input for pca<br>
<br>
vtkPolyData *pointset=vtkPolyData::New();<br>
pointset->SetPoints(points);<br>
<br>
pointset->Update();<br>
<br>
pca->SetNumberOfInputs(1);<br>
pca->SetInput(0,pointset);<br>
<br>
//execute pca<br>
pca->Update();<br>
cout<<"eigen values: ";<br>
<br>
numPoints=pca->GetEvals()->GetNumberOfTuples();<br>
<br>
for(i=0;i<1;i++)<br>
cout<<" "<<pca->GetEvals()->GetValue(i);<br>
<br>
<br>
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.. <br>
<br>
right now I get a nonsense value.. <br>
<br>
thankyou,<br>
<br>
Majeed<br>