<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="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* 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:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=FR link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Fabio,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>You are right ! The type
of values is unsigned short (DICOM CT scan) -1024 / 1024, so for extract the
skin, the contour value is around -500.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Thanks for your help !<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>De :</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Fabio Meneghini
[mailto:fab.meneghini@gmail.com] <br>
<b><span style='font-weight:bold'>Envoyé :</span></b> vendredi 19 décembre
2008 12:41<br>
<b><span style='font-weight:bold'>À :</span></b> Larcher Aurélie<br>
<b><span style='font-weight:bold'>Objet :</span></b> Re: [vtkusers] Set
the contour value from DicomReader</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>..that's pretty weird<br>
I tried the same pipeline you proposed, with vtkContourFilter, and a DICOM
dataset as source, and it worked. <br>
Here's the code I used (in TCL)<br>
<br>
vtkDICOMImageReader DIR <br>
DIR SetDirectoryName "/home/fabio/Scrivania/DICOM/GIFE/ST1/SE9" <br>
DIR Update <br>
set patient [DIR GetPatientName] <br>
puts stdout $patient <br>
set range [eval [eval [eval [DIR GetOutput] GetPointData] GetScalars] GetRange]
<br>
puts stdout $range <br>
<br>
vtkContourFilter skinExtractor <br>
skinExtractor SetInputConnection [DIR GetOutputPort] <br>
skinExtractor SetValue 0 60 <br>
<br>
vtkPolyDataNormals skinNormals <br>
skinNormals SetInputConnection [skinExtractor GetOutputPort] <br>
skinNormals SetFeatureAngle 60.0 <br>
<br>
vtkStripper skinStripper <br>
skinStripper SetInputConnection [skinNormals GetOutputPort] <br>
<br>
vtkPolyDataMapper skinMapper <br>
skinMapper SetInputConnection [skinStripper GetOutputPort] <br>
skinMapper ScalarVisibilityOff <br>
<br>
vtkActor skin <br>
skin SetMapper skinMapper <br>
[skin GetProperty] SetDiffuseColor .6 .49 .25 <br>
[skin GetProperty] SetSpecular .3 <br>
[skin GetProperty] SetSpecularPower 20<br>
<br>
/////////////////<br>
it may be that the value you set for contouring is not good...try to take a
look at the histogram of the images, or simply look at the value range, just
like my script does. <br>
Good luck!<br>
<br>
Fabio <br>
<br>
<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>2008/12/19 Larcher Aurélie <<a href="mailto:aurelie.larcher@imag.fr">aurelie.larcher@imag.fr</a>><o:p></o:p></span></font></p>
<div link=blue vlink=purple>
<div>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Hi
all,</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>I try to set contour value to my Dicom Reader in order to generate skin
surface.</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>When I use filter like vtkMarchingContourFilter or vtkContourFilter with
the contour value 30, there is no result.</span></font><o:p></o:p></p>
<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'> </span></font><font size=2
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>vtkDICOMImageReader
*colonneReader = vtkDICOMImageReader::New();</span></font><o:p></o:p></p>
<p><font size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New"'>
colonneReader->SetDirectoryName("F:/Images/VDH/Dicom/");</span></font><o:p></o:p></p>
<p><font size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New"'>
</span></font><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>colonneReader->Update() ;</span></font><o:p></o:p></p>
<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'> vtkMarchingContourFilter
*surfacePeau = vtkMarchingContourFilter::New();</span></font><o:p></o:p></p>
<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>
surfacePeau->SetInputConnection(colonneReader->GetOutputPort());</span></font><o:p></o:p></p>
<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>
surfacePeau->SetValue(0,30);</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>Nevertheless, when I use vtkEdgePoints with the same contour value, I
have some result</span></font><o:p></o:p></p>
<p style='text-indent:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>vtkEdgePoints *surfacePeau =
vtkEdgePoints::New();</span></font><o:p></o:p></p>
<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>
surfacePeau->SetInputConnection(colonneReader->GetOutputPort());</span></font><o:p></o:p></p>
<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>
surfacePeau->SetValue(30);</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>If I changed the contour value at 200, I obtain the same result with the
3 filters (with different appearance obviously).</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>Can you tell me what's the problem and how can I generate skin surface
with vtkMarchingContourFilter or vtkContourFilter.</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>Thanks,</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>Aurélie</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'> </span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'> </span></font><o:p></o:p></p>
</div>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a
href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><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></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>