<div>Hi everybody,</div>
<div>I try to apply the marching cubes algorithm on a dicom series image, I remark that a region of the hole surface is placed in a wrong position ; i.e. the same region of all slices is cut and placed on the opposite direction of the image, I don't understand the pb. Here the source code :</div>
<div> </div>
<div> vtkRenderer *ren1 = vtkRenderer::New();<br> vtkRenderWindow *renWin = vtkRenderWindow::New();<br> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<br> </div>
<div> vtkVolume16Reader *v16 = vtkVolume16Reader::New();<br> v16->SetDataDimensions (512,512);<br> v16->SetDataByteOrderToLittleEndian();<br> v16->SetFilePrefix ("C:\\test\\000000");</div>
<div> v16->SetImageRange (1, 83);</div>
<div> v16->SetDataSpacing (0.59, 0.59, 3);</div>
<div> v16->Update();</div>
<div> </div>
<div> vtkImageMarchingCubes *iso = vtkImageMarchingCubes::New();<br> iso->SetInput(v16->GetOutput());<br> iso->SetValue(0,1100);<br> iso->SetInputMemoryLimit(3000);</div>
<div> vtkPolyDataMapper *isoMapper = vtkPolyDataMapper::New();<br> isoMapper->SetInput (iso->GetOutput());<br> isoMapper->ScalarVisibilityOff();<br> isoMapper->ImmediateModeRenderingOn();<br> <br> vtkActor *isoActor = vtkActor::New();<br>
isoActor->SetMapper (isoMapper);<br> isoActor->GetProperty()->SetColor(1,1,1);</div>
<div><br> ren1->AddActor (isoActor);<br> ren1->SetBackground (0.2, 0.3, 0.4);</div>
<div> renWin->AddRenderer (ren1);<br> iren->SetRenderWindow (renWin);<br> renWin->Render();<br> iren->Start();</div>
<div> return 0;</div>
<div> </div>
<div>If anyone can help me, thank you</div>