Good evening. <br>I'm trying to visualize the skull volume from a sequence of segmented images. The program runs normally but the result is not right: I don't have a skull volume in my interface but 4!!!<br>I have attached mt code and i hope that someone tells me where is the error.<br>Thank you.<br><br><br>vtkVolume16Reader *Reader = vtkVolume16Reader::New();<br>Reader->SetDataDimensions(128,128);<br>Reader->SetFilePrefix("C:/Images/bmp/X");<br>Reader->SetImageRange(1,48);<br>Reader->SetDataByteOrderToLittleEndian();<br>Reader->SetDataSpacing(1,1,1);<br><br><br>// An isosurface, or contour value of 500 is known to correspond to the skin of the // patient. Once generated, a vtkPolyDataNormals filter is used to create normals // for smooth surface shading during rendering<br>vtkContourFilter *skinExtractor = vtkContourFilter::New();<br>skinExtractor->SetInput((vtkDataSet *)
Reader->GetOutput());<br>skinExtractor->SetValue(0,500);<br> <br>vtkPolyDataNormals *skinNormals = vtkPolyDataNormals::New();<br>skinNormals->SetInput(skinExtractor->GetOutput());<br>skinNormals->SetFeatureAngle(60.0);<br> <br>vtkPolyDataMapper *skinMapper = vtkPolyDataMapper::New();<br>skinMapper->SetInput(skinNormals->GetOutput());<br>skinMapper->ScalarVisibilityOff();<br> <br>vtkActor *skin = vtkActor::New();<br>skin->SetMapper(skinMapper);<br><br><br>// It is convenient to create an initial view of the data. The FocalPoint and Position // form a vector direction. Later on (ResetCamera() method) this vector is used to // position the camera to look at the data in this direction.<br>vtkCamera *aCamera = vtkCamera::New();<br>aCamera->SetViewUp (0, 0, 1);<br>aCamera->SetPosition (0, 1, 0);<br>aCamera->SetFocalPoint (0, 0, 0);<br>aCamera->ComputeViewPlaneNormal();<br><br><br>// Actors are added to
the renderer. An initial camera view is created.<br>// The Dolly() method moves the camera towards the FocalPoint,thereby enlarging // the image.<br>mRender->AddActor(skin);<br>mRender->SetActiveCamera(aCamera);<br>mRender->ResetCamera();<br>aCamera->Dolly(1.5);<br><tt><tt><br></tt></tt><p> 
<hr size="1">
Envoyé avec <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html">Yahoo! Mail</a>.<br>Une boite mail plus intelligente. </a>