[vtkusers] vtkExtractGeometry

a.dek at libero.it a.dek at libero.it
Thu Sep 14 12:29:09 EDT 2000


Hi!
I have a medical data set and I would like to make a volume render of 
only a region.
I have used an implicit function and class vtkExtractGeometry to 
eliminate all of data that is outside the implicit function.
then I have passed my data to vtkContourFilter but the compiler said 
that there is no data.
I have used vtkQuadric to make the implicit function thinking that the 
origin in in the upperleftcorner of the windows. Is it good?
Anybody could you tell me why there is no data to render?
a part of my code is:

	vtkBMPReader *v16= vtkBMPReader::New();
	v16->SetDataByteOrderToLittleEndian();
	v16->SetFilePrefix("E:/users/dek/temp_dek/prova_conn/Conn.bmp");
	v16->Update();
	v16->SetDataExtent(0,255,0,255,0,46);
	v16->SetDataSpacing(1.96,1.96,5);
	v16->GetOutput()->SetOrigin(0.0,0.0,0.0);

	vtkQuadric *quadric=vtkQuadric::New();
    quadric->SetCoefficients (5184.0 ,9604.0, 0,0,0,0, 1244160.0, 
2304960.0, 0, 163160064.0 );

	vtkExtractGeometry *extract=vtkExtractGeometry::New();
	extract->SetInput(v16->GetOutput());
	extract->SetImplicitFunction(quadric);

	
	// extract the skin*/
  vtkContourFilter *skinExtractor = vtkContourFilter::New();
   skinExtractor->SetInput(extract->GetOutput());
 //	skinExtractor->GenerateValues(1,200,230);
	skinExtractor->SetValue(0,180);



	
	vtkDecimatePro *deci=vtkDecimatePro::New();
	deci->SetInput(skinExtractor->GetOutput());
	deci->SetTargetReduction(0.7);



thanks a lot  in advance
Antonella





More information about the vtkusers mailing list