<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 http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"Malgun Gothic";
        panose-1:2 11 5 3 2 0 0 2 0 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Malgun Gothic";
        panose-1:2 11 5 3 2 0 0 2 0 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-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;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
        {page:WordSection1;}
 /* List Definitions */
 @list l0
        {mso-list-id:1153988666;
        mso-list-type:hybrid;
        mso-list-template-ids:-859559316 1497009808 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:22.5pt;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</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='color:#1F497D'>Hi,<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>My name is Sam Park. Since you
told you are using QT, I think you are using QVTKWidget.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>You can make your own QVTK widget
class inheriting QVTKWidget.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>In there, override <o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp; Virtual void mousePressEvent(QMouseEvent
*pevent);<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>You can read the mouse position
in QVTKWidget window.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>Then,<o:p></o:p></span></p>

<p class=MsoListParagraph style='margin-left:22.5pt;text-indent:-.25in;
mso-list:l0 level1 lfo1'><![if !supportLists]><span style='color:#1F497D'><span
style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='color:#1F497D'>Get the QT
coordinate point (x,y)<o:p></o:p></span></p>

<p class=MsoListParagraph style='margin-left:22.5pt;text-indent:-.25in;
mso-list:l0 level1 lfo1'><![if !supportLists]><span style='color:#1F497D'><span
style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='color:#1F497D'>Flip y value
by&nbsp; y=height-y;<o:p></o:p></span></p>

<p class=MsoListParagraph style='margin-left:22.5pt;text-indent:-.25in;
mso-list:l0 level1 lfo1'><![if !supportLists]><span style='color:#1F497D'><span
style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='color:#1F497D'>Get the pointer of the
Render in your QVTKWidget object.<o:p></o:p></span></p>

<p class=MsoListParagraph style='margin-left:22.5pt;text-indent:-.25in;
mso-list:l0 level1 lfo1'><![if !supportLists]><span style='color:#1F497D'><span
style='mso-list:Ignore'>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='color:#1F497D'>double wpoint[4];<o:p></o:p></span></p>

<p class=MsoListParagraph style='margin-left:22.5pt;text-indent:-.25in;
mso-list:l0 level1 lfo1'><![if !supportLists]><span style='color:#1F497D'><span
style='mso-list:Ignore'>5.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='color:#1F497D'>Render-&gt;SetDisplayPoint(x,y,0);<o:p></o:p></span></p>

<p class=MsoListParagraph style='margin-left:22.5pt;text-indent:-.25in;
mso-list:l0 level1 lfo1'><![if !supportLists]><span style='color:#1F497D'><span
style='mso-list:Ignore'>6.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='color:#1F497D'>Render-&gt;DisplayToWorld();
<o:p></o:p></span></p>

<p class=MsoListParagraph style='margin-left:22.5pt;text-indent:-.25in;
mso-list:l0 level1 lfo1'><![if !supportLists]><span style='color:#1F497D'><span
style='mso-list:Ignore'>7.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='color:#1F497D'>Render-&gt;GetWorldPoint(wpoint);<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>Now You have the VTK coordinate of
the point you clicked.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>If you imported CT image in ITK
and utilized itk::ImageToVTKImageFilter, <o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>you can directly use the VTK
coordinate as ITK coordinate.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>Good luck.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>Sam.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>-------------- Innovation for
the Future Radiation Oncology&nbsp;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>(Samuel) Byeongjun Park,
Ph.D.&nbsp; -- Research associate of Sohn Lab.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>Case Western Reserve
Univerisity, School of Medicine<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>Visiting: Wood building
W517,&nbsp; Phone: 1-216-368-6583<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
vtkusers-bounces@vtk.org [mailto:vtkusers-bounces@vtk.org] <b>On Behalf Of </b>Xiaopeng
Yang<br>
<b>Sent:</b> Tuesday, October 26, 2010 9:06 PM<br>
<b>To:</b> 'Luis Ibanez'<br>
<b>Cc:</b> 'itk'; 'vtk'<br>
<b>Subject:</b> [vtkusers] Programming challenges with QT, VTK, and ITK<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Dear Luis,<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>How are you doing? Thank you very much for your help so far.
Sorry to ask you a question again.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I am now developing a liver segmentation program using QT,
VTK, and ITK based on CT images. In my program, fast marching algorithm is used
to extract the liver by multiple seed points. To pick the positions of the seed
points, vtkImagePlaneWidget is applied. The problem is how to save the multiple
seed points I selected by left-clicking of the mouse so that I do not need to
type those positions into the code, which is time consuming.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Please provide me with your suggestions. I working on this
for almost one week still I cannot figure it out.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Thanks,<o:p></o:p></p>

<p class=MsoNormal>Xiaopeng<o:p></o:p></p>

</div>

</body>

</html>