<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=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Batang;
        panose-1:2 3 6 0 0 1 1 1 1 1;}
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:宋体;
        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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@Batang";
        panose-1:2 3 6 0 0 1 1 1 1 1;}
@font-face
        {font-family:"\@宋体";
        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: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.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {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;}
@list l0:level2
        {mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level4
        {mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level7
        {mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        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'>Hello Park,<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'>It has been a very long time since I received your help. These days I am still working on this problem. Now I can get the VTK coordinate (i.e., world coordinate). You mentioned that if I use itk ImageToVTKImageFilter, I can directly use the VTK coordinate as ITK coordinate. However, I could not understand clearly. In my program, I need ITK coordinate for applying ITK region growing algorithm. I do not know how to translate VTK coordinate to ITK coordinate. Could you please explain more in detail?<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'>Thanks very much!<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'>Xiaopeng<o:p></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 lang=ZH-CN style='font-size:10.0pt;font-family:宋体'>发件人</span></b><b><span style='font-size:10.0pt;font-family:宋体'>:</span></b><span style='font-size:10.0pt;font-family:宋体'> (Samuel) Byeongjun Park [mailto:byeongjun.park@case.edu] <br><b><span lang=ZH-CN>发送时间</span>:</b> 2010</span><span lang=ZH-CN style='font-size:10.0pt;font-family:"Batang","serif"'>년</span><span style='font-size:10.0pt;font-family:宋体'> 10</span><span lang=ZH-CN style='font-size:10.0pt;font-family:"Batang","serif"'>월</span><span style='font-size:10.0pt;font-family:宋体'> 27</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:宋体'> </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:宋体'> </span><span lang=ZH-CN style='font-size:10.0pt;font-family:"Batang","serif"'>오후</span><span style='font-size:10.0pt;font-family:宋体'> 10:41<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] 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><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 lfo2'><![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 lfo2'><![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 lfo2'><![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 lfo2'><![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 lfo2'><![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 lfo2'><![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 lfo2'><![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>