<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 3 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
/* Page Definitions */
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        layout-grid:18.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=ZH-TW link=blue vlink=purple style='text-justify-trim:punctuation'>
<div class=Section1 style='layout-grid:18.0pt'>
<p class=MsoNormal style='layout-grid-mode:char'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>We used the following codes
for the surface generation of a medical object in DICOM files.<o:p></o:p></span></font></p>
<p class=MsoNormal style='layout-grid-mode:char'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>The resultant 3D
images were excellent.<o:p></o:p></span></font></p>
<p class=MsoNormal style='layout-grid-mode:char'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>Originally, we thought
that the marching cube algorithm was used for the surface generation of the
medical object since the vtkMarchingCubes method was invoked.<o:p></o:p></span></font></p>
<p class=MsoNormal style='layout-grid-mode:char'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>However, we were
surprised that it seemed that the </span></font><font size=4><span lang=EN-US
style='font-size:14.0pt'>“</span></font><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>vtkMarchingCubes</span></font><font
size=4><span lang=EN-US style='font-size:14.0pt'>”</span></font><font
size=4 face=新細明體><span lang=EN-US style='font-size:
14.0pt;font-family:PMingLiU'> was not invoked when we set breakpoint in that method
in the debugging mode.<o:p></o:p></span></font></p>
<p class=MsoNormal style='layout-grid-mode:char'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>Does anyone know
whether the marching cube algorithm was used or not? If it was, which
method implements the marching cube algorithm?<o:p></o:p></span></font></p>
<p class=MsoNormal style='layout-grid-mode:char'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>How can we invoke
marching cube algorithm in vtk? Are there any other sample codes?<o:p></o:p></span></font></p>
<p class=MsoNormal style='layout-grid-mode:char'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>Thank you very much
for your help.<o:p></o:p></span></font></p>
<p class=MsoNormal style='layout-grid-mode:char'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>Chen</span></font><font
size=4 face=Arial><span lang=EN-US style='font-size:14.0pt;font-family:Arial'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:28.0pt;text-autospace:none'><font size=4
face=新細明體><span lang=EN-US style='font-size:14.0pt;
font-family:PMingLiU'>vtkMarchingCubes *m_cube=vtkMarchingCubes::New();<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>
vtkPolyData *m_polydata=vtkPolyData::New();//define an object frm the
filter<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>
m_cube->SetValue(0,500); // set value corresponding to which the
isosurface will be created<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>
m_cube->ComputeNormalsOff(); // turn Normals Creation off (u can do it
later...and only if u have light settings)<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'> m_cube->ComputeGradientsOff();
// gradients off<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>
m_cube->SetInput(m_reader->GetOutput()); // set input for the volume from
which u'll extract iso surface<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>
m_polydata= m_cube->GetOutput(); // get o/p (it's of polydata type)<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>
m_polydata->Update();<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>
vtkPolyDataMapper *m_polydataMapper = vtkPolyDataMapper::New();<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=4 face=新細明體><span
lang=EN-US style='font-size:14.0pt;font-family:PMingLiU'>
m_polydataMapper->SetInput(m_polydata);<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=4 face=新細明體><span
style='font-size:14.0pt;font-family:PMingLiU'>
m_polydataMapper->SetScalarRange(0,7);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=4 face=新細明體><span
style='font-size:14.0pt;font-family:PMingLiU'>
m_polydataMapper->Update();</span></font><font size=4 face=Arial><span
lang=EN-US style='font-size:14.0pt;font-family:Arial'><o:p></o:p></span></font></p>
</div>
</body>
</html>