[vtkusers] Create volume

Nour Mestiri nourmestiri at yahoo.fr
Mon Jan 19 05:50:26 EST 2009


Hi all vtk users.
I want to create a volume by the superposition of a sequence of images (bmp). I use this code and it runs but i have some problems. 
I want to know if there is another way to do that. 
Thanks for your help.
 
vtkVolume16Reader *v16 = vtkVolume16Reader::New();
v16->SetDataDimensions(128,128);
v16->SetFilePrefix("C:/Sequence/Image");
v16->SetImageRange(1,48);
v16->SetDataByteOrderToLittleEndian();
v16->SetDataSpacing (3,3,3);
 
vtkContourFilter *skinExtractor = vtkContourFilter::New();
skinExtractor->SetInput((vtkDataSet*) v16->GetOutput());
skinExtractor->SetValue(0,500);

vtkPolyDataNormals *skinNormals = vtkPolyDataNormals::New();
skinNormals->SetInput(skinExtractor->GetOutput());
skinNormals->SetFeatureAngle(60);
 
vtkPolyDataMapper *skinMapper = vtkPolyDataMapper::New();
skinMapper->SetInput(skinNormals->GetOutput());
skinMapper->ScalarVisibilityOff();
 
vtkActor *skin = vtkActor::New();
skin->SetMapper(skinMapper);
 
vtkOutlineFilter *outlineData = vtkOutlineFilter::New();
outlineData->SetInput((vtkDataSet*) v16->GetOutput());
 
vtkPolyDataMapper *mapOutline = vtkPolyDataMapper::New();
mapOutline->SetInput(outlineData->GetOutput());
 
vtkActor *outline = vtkActor::New();
outline->SetMapper(mapOutline);



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


More information about the vtkusers mailing list