[vtkusers] Proble Regarding Quadric CLustering

Vipul vipul at sahajanandsoftware.com
Mon Aug 23 08:26:16 EDT 2004


Vipul ChotaliyaHi VTK Users,

I 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();







































































*****************************************
"If you look at what you do not have in life, you don't have anything"
"If you look at what you have in life, you have everything"
*****************************************
Vipul Chotaliya (Software Engineer)
Sahajanand Software Pvt. Ltd.,
Gandhinagar, Gujarat INDIA.
Cell No :-   +91-98980 95309
Mailto:- vipul at sahajanandsoftware.com
Web:-  www.sahajanandsoftware.com 
*****************************************















-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040823/312d878c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Vipul M. Chotaliya.vcf
Type: text/x-vcard
Size: 805 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040823/312d878c/attachment.vcf>


More information about the vtkusers mailing list