[vtkusers] Extracting bone surfaces

Jothybasu Selvaraj jothybasu at gmail.com
Thu Aug 2 07:36:00 EDT 2012


I was able to do that by vtkImageThreshold and vtkMarchingCubes.

Though not great, it looks fair! If you come out with a better
solution let us know.

If you want much better extraction, I think you should use ITK instead.

Here is the code

vtkSmartPointer<vtkImageThreshold> imageThreshold =
            vtkSmartPointer<vtkImageThreshold>::New();
    imageThreshold->SetInput(changer->GetOutput());
    imageThreshold->ThresholdBetween(150,2000);
    imageThreshold->ReplaceInOn();
    imageThreshold->SetInValue(100);
    imageThreshold->Update();

      vtkSmartPointer<vtkMarchingCubes> marching =
              vtkSmartPointer<vtkMarchingCubes>::New();
      marching->SetInput(imageThreshold->GetOutput());
      marching->SetValue(0,100);
      marching->Update();

      // To remain largest region
      vtkSmartPointer<vtkPolyDataConnectivityFilter> confilter =
              vtkSmartPointer<vtkPolyDataConnectivityFilter>::New();
      confilter->SetInputConnection(marching->GetOutputPort());
      confilter->SetExtractionModeToLargestRegion();




On Thu, Aug 2, 2012 at 12:26 PM, Carlos Delgado
<carlos.m.delgado at gmail.com> wrote:
> Hi all:
>
> I am trying to extract the outer surface of CT bones and I have tried
> some techniques, but they all failed. Also I looked at the vtk user
> list for older messages concerning this topic, but it was not helpful.
> The problem is that the bones have also a inner surface and it's hard
> to isolate. Can anybody suggest me any method I can try to solve it?
>
> Thanks so much in advance,
> Carlos.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



-- 
Jothybasu Selvaraj
PhD Student
University of Liverpool
UK



More information about the vtkusers mailing list