[vtkusers] Visualization of vessel skeleton obtained from Binary3DThinningImageFilter

Xiaopeng Yang yxp233 at postech.ac.kr
Mon Jan 10 04:50:31 EST 2011


Hi guys,

 

How are you doing?

 

I applied ITK Binary3D Thinning Image Filter to skeletonize portal vein of
liver. Then I tried to visualize the result as Iso-surface generated by vtk.
But in the screen, I can just see a few discrete and very small point (if
you do not see carefully, you cannot recognize these points). Then I
visualized my result as Iso-surface by MITK. The vessel skeleton is shown
continuously and looks very good. Here are the two results (the former one
is generated by my code; the later one is from MITK):

 

cid:image006.jpg at 01CB9EAA.770905A0cid:image007.jpg at 01CB9EAA.770905A0

 

Here is my code:

 

  reader->SetFileName( "D:/Hybrid Method/Hybrid/BSP/PortalSkeleton/3D.dcm"
);

  reader->Update();

  

  typedef itk::VTKImageExport< InputImageType > ExportFilterType;

 

  ExportFilterType::Pointer itkExporter = ExportFilterType::New();

    

  itkExporter->SetInput( reader->GetOutput() );

    

  vtkImageImport* vtkImporter = vtkImageImport::New();  

  ConnectPipelines(itkExporter, vtkImporter);

 

  vtkRenderer *ren4 = vtkRenderer::New();

 

  vtkRenderWindow *renWin = vtkRenderWindow::New();

  renWin->AddRenderer(ren4);

 

  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();

  iren->SetRenderWindow(renWin);

 

  //Create an iso-surface using Marching Cubes

  vtkContourFilter *iso = vtkContourFilter::New();

  iso->SetInput(vtkImporter->GetOutput());

  iso->ComputeScalarsOn();

  iso->SetValue(1, 1);

 

  //vtkDataSetMapper *isoMapper = vtkDataSetMapper::New();

  vtkPolyDataMapper *isoMapper = vtkPolyDataMapper::New();

  isoMapper->SetInput(iso->GetOutput());

  isoMapper->ScalarVisibilityOff();

 

  vtkActor *isoActor = vtkActor::New();

  isoActor->SetMapper(isoMapper);

  isoActor->GetProperty()->SetColor(1, 0, 0);

 

  ren4->AddActor(isoActor);

 

  renWin->SetSize(512,512);

  ren4->ResetCamera();

ren4->SetBackground(1,1,1);

 

 

Thank you,

Yang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110110/9a36d4c0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 5491 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110110/9a36d4c0/attachment.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 9052 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110110/9a36d4c0/attachment-0001.jpeg>


More information about the vtkusers mailing list