<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Batang;
panose-1:2 3 6 0 0 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Malgun Gothic";
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:DotumChe;
panose-1:2 11 6 9 0 1 1 1 1 1;}
@font-face
{font-family:"\@DotumChe";
panose-1:2 11 6 9 0 1 1 1 1 1;}
@font-face
{font-family:"\@Batang";
panose-1:2 3 6 0 0 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@Malgun Gothic";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Krishnan,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I got it worked by setting the value from 1 to 0.1. Thank you very much for your help!<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Yang<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span lang=ZH-CN style='font-size:10.0pt;font-family:SimSun'>å‘件人</span></b><b><span style='font-size:10.0pt;font-family:SimSun'>:</span></b><span style='font-size:10.0pt;font-family:SimSun'> Karthik Krishnan [mailto:karthik.krishnan@kitware.com] <br><b><span lang=ZH-CN>å‘é€æ—¶é—´</span>:</b> 2011</span><span lang=ZH-CN style='font-size:10.0pt;font-family:"Batang","serif"'>ë…„</span><span style='font-size:10.0pt;font-family:SimSun'> 1</span><span lang=ZH-CN style='font-size:10.0pt;font-family:"Batang","serif"'>ì›”</span><span style='font-size:10.0pt;font-family:SimSun'> 10</span><span lang=ZH-CN style='font-size:10.0pt;font-family:"Batang","serif"'>ì¼</span><span lang=ZH-CN style='font-size:10.0pt;font-family:SimSun'> </span><span lang=ZH-CN style='font-size:10.0pt;font-family:"Batang","serif"'>월요ì¼</span><span lang=ZH-CN style='font-size:10.0pt;font-family:SimSun'> </span><span lang=ZH-CN style='font-size:10.0pt;font-family:"Batang","serif"'>오후</span><span style='font-size:10.0pt;font-family:SimSun'> 11:19<br><b><span lang=ZH-CN>收件人</span>:</b> Xiaopeng Yang<br><b><span lang=ZH-CN>抄é€</span>:</b> vtk<br><b><span lang=ZH-CN>主题</span>:</b> Re: [vtkusers] Visualization of vessel skeleton obtained from Binary3DThinningImageFilter<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>You use an isovalue of 1 in your code, or is it meant to be 0.5 (half way between Foreground and background). <br><br>You could try also using vtkThresholdPoints. This will generate a polydata with vertex cells at each voxel. You can visualize the result with a vtkPolyDataMapper.<br><br>A more appropriate way to visualize is to construct a polydata out of the skeletonized data. Just visit every voxel and its neighbors add to a vtkCellArray, the centers of the voxels with any connected neighbors. You can then visualize the construcuted polydata. You get to set the line width etc... <br>Or you get can pass the data through a tube filter and use a vtkPolyDataMapper...<o:p></o:p></p><div><p class=MsoNormal>On Mon, Jan 10, 2011 at 3:20 PM, Xiaopeng Yang <<a href="mailto:yxp233@postech.ac.kr">yxp233@postech.ac.kr</a>> wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hi guys,<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>How are you doing?<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>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):<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><img border=0 width=327 height=341 id="_x0000_i1025" src="https://mail.google.com/a/kitware.com/?ui=2&ik=856cfef1d6&view=att&th=12d6f5686e9e9c6a&attid=0.0.1&disp=emb&zw" alt="cid:image006.jpg@01CB9EAA.770905A0"><img border=0 width=388 height=334 id="_x0000_i1026" src="https://mail.google.com/a/kitware.com/?ui=2&ik=856cfef1d6&view=att&th=12d6f5686e9e9c6a&attid=0.0.2&disp=emb&zw" alt="cid:image007.jpg@01CB9EAA.770905A0"><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Here is my code:<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> reader->SetFileName( <span style='color:#A31515'>"D:/Hybrid Method/Hybrid/BSP/PortalSkeleton/3D.dcm"</span> );</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> reader->Update();</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> <span style='color:blue'>typedef</span> itk::VTKImageExport< InputImageType > ExportFilterType;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> ExportFilterType::Pointer itkExporter = ExportFilterType::New();</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> itkExporter->SetInput( reader->GetOutput() );</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> vtkImageImport* vtkImporter = vtkImageImport::New(); </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> ConnectPipelines(itkExporter, vtkImporter);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> vtkRenderer *ren4 = vtkRenderer::New();</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> vtkRenderWindow *renWin = vtkRenderWindow::New();</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> renWin->AddRenderer(ren4);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> iren->SetRenderWindow(renWin);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> <span style='color:green'>//Create an iso-surface using Marching Cubes</span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> vtkContourFilter *iso = vtkContourFilter::New();</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> iso->SetInput(vtkImporter->GetOutput());</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> iso->ComputeScalarsOn();</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> iso->SetValue(1, 1);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe;color:green'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> <span style='color:green'>//vtkDataSetMapper *isoMapper = vtkDataSetMapper::New();</span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> vtkPolyDataMapper *isoMapper = vtkPolyDataMapper::New();</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> isoMapper->SetInput(iso->GetOutput());</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> isoMapper->ScalarVisibilityOff();</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe;color:green'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> vtkActor *isoActor = vtkActor::New();</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> isoActor->SetMapper(isoMapper);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> isoActor->GetProperty()->SetColor(1, 0, 0);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> ren4->AddActor(isoActor);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> renWin->SetSize(512,512);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:DotumChe'> ren4->ResetCamera();</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-indent:10.5pt'><span style='font-size:10.0pt;font-family:DotumChe'>ren4->SetBackground(1,1,1);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-indent:10.5pt'><span style='font-size:10.0pt;font-family:DotumChe'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-indent:10.5pt'><span style='font-size:10.0pt;font-family:DotumChe'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Thank you,<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Yang<o:p></o:p></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>