[vtkusers] Problem in Quadric CLustering

Vipul vipul at sahajanandsoftware.com
Thu Aug 26 00:43:18 EDT 2004


Vipul ChotaliyaI m new to VTK.
I have main two problems;

1) I have one problem regarding quadric clustering;

I am applying quadric clustering on my imagedata no. of times by coding .

 but  each time

 I have to set UseInputPoints to ON.  then I will get proper data after algorithm.

if I am setting UseInputPoints to OFF  then I was unable to get Image.


2) And after applying quadric clustering algo.  I was unable to  get new data directly.
  So I have to use vtkPolyDatawriter (which is write data to file)
   --> give vtkquadricclustering output to  vtkPolyDatawriter
  --> then write it to file.
  -> after writing into file I am able to get data.
suggest me short to way to get directly processed data..  

 for your reference my code is as below






*************************************************




FOr reference my code  is as below:::
vtkQuadricClustering *vtkQClust = vtkQuadricClustering::New();

vtkPolyDataWriter *writer=vtkPolyDataWriter::New();

vtkQClust->SetInput(OutPut);

vtkQClust->SetNumberOfXDivisions(nFactorX);

vtkQClust->SetNumberOfYDivisions(nFactorY);

vtkQClust->SetNumberOfZDivisions(nFactorZ); 


if(nNoOfTimes==1)

{

vtkQClust->UseFeatureEdgesOff ();

vtkQClust->UseInputPointsOn();  //give me soluting in which way I can set this to ON

vtkQClust->UseFeaturePointsOff();

vtkQClust->CopyCellDataOff();

}

else

{

vtkQClust->UseFeatureEdgesOn ();

vtkQClust->UseInputPointsOn();

vtkQClust->UseFeaturePointsOn();

vtkQClust->CopyCellDataOff();

}



OutPut = vtkQClust->GetOutput(); //writer->GetInput(); 

writer->SetInput(OutPut); 

bProcessAhead=FALSE;



writer->SetFileName(pst1);

float fPtArray[5000][3];

//writer->SetInput(cube);


//printf("i=%d %d\n",i+1,writer->Getput()->GetPolys()->GetNumberOfCells());

iData[1]=writer->GetInput()->GetNumberOfPolys();

writer->Write(); 

iData[1]=writer->GetInput()->GetNumberOfPolys();

OutPut = writer->GetInput();








-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040826/c5628504/attachment.htm>


More information about the vtkusers mailing list